diff --git a/.buildinfo b/.buildinfo new file mode 100644 index 000000000..457ed9f07 --- /dev/null +++ b/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 1d8ce764e61d75774a5ccf0a599b5baa +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 000000000..e69de29bb diff --git a/CNAME b/CNAME new file mode 100644 index 000000000..73e52d2ce --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +dyna.docs.pyansys.com diff --git a/index.html b/index.html new file mode 100644 index 000000000..ae120c159 --- /dev/null +++ b/index.html @@ -0,0 +1,6 @@ + + +Redirecting to https://dyna.docs.pyansys.com/version/stable/ + + + diff --git a/sitemap.xml b/sitemap.xml new file mode 100644 index 000000000..6ea6ce2c7 --- /dev/null +++ b/sitemap.xml @@ -0,0 +1,633 @@ + + + + https://www.dyna.docs.pyansys.com + 2023-09-05T08:47:58+00:00 + daily + 1.0 + + + https://www.dyna.docs.pyansys.com/contributing + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynalogging/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynadem/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynaiga/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynamech/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynasolution/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynabase/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/misc/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynaicfd/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/examples/download_utilities/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/examples/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/examples/examples/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/launcher/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynanvh/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/errors/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynaisph/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynaem/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynasale/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/pre/dynamaterial/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/solver/grpc_tags/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/solver/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/ansys/dyna/core/solver/dynasolver/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/autoapi/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_static/webpack-macros + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynabase + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynaiga + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynaisph + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynasale + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/misc + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynamaterial + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynadem + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/examples/examples + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/examples/download_utilities + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynanvh + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynalogging + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynaicfd + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/errors + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynasolution + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynamech + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/dynaem + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/pre/launcher + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/solver/dynasolver + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core/solver/grpc_tags + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/ansys/dyna/core + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/_modules/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/search + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/genindex + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Airbag/airbag_post + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Airbag/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Airbag/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Airbag/airbag_deploy + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Explicit/belted_dummy + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Explicit/ball_plate + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Explicit/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Explicit/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Thermal/thermal_stress + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Thermal/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Thermal/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/EM/em_resistive_heating + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/EM/em_resistive_heating_2d + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/EM/em_rlc_define_func + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/EM/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/EM/em_resistive_heating_2d_multi_isopots + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/EM/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/EM/em_resistive_heating_2d_isopots + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/EM/em_rlc_isopotential + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Implicit/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Implicit/camry_rc + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/Implicit/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/SALE/sale_efp + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/SALE/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/SALE/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ISPH/rigidtest + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ISPH/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ISPH/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_free_convection_flow + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_thermal_flow + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_dem_coupling + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_cylinderflow + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_strong_fsi + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_driven_cavity + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_plate_flow + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_imposed_move + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_sloshing + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_mesh_morphing + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_mesh_adaptivity + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_dam_break + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_mesh_size + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_internal_3d_flow + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/ICFD/icfd_weak_fsi + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/NVH/nvh_frf_solid + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/NVH/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/NVH/frf_plate_damping + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/examples/NVH/sg_execution_times + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/user-guide/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/py-modindex + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + + https://www.dyna.docs.pyansys.com/getting-started/index + 2023-09-05T08:47:58+00:00 + weekly + 0.5 + + diff --git a/version/0.2/.buildinfo b/version/0.2/.buildinfo new file mode 100644 index 000000000..33b901ab3 --- /dev/null +++ b/version/0.2/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: eb1cb1290734675187ae15c18e824837 +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynabase.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynabase.html new file mode 100644 index 000000000..9ac6fc29c --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynabase.html @@ -0,0 +1,542 @@ + + + + + + + + + dynabase — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynabase#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynadem.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynadem.html new file mode 100644 index 000000000..0d2708460 --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynadem.html @@ -0,0 +1,542 @@ + + + + + + + + + dynadem — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynadem#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaem.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaem.html new file mode 100644 index 000000000..38c848033 --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaem.html @@ -0,0 +1,542 @@ + + + + + + + + + dynaem — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynaem#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaicfd.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaicfd.html new file mode 100644 index 000000000..5e32b2abf --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaicfd.html @@ -0,0 +1,542 @@ + + + + + + + + + dynaicfd — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynaicfd#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaiga.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaiga.html new file mode 100644 index 000000000..74d134f9a --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaiga.html @@ -0,0 +1,542 @@ + + + + + + + + + dynaiga — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynaiga#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaisph.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaisph.html new file mode 100644 index 000000000..fb037742c --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynaisph.html @@ -0,0 +1,542 @@ + + + + + + + + + dynaisph — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynaisph#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynamaterial.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynamaterial.html new file mode 100644 index 000000000..7b77330ac --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynamaterial.html @@ -0,0 +1,542 @@ + + + + + + + + + dynamaterial — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynamaterial#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynamech.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynamech.html new file mode 100644 index 000000000..12eab1d0f --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynamech.html @@ -0,0 +1,542 @@ + + + + + + + + + dynamech — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynamech#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynanvh.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynanvh.html new file mode 100644 index 000000000..fa9f5ad02 --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynanvh.html @@ -0,0 +1,542 @@ + + + + + + + + + dynanvh — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynanvh#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynasale.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynasale.html new file mode 100644 index 000000000..c38ce19b8 --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynasale.html @@ -0,0 +1,542 @@ + + + + + + + + + dynasale — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynasale#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynasolution.html b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynasolution.html new file mode 100644 index 000000000..8b8d1814c --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.pre.dynasolution.html @@ -0,0 +1,542 @@ + + + + + + + + + dynasolution — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynasolution#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/_autosummary/ansys.dyna.core.solver.dynasolver.html b/version/0.2/API/_autosummary/ansys.dyna.core.solver.dynasolver.html new file mode 100644 index 000000000..7dd0465d8 --- /dev/null +++ b/version/0.2/API/_autosummary/ansys.dyna.core.solver.dynasolver.html @@ -0,0 +1,532 @@ + + + + + + + + + dynasolver — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

dynasolver#

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/announcement.html b/version/0.2/API/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/API/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/API/index.html b/version/0.2/API/index.html new file mode 100644 index 000000000..e3a987801 --- /dev/null +++ b/version/0.2/API/index.html @@ -0,0 +1,552 @@ + + + + + + + + + API reference — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + + + + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/pre.html b/version/0.2/API/pre.html new file mode 100644 index 000000000..bbe710964 --- /dev/null +++ b/version/0.2/API/pre.html @@ -0,0 +1,579 @@ + + + + + + + + + PyDyna-pre APIs — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

PyDyna-pre APIs#

+

The PyDyna-pre API includes classes for apps and modules.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

pre.dynabase

Base

pre.dynasolution

Solution

pre.dynamech

Mechanical API

pre.dynaem

EM API

pre.dynaicfd

ICFD API

pre.dynaiga

IGA API

pre.dynaisph

ISPH API

pre.dynamaterial

Material API

pre.dynanvh

NVH API

pre.dynasale

Airbag API

pre.dynadem

DEM API

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/API/solver.html b/version/0.2/API/solver.html new file mode 100644 index 000000000..c2b00dfbd --- /dev/null +++ b/version/0.2/API/solver.html @@ -0,0 +1,539 @@ + + + + + + + + + PyDyna-solver APIs — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

PyDyna-solver APIs#

+

The PyDyna-solver API includes classes for apps and modules.

+ + + + + + +

solver.dynasolver

Dyna solver API

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/Resources/Contributing.html b/version/0.2/Resources/Contributing.html new file mode 100644 index 000000000..0614e3546 --- /dev/null +++ b/version/0.2/Resources/Contributing.html @@ -0,0 +1,516 @@ + + + + + + + + + Contributing — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Contributing#

+

Overall guidance on contributing to a PyAnsys repository appears in the +Contributing topic +in the PyAnsys Developer’s Guide. Ensure that you are thoroughly familiar +with it and all Guidelines and Best Practices +before attempting to contribute to PyDyna.

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/Resources/Getting_Started.html b/version/0.2/Resources/Getting_Started.html new file mode 100644 index 000000000..d0ee8dfa8 --- /dev/null +++ b/version/0.2/Resources/Getting_Started.html @@ -0,0 +1,563 @@ + + + + + + + + + Getting started — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Getting started#

+
+

Installation#

+

This package is not yet available on the public PyPI, but you can still install +it using pip from our private PyPI repository.

+

The following on Windows:

+
set PYANSYS_PYPI_PRIVATE_PAT=<REDACTED>
+set INDEX_URL=https://%PYANSYS_PYPI_PRIVATE_PAT%@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/
+python -m pip install ansys-dyna-core --index-url %INDEX_URL%
+
+
+

And if you are running Linux:

+
PYANSYS_PYPI_PRIVATE_PAT=<REDACTED>
+export INDEX_URL='https://$PYANSYS_PYPI_PRIVATE_PAT@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/'
+python -m pip install ansys-dyna-core --index-url $INDEX_URL
+
+
+

Email your friendly PyAnsys team member for the PYANSYS_PYPI_PRIVATE_PAT +at pyansys.core@ansys.com or send us a message via Teams.

+

Installing from git

+

If you have git installed and want the bleeding edge version:

+
pip install -U git+https://github.com/pyansys/pyDyna@main
+
+
+

You need to be logged into GitHub locally and be a member of the PyAnsys Organization.

+

Alternatively, if you need to modify the repository locally (or want to +do local development), you can clone it and install it in “development” mode with:

+
git clone https://github.com/pyansys/pyDyna
+cd pyDyna
+pip install -e .
+
+
+

Note the -e flag, which denotes that you are in development mode. +You can make changes in the local pyDyna and have them reflected +in your local install of PyDyna.

+
+
+ + +
+ + + +
+ + + +
+ +
+ +
+ On this page +
+ +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/Resources/User_Guide.html b/version/0.2/Resources/User_Guide.html new file mode 100644 index 000000000..918811758 --- /dev/null +++ b/version/0.2/Resources/User_Guide.html @@ -0,0 +1,550 @@ + + + + + + + + + User guide — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

User guide#

+

There are 3 related packages here, all under the ansys/dyna directory.

+

PyDyna-pre provides interface to create DYNA input deck.

+

PyDyna-solver contains code for interfacing with the LS-DYNA solver directly. +As LS-DYNA is primarily a batch solver with very limited interactive +capabilities, the code here is similarly limited. The target +use case is that LS-DYNA is running in a container environment +such as Docker or Kubernetes. The code here then allows for pushing +input files to the container, starting LS-DYNA and monitoring its +progress, and retrieving results files.

+

The Data Processing Framework (DPF) is designed to provide numerical +simulation users/engineers with a toolbox for accessing and +transforming simulation data. DPF can access data from solver result +files as well as several neutral formats (.csv, .hdf5, .vtk, +etc.). Various operators are available allowing the manipulation and +the transformation of this data.

+

The Python ansys-dpf-post package provides a simplified Python +interface to DPF, thus enabling rapid postprocessing without ever +leaving a Python environment.

+

Visit the DPF-Post Documentation for a +detailed description of the package

+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/Resources/announcement.html b/version/0.2/Resources/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/Resources/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/Resources/pydyna_post.html b/version/0.2/Resources/pydyna_post.html new file mode 100644 index 000000000..749b107b2 --- /dev/null +++ b/version/0.2/Resources/pydyna_post.html @@ -0,0 +1,1508 @@ + + + + + + + + + Using PyDPF-post for LS-DYNA — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Using PyDPF-post for LS-DYNA#

+
+

Operators#

+
    +
  1. d3plot

  2. +
+
    +
  • lsdyna::d3plot::meshes_provider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +# for regular mesh
    +meshOP = dpf.Operator("lsdyna::d3plot::meshes_provider")
    +meshOP.inputs.data_sources.connect(ds)
    +meshes = meshOP.outputs.meshes()
    +mesh = meshes.get_mesh({})
    +
    +# for adaptive mesh
    +meshOP = dpf.Operator("lsdyna::d3plot::meshes_provider")
    +meshOP.inputs.data_sources.connect(ds)
    +timeScoping = dpf.Scoping()
    +timeScoping.ids = list(range(1, 21))
    +meshOP.inputs.time_scoping.connect(timeScoping)
    +meshes = meshOP.outputs.meshes()
    +mesh = meshes.get_mesh({'time':1})
    +
    +
    +
  • +
  • lsdyna::d3plot::U

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +coord = dpf.Operator("lsdyna::d3plot::U")
    +coord.inputs.data_sources.connect(ds)
    +# set the time
    +coord.inputs.time_scoping.connect([3])
    +fields = coord.outputs.displacement()
    +
    +
    +
  • +
  • lsdyna::d3plot::TimeFreqSupportProvider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +time = dpf.Operator("lsdyna::d3plot::TimeFreqSupportProvider")
    +time.inputs.data_sources.connect(ds)
    +result_time_freq_support = time.outputs.time_freq_support()
    +
    +
    +
  • +
  • lsdyna::d3plot::result_info_provider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultInfoOp = dpf.Operator("lsdyna::d3plot::result_info_provider")
    +resultInfoOp.inputs.data_sources(ds)
    +result_info = resultInfoOp.outputs.result_info()
    +
    +
    +
  • +
  • lsdyna::d3plot::eng_ke

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::eng_ke")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.global_kinetic_energy()
    +
    +
    +
  • +
  • lsdyna::d3plot::global_internal_energy

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::global_internal_energy")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.global_internal_energy()
    +
    +
    +
  • +
  • lsdyna::d3plot::global_total_energy

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::global_total_energy")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.global_total_energy()
    +
    +
    +
  • +
  • lsdyna::d3plot::global_velocity

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::global_velocity")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.global_velocity()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_initial_coordinates

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_initial_coordinates")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_initial_coordinates()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_coordinates

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_coordinates")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_coordinates()
    +
    +
    +
  • +
  • lsdyna::d3plot::V

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::V")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_velocities()
    +
    +
    +
  • +
  • lsdyna::d3plot::A

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::A")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_accelerations()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_temperature

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_temperature")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_temperature()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_heat_flux

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_heat_flux")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_heat_flux()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_mass_scaling

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_mass_scaling")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_mass_scaling()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_temperature_divide_time

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_temperature_divide_time")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_temperature_divide_time()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_residual_force

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_residual_force")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_residual_force()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_residual_moment

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_residual_moment")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_residual_moment()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_penetration

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_penetration")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_penetration()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_relative_penetration

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_relative_penetration")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_relative_penetration()
    +
    +
    +
  • +
  • lsdyna::d3plot::node_contact_energy_density

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::node_contact_energy_density")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.node_contact_energy_density()
    +
    +
    +
  • +
  • lsdyna::d3plot::S

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::S")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.stress()
    +
    +
    +
  • +
  • lsdyna::d3plot::stress_von_mises

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::stress_von_mises")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.stress_von_mises()
    +
    +
    +
  • +
  • lsdyna::d3plot::effective_plastic_strain

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::effective_plastic_strain")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.effective_plastic_strain()
    +
    +
    +
  • +
  • lsdyna::d3plot::EPEL

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::EPEL")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.strain()
    +
    +
    +
  • +
  • lsdyna::d3plot::strain_von_mises

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::strain_von_mises")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.strain_von_mises()
    +
    +
    +
  • +
  • lsdyna::d3plot::history_var

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::history_var")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.history_var()
    +
    +
    +
  • +
  • lsdyna::d3plot::thickness

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::thickness")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.thickness()
    +
    +
    +
  • +
  • lsdyna::d3plot::element_dependent_var_1

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::element_dependent_var_1")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.element_dependent_var_1()
    +
    +
    +
  • +
  • lsdyna::d3plot::element_dependent_var_2

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::element_dependent_var_2")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.element_dependent_var_2()
    +
    +
    +
  • +
  • lsdyna::d3plot::mx

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::mx")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.mx()
    +
    +
    +
  • +
  • lsdyna::d3plot::my

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::my")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.my()
    +
    +
    +
  • +
  • lsdyna::d3plot::mxy

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::mxy")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.mxy()
    +
    +
    +
  • +
  • lsdyna::d3plot::qx

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::qx")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.qx()
    +
    +
    +
  • +
  • lsdyna::d3plot::qy

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::qy")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.qy()
    +
    +
    +
  • +
  • lsdyna::d3plot::nx

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::nx")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.nx()
    +
    +
    +
  • +
  • lsdyna::d3plot::ny

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::ny")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.ny()
    +
    +
    +
  • +
  • lsdyna::d3plot::nxy

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::nxy")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.nxy()
    +
    +
    +
  • +
  • lsdyna::d3plot::axial_force

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::axial_force")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.axial_force()
    +
    +
    +
  • +
  • lsdyna::d3plot::s_shear_resultant

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::s_shear_resultant")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.s_shear_resultant()
    +
    +
    +
  • +
  • lsdyna::d3plot::t_shear_resultant

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::t_shear_resultant")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.t_shear_resultant()
    +
    +
    +
  • +
  • lsdyna::d3plot::s_bending_moment

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::s_bending_moment")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.s_bending_moment()
    +
    +
    +
  • +
  • lsdyna::d3plot::t_bending_moment

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::t_bending_moment")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.t_bending_moment()
    +
    +
    +
  • +
  • lsdyna::d3plot::torsional_resultant

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::torsional_resultant")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.torsional_resultant()
    +
    +
    +
  • +
  • lsdyna::d3plot::axial_stress

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::axial_stress")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.axial_stress()
    +
    +
    +
  • +
  • lsdyna::d3plot::rs_shear_stress

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::rs_shear_stress")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.rs_shear_stress()
    +
    +
    +
  • +
  • lsdyna::d3plot::tr_shear_stress

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::tr_shear_stress")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.tr_shear_stress()
    +
    +
    +
  • +
  • lsdyna::d3plot::axial_plastic_strain

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::axial_plastic_strain")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.axial_plastic_strain()
    +
    +
    +
  • +
  • lsdyna::d3plot::axial_strain

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./d3plot', 'd3plot')
    +
    +resultOp = dpf.Operator("lsdyna::d3plot::axial_strain")
    +resultOp.inputs.data_sources(ds)
    +# set the time
    +resultOp.inputs.time_scoping.connect([3])
    +result = resultOp.outputs.axial_strain()
    +
    +
    +
  • +
+
    +
  1. binout

  2. +
+
    +
  • lsdyna::binout::meshes_provider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources() ds.set_result_file_path(r'./binout', 'binout')
    +
    +meshOP = dpf.Operator("lsdyna::binout::meshes_provider")
    +meshOP.inputs.data_sources.connect(ds) meshes = meshOP.outputs.meshes()
    +mesh = meshes.get_mesh({})
    +
    +
    +
  • +
  • lsdyna::binout::U

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources() ds.set_result_file_path(r'./binout', 'binout')
    +
    +coord = dpf.Operator("lsdyna::binout::U")
    +coord.inputs.data_sources.connect(ds)
    +# set the time
    +coord.inputs.time_scoping.connect([3])
    +fields = coord.outputs.displacement()
    +
    +
    +
  • +
  • lsdyna::binout::TimeFreqSupportProvider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r"./binout", "binout")
    +
    +op = dpf.Operator("lsdyna::binout::TimeFreqSupportProvider")
    +op.inputs.data_sources(ds)
    +result_time_freq_support = op.outputs.time_freq_support()
    +
    +
    +
  • +
  • lsdyna::binout::glstat::TimeFreqSupportProvider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +op = dpf.Operator("llsdyna::binout::glstat::TimeFreqSupportProvider")
    +op.inputs.data_sources(ds)
    +result_time_freq_support = op.outputs.time_freq_support()
    +
    +
    +
  • +
  • lsdyna::binout::matsum::TimeFreqSupportProvider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +op = dpf.Operator("llsdyna::binout::matsum::TimeFreqSupportProvider")
    +op.inputs.data_sources(ds)
    +result_time_freq_support = op.outputs.time_freq_support()
    +
    +
    +
  • +
  • lsdyna::binout::rcforc::TimeFreqSupportProvider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +op = dpf.Operator("llsdyna::binout::rcforc::TimeFreqSupportProvider")
    +op.inputs.data_sources(ds)
    +result_time_freq_support = op.outputs.time_freq_support()
    +
    +
    +
  • +
  • lsdyna::binout::result_info_provider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +resultInfoOp = dpf.Operator("lsdyna::binout::result_info_provider")
    +resultInfoOp.inputs.data_sources(ds)
    +result_info = resultInfoOp.outputs.result_info()
    +
    +
    +
  • +
  • lsdyna::binout::S

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +stressOp = dpf.Operator("lsdyna::binout::S")
    +stressOp.inputs.data_sources(ds)
    +fields = stressOp.outputs.stress()
    +
    +
    +
  • +
  • lsdyna::binout::EPEL

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +resultOp = dpf.Operator("lsdyna::binout::EPEL")
    +resultOp.inputs.data_sources(ds)
    +result = resultOp.outputs.strain()
    +
    +
    +
  • +
  • lsdyna::binout::glstat

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +glstat_op = dpf.Operator("lsdyna::binout::glstat")
    +glstat_op.inputs.data_sources(ds)
    +fields = glstat_op.outputs.results()
    +
    +# get correponding result by component(from lsdyna::binout::result_info_provider)
    +field0 = fields.get_field({"component":0})
    +field1 = fields.get_field({"component":1})
    +...
    +
    +
    +
  • +
  • lsdyna::binout::matsum

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +glstat_op = dpf.Operator("lsdyna::binout::matsum")
    +glstat_op.inputs.data_sources(ds)
    +fields = glstat_op.outputs.results()
    +
    +# get correponding result by component(from lsdyna::binout::result_info_provider)
    +field0 = fields.get_field({"component":0})
    +field1 = fields.get_field({"component":1})
    +...
    +
    +
    +
  • +
  • lsdyna::binout::rcforc

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./binout', 'binout')
    +
    +glstat_op = dpf.Operator("lsdyna::binout::rcforc")
    +glstat_op.inputs.data_sources(ds)
    +fields = glstat_op.outputs.results()
    +
    +# get correponding result by component(from lsdyna::binout::result_info_provider)
    +field0 = fields.get_field({"component":0})
    +field1 = fields.get_field({"component":1})
    +...
    +
    +
    +
  • +
+
    +
  1. nvh

  2. +
+
    +
  • lsdyna::d3ssd::meshes_provider

  • +
  • lsdyna::d3spcm::meshes_provider

  • +
  • lsdyna::d3psd::meshes_provider

  • +
  • lsdyna::d3rms::meshes_provider

  • +
  • lsdyna::d3zcf::meshes_provider

  • +
  • lsdyna::d3ssd::result_info_provider

  • +
  • lsdyna::d3ssd::U

  • +
  • lsdyna::d3ssd::V

  • +
  • lsdyna::d3ssd::A

  • +
  • lsdyna::d3ssd::S

  • +
  • lsdyna::d3ssd::EPEL

  • +
  • lsdyna::d3ssd::TimeFreqSupportProvider

    +

    same as d3plot

    +
  • +
  • lsdyna::moddynout::TimeFreqSupportProvider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./moddynout', 'moddynout')
    +
    +resultOp = dpf.Operator("lsdyna::moddynout::TimeFreqSupportProvider")
    +resultOp.inputs.data_sources(ds)
    +result = resultOp.outputs.time_freq_support()
    +
    +
    +
  • +
  • lsdyna::moddynout::result_info_provider

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./moddynout', 'moddynout')
    +
    +resultInfoOp = dpf.Operator("lsdyna::moddynout::result_info_provider")
    +resultInfoOp.inputs.data_sources(ds)
    +result_info = resultInfoOp.outputs.result_info()
    +
    +
    +
  • +
  • lsdyna::moddynout::F

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./moddynout', 'moddynout')
    +
    +times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    +disOp = dpf.Operator("lsdyna::moddynout::F")
    +disOp.inputs.data_sources(ds)
    +disOp.inputs.time_scoping(times)
    +fields = disOp.outputs.moddynout_force()
    +
    +
    +
  • +
  • lsdyna::moddynout::A

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./moddynout', 'moddynout')
    +
    +times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    +disOp = dpf.Operator("lsdyna::moddynout::A")
    +disOp.inputs.data_sources(ds)
    +disOp.inputs.time_scoping(times)
    +fields = disOp.outputs.moddynout_acceleration()
    +
    +
    +
  • +
  • lsdyna::moddynout::V

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./moddynout', 'moddynout')
    +
    +times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    +disOp = dpf.Operator("lsdyna::moddynout::V")
    +disOp.inputs.data_sources(ds)
    +disOp.inputs.time_scoping(times)
    +fields = disOp.outputs.moddynout_velocity()
    +
    +
    +
  • +
  • lsdyna::moddynout::U

    +
    from ansys.dpf import core as dpf
    +
    +ds = dpf.DataSources()
    +ds.set_result_file_path(r'./moddynout', 'moddynout')
    +
    +times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
    +disOp = dpf.Operator("lsdyna::moddynout::U")
    +disOp.inputs.data_sources(ds)
    +disOp.inputs.time_scoping(times)
    +fields = disOp.outputs.moddynout_disp()
    +
    +
    +
  • +
+
+
+ + +
+ + + +
+ + + +
+ +
+ +
+ On this page +
+ +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/Resources/pydyna_pre.html b/version/0.2/Resources/pydyna_pre.html new file mode 100644 index 000000000..ba07817f8 --- /dev/null +++ b/version/0.2/Resources/pydyna_pre.html @@ -0,0 +1,773 @@ + + + + + + + + + PyDyna-pre — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

PyDyna-pre#

+

The PyDyna-pre provide the ability to create keyword inputdeck through gRPC framework.

+
+

Running pyDyna-pre in virtualenv#

+

virtualenv is a CLI tool that needs a Python interpreter to run.

+
+

Install virtualenv#

+
pip install virtualenv
+
+
+

Create a Python virtual environment of the same version as virtualenv, installed into the subdirectory venv.

+
virtualenv venv
+
+
+

Activate venv on Windows by running command:

+
cd venv
+./Scripts/activate
+
+
+

Activate venv on Linux by running command:

+
cd venv
+source bin/activate
+
+
+
+
+

Copy pyDyna package in venv folder#

+
venv/
+    pyDyna/
+              ansys
+                       /dyna/pre/Server
+                  doc
+                  examples
+                  .flake8
+                  LICENSE
+                  ...
+
+
+
+
+
+

Requirements#

+

Go to pyDyna/requirements/pythonxx according to your Python version. +Then running command:

+
cd pyDyna/requirement/pythonxx
+pip install -r requirements.txt
+
+
+
+
+

Starting the server#

+

So far, Python 3.8/3.9 is used to start server, make sure this like below:

+
(venv) C:\pyDyna\examples\pre> C:\python38\python.exe --version
+Python 3.8.10
+
+
+
+

Here is the minimal content in server folder#

+
Server/
+      kwserver.py
+      kwprocess_pb2.py
+      kwprocess_pb2_grpc.py
+          lib/
+             linux/
+                       keywordreader.so
+         windows/
+               cp38/keywordreader.pyd
+               cp39/keywordreader.pyd
+
+
+
+
+

Starting the server on Windows#

+

Start server by running command:

+
shell
+(venv) C:\pyDyna\ansys\dyna\pre\Server> python .\kwserver.py
+kwgrpc Server listening on: localhost:50051
+
+
+
+
+

Starting the server on Linux#

+

Start server by running command:

+
(venv) :~/pyDyna/ansys/dyna/pre/Server> python kwserver.py
+
+
+
+
+
+

Running pyDyna-pre client#

+

See the examples in the examples folder for some basic example. More to be added later.

+
+

Structure ALE demo#

+

Go to pyDyna/examples/pre,and run sale_efp.py:

+
(venv) C:\pyDyna\examples\pre> python .\sale_efp.py
+2022-07-05 08:19:42 :  Connected to kwServer...
+2022-07-05 08:19:42 :  C:\pyDyna\examples\pre\input\sale\input\efpcase.k uploaded to server...
+2022-07-05 08:19:43 :  Setup Analysis...
+2022-07-05 08:19:43 :  Material air Created...
+2022-07-05 08:19:43 :  Material air Created...
+2022-07-05 08:19:43 :  Material HE Created...
+2022-07-05 08:19:43 :  Material HE Created...
+2022-07-05 08:19:43 :  Material liner Created...
+2022-07-05 08:19:43 :  Material liner Created...
+2022-07-05 08:19:43 :  Material vacuum Created...
+2022-07-05 08:19:43 :  Material vacuum Created...
+2022-07-05 08:19:43 :  ALE Structured mesh 1 Created...
+2022-07-05 08:19:43 :  Material air filled in Mesh 1...
+2022-07-05 08:19:43 :  Material HE filled in Mesh 1...
+2022-07-05 08:19:43 :  Material liner filled in Mesh 1...
+2022-07-05 08:19:43 :  Location of high explosive detonation Defined...
+2022-07-05 08:19:43 :  Output Setting...
+2022-07-05 08:19:43 :  efpcase.k is outputed...
+
+
+

At the same time, corresponding information is printed in the server side.

+
Load model: C:\pyDyna\ansys\dyna\pre\Server\input\efpcase.k
+*DATABASE_SALE Created...
+Termination Created...
+DB Binary Created...
+*CONTROL_ALE Created...
+*EOS_LINEAR_POLYNOMIAL Created...
+*MAT_NULL Created...
+*ALE_STRUCTURED_MULTI-MATERIAL_GROUP Created...
+*MAT_HIGH_EXPLOSIVE_BURN Created...
+*EOS_JWL Created...
+*ALE_STRUCTURED_MULTI-MATERIAL_GROUP Created...
+*MAT_JOHNSON_COOK Created...
+*EOS_GRUNEISEN Created...
+*ALE_STRUCTURED_MULTI-MATERIAL_GROUP Created...
+*MAT_VACUUM Created...
+*ALE_STRUCTURED_MULTI-MATERIAL_GROUP Created...
+*ALE_STRUCTURED_MESH_CONTROL_POINTS Created...
+*ALE_STRUCTURED_MESH_CONTROL_POINTS Created...
+*ALE_STRUCTURED_MESH_CONTROL_POINTS Created...
+*ALE_STRUCTURED_MESH Created...
+*ALE_STRUCTURED_MESH_VOLUME_FILLING Created...
+*ALE_STRUCTURED_MESH_VOLUME_FILLING Created...
+*ALE_STRUCTURED_MESH_VOLUME_FILLING Created...
+*INITIAL_DETONATION Created...
+Database MATSUMCreated...
+Database GLSTATCreated...
+Saved Successfully!
+
+
+

After running this file, the result file is saved in pyDyna/ansys/dyna/pre/Server/output.

+
(venv) C:\pyDyna\ansys\dyna\pre\Server> cd .\output\
+(venv) C:\pyDyna\ansys\dyna\pre\Server\output> ls
+
+
+    Directory: C:\pyDyna\ansys\dyna\pre\Server\output
+
+
+Mode                 LastWriteTime         Length Name
+----                 -------------         ------ ----
+-a----          2022/7/5      8:19        2436058 efpcase.k
+
+
+

Submit the result file, efpcase.k, to LS-Dyna for simulation results.

+
+
+
+ + +
+ + + +
+ + + + + + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/Resources/pydyna_solver.html b/version/0.2/Resources/pydyna_solver.html new file mode 100644 index 000000000..92a67012b --- /dev/null +++ b/version/0.2/Resources/pydyna_solver.html @@ -0,0 +1,577 @@ + + + + + + + + + PyDyna-solver — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

PyDyna-solver#

+

Here is a quick preview for how Python code looks using the +pyansys-DynaSolver. For more examples, click the links at the +top of the page to see function, method, and class documentation.

+
+

Rendered Python code#

+
>>> import ansys.dyna.core.solver as solver
+>>> hostname="localhost"
+>>> port="5000"
+>>> dyna=solver.DynaSolver(hostname,port)
+>>> dyna.push("input.k")
+>>> dyna.start(3)
+>>> dyna.run("i=input.k")
+
+
+
+
+

Usage#

+

Here is a basic example:

+
>>> import ansys.dyna.core.solver as solver
+>>> dyna=solver.DynaSovler(hostname,port)           # connect to the container
+>>> dyna.push("input.k")                            # push an input file
+>>> dyna.start(4)                                   # start 4 ranks of mppdyna
+>>> dyna.run("i=input.k memory=10m ncycle=20000")   # begin execution
+
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ +
+ On this page +
+ +
+ +
+ + +
+ + + + + +
+ + +
+ + +
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/version/0.2/_downloads/01b6df1ec9cd32ead9c564bb774475f2/em_railgun.py b/version/0.2/_downloads/01b6df1ec9cd32ead9c564bb774475f2/em_railgun.py new file mode 100644 index 000000000..5c59fdaf3 --- /dev/null +++ b/version/0.2/_downloads/01b6df1ec9cd32ead9c564bb774475f2/em_railgun.py @@ -0,0 +1,94 @@ +""" +Railgun example +=============== + +This example demonstrates how to create an EM Railgun input deck. \n +LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe +""" + +import os +import sys + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaem import ( + DynaEM, + Circuit, + CircuitType, + SegmentSet, + NodeSet, + Curve, + SolidPart, + SolidFormulation, + EMContact, + BEMSOLVER, + FEMSOLVER, +) +from ansys.dyna.core.pre.dynamaterial import MatElastic, MatRigid, EMMATTYPE +from em_railgun_data import * +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/em/railgun.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +em_solution = DynaSolution(hostname) +fns = [] +path = examples.em_railgun + os.sep +fns.append(path + "em_railgun.k") +em_solution.open_files(fns) +em_solution.set_termination(termination_time=3e-4) +em_solution.create_database_binary(dt=5e-6) + +railgun = DynaEM() +em_solution.add(railgun) + +railgun.analysis.set_timestep(timestep=5e-6) +railgun.analysis.set_solver_bem(solver=BEMSOLVER.PCG) +railgun.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3) + +circuit = Circuit( + circuit_type=CircuitType.IMPOSED_CURRENT_VS_TIME, + loadcurve=Curve(x=[0, 8e-5, 2e-4, 4e-4, 6e-4, 1e-3], y=[0, 350, 450, 310, 230, 125], sfo=2e6), +) +circuit.set_current( + current=SegmentSet(cur), current_inlet=SegmentSet(inlet), current_outlet=SegmentSet(outlet) +) +railgun.add(circuit) + +matelastic = MatElastic(mass_density=2.64e-3, young_modulus=9.7e10, poisson_ratio=0.31) +matelastic.set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=25) +matrigid = MatRigid( + mass_density=2.64e-3, + young_modulus=9.7e10, + poisson_ratio=0.31, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, +) +matrigid.set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=25) + +coil = SolidPart(1) +coil.set_material(matelastic) +coil.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +railgun.parts.add(coil) + +workpiece1 = SolidPart(2) +workpiece1.set_material(matrigid) +workpiece1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +railgun.parts.add(workpiece1) + +workpiece2 = SolidPart(3) +workpiece2.set_material(matrigid) +workpiece2.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +railgun.parts.add(workpiece2) + +railgun.boundaryconditions.create_spc(NodeSet(spc1), tx=False, ty=False, rz=False, death=0) +railgun.boundaryconditions.create_spc(NodeSet(spc2), tx=False, ty=False, rz=False, death=0) + +contact = EMContact() +railgun.contacts.add(contact) + +railgun.set_rogowsky_coil_to_output_current(SegmentSet(cur)) + +em_solution.save_file() diff --git a/version/0.2/_downloads/046d4d313d5188fa9460293f1dd63709/icfd_imposed_move.ipynb b/version/0.2/_downloads/046d4d313d5188fa9460293f1dd63709/icfd_imposed_move.ipynb new file mode 100644 index 000000000..627bdb528 --- /dev/null +++ b/version/0.2/_downloads/046d4d313d5188fa9460293f1dd63709/icfd_imposed_move.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Imposed move\n============\n\nThis example shows how to impose the displacements on the fluid nodes\nthrough the use of the ICFD\\_CONTROL\\_IMPOSED\\_MOVE keyword.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n Curve\n )\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.imposed_move + os.sep\nfns.append(path + \"imposed_move.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\npart_wall.set_imposed_move(vy=Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"))\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.5)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/08db71af516e6691624b6c94a375f3e4/icfd_weak_fsi.ipynb b/version/0.2/_downloads/08db71af516e6691624b6c94a375f3e4/icfd_weak_fsi.ipynb new file mode 100644 index 000000000..a84009f26 --- /dev/null +++ b/version/0.2/_downloads/08db71af516e6691624b6c94a375f3e4/icfd_weak_fsi.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Weak FSI\n========\n\nThis example shows a simple FSI coupling problem using\nweak/loose/explicit FSI.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n ShellPart,\n ShellFormulation,\n PartSet,\n Curve,\n DOF,\n Motion\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.weak_fsi + os.sep\nfns.append(path + \"weak_fsi.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfd.set_timestep(tssfac=0.9,max_timestep=Curve(x=[0,10000],y=[0.05,0.05]))\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfdanalysis.set_fsi()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.set_fsi()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\n#define rigid cylinder\nmatrigid = MatRigid(mass_density=1000,young_modulus=2e11,poisson_ratio=0.3)\ncylinder = ShellPart(1)\ncylinder.set_material(matrigid)\ncylinder.set_element_formulation(ShellFormulation.PLANE_STRESS)\nicfd.parts.add(cylinder)\n# Define boundary conddition\nicfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY)\n\nsolution.create_database_binary(dt=0.2)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/0bebc1965dcd336d66ec58ea993ac83d/icfd_mesh_adaptivity.ipynb b/version/0.2/_downloads/0bebc1965dcd336d66ec58ea993ac83d/icfd_mesh_adaptivity.ipynb new file mode 100644 index 000000000..88bc16432 --- /dev/null +++ b/version/0.2/_downloads/0bebc1965dcd336d66ec58ea993ac83d/icfd_mesh_adaptivity.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Mesh Adaptivity\n===============\n\nThis example shows a simple ICFD problem with adaptivity.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.mesh_adaptivity + os.sep\nfns.append(path + \"mesh_adaptivity.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfdanalysis.set_mesh_adaptivity(min_mesh_size=0.02,max_mesh_size=0.2,max_perceptual_error=2,num_iteration=10)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=2)\nicfd.parts.add(part_wall)\n\npart_meshsize = ICFDPart(5)\npart_meshsize.set_material(mat)\nicfd.parts.add(part_meshsize)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.5)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/159000bd92c38d9ab85730d1e86278c1/icfd_sloshing.py b/version/0.2/_downloads/159000bd92c38d9ab85730d1e86278c1/icfd_sloshing.py new file mode 100644 index 000000000..0f9fa12af --- /dev/null +++ b/version/0.2/_downloads/159000bd92c38d9ab85730d1e86278c1/icfd_sloshing.py @@ -0,0 +1,86 @@ +""" +Sloshing +======== + +This example shows how to directly impose a displacement of the entire volume mesh through the use of the keyword ICFD_CONTROL_IMPOSED_MOVE.\n +LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Curve, + Gravity, + GravityOption, + Compressible + ) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/sloshing.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.sloshing + os.sep +fns.append(path + "sloshing.k") +solution.open_files(fns) +solution.set_termination(termination_time=1) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.02) +icfd.add(icfdanalysis) + +# define model +mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001) +mat2 = MatICFD(flag=Compressible.VACUUM) + +part_bottom = ICFDPart(1) +part_bottom.set_material(mat1) +part_bottom.set_non_slip() +icfd.parts.add(part_bottom) + +part_top = ICFDPart(2) +part_top.set_material(mat2) +part_top.set_non_slip() +icfd.parts.add(part_top) + +part_mid = ICFDPart(3) +part_mid.set_material(mat1) +icfd.parts.add(part_mid) + +g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 10000], y=[9.81, 9.81])) +icfd.add(g) + +icfd.set_imposed_move(vx=Curve(x=[0, 0.5, 0.52, 0.8, 0.82, 2.0], y=[1, 1, -1, -1, 0, 0])) + +partvol_bottom = ICFDVolumePart(surfaces=[1, 3]) +partvol_bottom.set_material(mat1) +icfd.parts.add(partvol_bottom) + +partvol_top = ICFDVolumePart(surfaces=[2, 3]) +partvol_top.set_material(mat2) +icfd.parts.add(partvol_top) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2]) +meshvol.set_fluid_interfaces([3]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.02) +solution.save_file() diff --git a/version/0.2/_downloads/16cf40ce4d4ac8d2cbca5d523cf7639b/camry_rc.ipynb b/version/0.2/_downloads/16cf40ce4d4ac8d2cbca5d523cf7639b/camry_rc.ipynb new file mode 100644 index 000000000..bee6500f0 --- /dev/null +++ b/version/0.2/_downloads/16cf40ce4d4ac8d2cbca5d523cf7639b/camry_rc.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Crash example\n=============\n\nThis example demonstrates how to create a simple crash input deck.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n Curve,\n BeamPart,\n ShellPart,\n NodeSet,\n PartSet,\n TimestepCtrol,\n Contact,\n ContactType,\n ContactCategory,\n ContactSurface,\n DOF,\n OffsetType,\n)\nfrom ansys.dyna.core.pre.dynamaterial import (\n MatNull,\n MatRigid,\n MatSpotweld,\n MatModifiedPiecewiseLinearPlasticity,\n MatPiecewiseLinearPlasticity,\n)\nfrom camry_rc_data import *\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\ncamry_solution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.camry_rc + os.sep\nfns.append(path + \"Camry_RC_main.k\")\nfns.append(path + \"501_RIG_BAR_roof_crush_platen5.key\")\nfns.append(path + \"Camry_V1_NoSusAndPowerTrain_impl7.k\")\nfns.append(path + \"Camry_V1_NoSusAndPowerTrain_impl7_nodes.k\")\nfns.append(path + \"roof_welds.k\")\nfns.append(path + \"weld7.k\")\nfns.append(path + \"xtra_sw.k\")\ncamry_solution.open_files(fns)\n\n# global setting\ncamry_solution.set_termination(10)\ncamry_solution.create_database_binary(dt=0.001)\n\ncamry = DynaMech()\ncamry_solution.add(camry)\n\ncamry.implicitanalysis.set_timestep(\n control_flag=TimestepCtrol.AUTOMATICALLY_ADJUST_TIMESTEP_SIZE,\n Optimum_equilibrium_iteration_count=511,\n)\ncamry.implicitanalysis.set_dynamic(gamma=0.6, beta=0.38)\ncamry.implicitanalysis.set_eigenvalue()\ncamry.implicitanalysis.set_solution(\n stiffness_reformation_limit=55, absolute_convergence_tolerance=-100\n)\n\n# create material\nmatnull = MatNull(mass_density=6e-11)\nmatrigid = MatRigid(mass_density=7.890e-09, young_modulus=2.100e05, poisson_ratio=0.3)\nmatplaten = MatRigid(\n mass_density=7.80e-09,\n young_modulus=2.00e05,\n poisson_ratio=0.3,\n center_of_mass_constraint=1,\n rotational_constraint=7,\n)\nspotweldharden2100 = MatSpotweld(\n mass_density=7.850e-09,\n young_modulus=2.100e05,\n poisson_ratio=0.3,\n yield_stress=510,\n plastic_hardening_modulus=2100,\n)\nspotweldharden2200 = MatSpotweld(\n mass_density=7.850e-09,\n young_modulus=2.100e05,\n poisson_ratio=0.3,\n yield_stress=510,\n plastic_hardening_modulus=2200,\n)\nwindowshield = MatModifiedPiecewiseLinearPlasticity(\n mass_density=2.355e-09,\n young_modulus=7.000e04,\n poisson_ratio=0.22,\n yield_stress=30,\n tangent_modulus=1400,\n plastic_strain_to_failure=0.015,\n integration_points_number=1,\n)\nwindowsrear = MatModifiedPiecewiseLinearPlasticity(\n mass_density=2.425e-09,\n young_modulus=7.000e04,\n poisson_ratio=0.22,\n yield_stress=30,\n tangent_modulus=1400,\n plastic_strain_to_failure=0.015,\n integration_points_number=1,\n)\nplastic300 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=300, tangent_modulus=5000\n)\nplastic250 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=250, tangent_modulus=5000\n)\nplastic360 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=360, tangent_modulus=5000\n)\nplastic180 = MatPiecewiseLinearPlasticity(\n mass_density=7.850e-09, young_modulus=210000, yield_stress=180, tangent_modulus=5000\n)\nplastic450 = MatPiecewiseLinearPlasticity(\n mass_density=7.850e-09, young_modulus=210000, yield_stress=450, tangent_modulus=5000\n)\nplastic1300 = MatPiecewiseLinearPlasticity(\n mass_density=7.850e-09, young_modulus=210000, yield_stress=1300, tangent_modulus=5000\n)\nplastic400 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=400, tangent_modulus=5000\n)\nplastic500 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=500, tangent_modulus=5000\n)\nplastic675 = MatPiecewiseLinearPlasticity(\n mass_density=7.850e-09, young_modulus=210000, yield_stress=675, tangent_modulus=5000\n)\nplastic310 = MatPiecewiseLinearPlasticity(\n mass_density=2.255e-09, young_modulus=70000, yield_stress=310, tangent_modulus=5000\n)\nplastic220 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=5000\n)\nplastic220_410 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=410\n)\n\n# set model\nfor bpart in beamparts:\n part = BeamPart(bpart[0])\n if part.id in [50000002]:\n part.set_material(spotweldharden2200)\n else:\n part.set_material(spotweldharden2100)\n part.set_element_formulation(bpart[1])\n part.set_diameter(bpart[2])\n camry.parts.add(part)\n\nfor spart in shellparts:\n part = ShellPart(spart[0])\n if part.id in [1463, 1464]:\n part.set_material(matnull)\n elif part.id in [417, 419, 530, 532, 585, 586, 587, 588]:\n part.set_material(matrigid)\n elif part.id in [50000001]:\n part.set_material(matplaten)\n elif part.id in [290]:\n part.set_material(windowshield)\n elif part.id in [291]:\n part.set_material(windowsrear)\n elif part.id in partswithmat300:\n part.set_material(plastic300)\n elif part.id in partswithmat250:\n part.set_material(plastic250)\n elif part.id in partswithmat360:\n part.set_material(plastic360)\n elif part.id in partswithmat180:\n part.set_material(plastic180)\n elif part.id in partswithmat450:\n part.set_material(plastic450)\n elif part.id in partswithmat400:\n part.set_material(plastic400)\n elif part.id in partswithmat500:\n part.set_material(plastic500)\n elif part.id in [57]:\n part.set_material(plastic1300)\n elif part.id in [286]:\n part.set_material(plastic675)\n elif part.id in [5000000]:\n part.set_material(plastic310)\n elif part.id in [5000006]:\n part.set_material(plastic220)\n elif part.id in [5000007]:\n part.set_material(plastic220_410)\n else:\n pass\n part.set_element_formulation(spart[1])\n part.set_thickness(spart[2])\n camry.parts.add(part)\n\n# define constrained\nfor sw in spotweld:\n camry.constraints.create_spotweld(nodeid1=sw[0], nodeid2=sw[1])\n\nfor cnrb in cnrbs:\n camry.constraints.create_cnrb(nodeset=NodeSet(cnrb))\n\n# define contact\nselfcontact = Contact(type=ContactType.AUTOMATIC)\nselfcontact.set_mortar()\nselfcontact.set_friction_coefficient(static=0.2)\nsurf1 = ContactSurface(PartSet(vehicle))\nselfcontact.set_slave_surface(surf1)\ncamry.contacts.add(selfcontact)\n\nplatebiw = Contact(type=ContactType.AUTOMATIC, category=ContactCategory.SURFACE_TO_SURFACE_CONTACT)\nplatebiw.set_mortar()\nplatebiw.set_friction_coefficient(static=0.2, dynamic=0.2)\nsurf1 = ContactSurface(PartSet(biw))\nsurf2 = ContactSurface(PartSet(platen))\nplatebiw.set_slave_surface(surf1)\nplatebiw.set_master_surface(surf2)\ncamry.contacts.add(platebiw)\n\nswcontact = Contact(\n type=ContactType.TIED,\n category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT,\n offset=OffsetType.CONSTRAINED_OFFSET,\n)\nspotweldbeam = ContactSurface(PartSet(spotweldbeams))\nspotweldbeam.set_contact_thickness(thickness=-0.9)\nspotweldsurface = ContactSurface(PartSet(spotweldsurfaces))\nspotweldsurface.set_contact_thickness(thickness=-0.9)\nswcontact.set_slave_surface(spotweldbeam)\nswcontact.set_master_surface(spotweldsurface)\ncamry.contacts.add(swcontact)\n\n# define boundary\ncamry.boundaryconditions.create_spc(NodeSet(spc))\n\ncrv = Curve(\n x=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9.77, 100],\n y=[0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 127, 127],\n)\nplaten = PartSet([50000001])\ncamry.boundaryconditions.create_imposed_motion(\n platen, crv, dof=DOF.X_TRANSLATIONAL, scalefactor=-0.0802216\n)\ncamry.boundaryconditions.create_imposed_motion(\n platen, crv, dof=DOF.Y_TRANSLATIONAL, scalefactor=-0.0802216\n)\ncamry.boundaryconditions.create_imposed_motion(\n platen, crv, dof=DOF.Z_TRANSLATIONAL, scalefactor=-0.0802216\n)\n\ncamry_solution.set_output_database(\n elout=0.0001,\n glstat=0.0001,\n matsum=0.0001,\n nodout=0.0001,\n rbdout=0.0001,\n rcforc=0.0001,\n secforc=0.0001,\n)\n\ncamry_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/1a101a54ffa1198a500f49c824112a6f/icfd_cylinderflow.py b/version/0.2/_downloads/1a101a54ffa1198a500f49c824112a6f/icfd_cylinderflow.py new file mode 100644 index 000000000..2f9f1c3c1 --- /dev/null +++ b/version/0.2/_downloads/1a101a54ffa1198a500f49c824112a6f/icfd_cylinderflow.py @@ -0,0 +1,82 @@ +""" +Cylinder flow example +===================== + +This example demonstrates how to create a simple ICFD cylinder flow input deck. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + ICFDAnalysis, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/cylinderflow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +icfd_solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.cylinder_flow + os.sep +fns.append(path + "cylinder_flow.k") +icfd_solution.open_files(fns) +# Set total time of simulation +icfd_solution.set_termination(termination_time=100) + +icfd = DynaICFD() +icfd_solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +icfd_solution.create_database_binary(dt=1) +icfd_solution.save_file() diff --git a/version/0.2/_downloads/1b07d385edd589ef392e67420f635f1d/icfd_dam_break.ipynb b/version/0.2/_downloads/1b07d385edd589ef392e67420f635f1d/icfd_dam_break.ipynb new file mode 100644 index 000000000..e2d2779e9 --- /dev/null +++ b/version/0.2/_downloads/1b07d385edd589ef392e67420f635f1d/icfd_dam_break.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Dam break\n=========\n\nThis example shows a simple free surface example using the ICFD solver.\nA column of water collapses under the load of gravity.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n Gravity,\n GravityOption,\n Compressible\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.dam_break + os.sep\nfns.append(path + \"dam_break.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=50)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001)\nmat2 = MatICFD(flag=Compressible.VACUUM)\n\npart1 = ICFDPart(1)\npart1.set_material(mat1)\npart1.set_free_slip()\nicfd.parts.add(part1)\n\npart2 = ICFDPart(2)\npart2.set_material(mat2)\npart2.set_free_slip()\nicfd.parts.add(part2)\n\npart3 = ICFDPart(3)\npart3.set_material(mat1)\nicfd.parts.add(part3)\n\ng = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[9.81, 9.81]))\nicfd.add(g)\n\npartvol1 = ICFDVolumePart(surfaces=[1, 3])\npartvol1.set_material(mat1)\nicfd.parts.add(partvol1)\n\npartvol2 = ICFDVolumePart(surfaces=[2, 3])\npartvol2.set_material(mat2)\nicfd.parts.add(partvol2)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2])\nmeshvol.set_fluid_interfaces([3])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.2)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/1ec155e34236e6b4c74f471b0380b354/rigidtest.ipynb b/version/0.2/_downloads/1ec155e34236e6b4c74f471b0380b354/rigidtest.ipynb new file mode 100644 index 000000000..7d45ed20e --- /dev/null +++ b/version/0.2/_downloads/1ec155e34236e6b4c74f471b0380b354/rigidtest.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Rigid test example\n==================\n\nThis example show how to create an ISPH model with Pydyna-pre module.\n\nLS-DYNA version :\nls-dyna\\_mpp\\_d\\_R13.0\\_365-gf8a97bda2a\\_winx64\\_ifort190\\_msmpi.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamaterial import (\n MatRigid,\n MatSPHIncompressibleFluid,\n MatSPHIncompressibleStructure,\n)\nfrom ansys.dyna.core.pre.dynaisph import (\n DynaISPH,\n Box,\n Point,\n Curve,\n PartSet,\n ShellPart,\n ShellFormulation,\n ISPHStructPart,\n ISPHFluidPart,\n DOF,\n Motion,\n Gravity,\n GravityOption,\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nisphsolution = DynaSolution(hostname)\nfns = []\npath = examples.isph_rigidtest + os.sep\nfns.append(path + \"rigidtest.k\")\nisphsolution.open_files(fns)\n\nisphsolution.set_termination(0.5)\n\nisphobj = DynaISPH()\nisphsolution.add(isphobj)\n\nisphobj.set_timestep(\n tssfac=1, max_timestep=Curve(x=[0, 0.04, 0.05, 0.1, 100], y=[0.5, 0.5, 1, 1, 1])\n)\nisphobj.isphanalysis.set_box(Box(-750, 800, -800, 800, -100, 3000))\n\nplatemat1 = MatRigid(\n mass_density=1e-9,\n young_modulus=10,\n center_of_mass_constraint=1,\n translational_constraint=5,\n rotational_constraint=4,\n)\nplatemat2 = MatRigid(\n mass_density=1e-9,\n young_modulus=10,\n center_of_mass_constraint=1,\n translational_constraint=7,\n rotational_constraint=7,\n)\n# platemat3 = MatRigid(mass_density=1e-9,young_modulus=10)\n# matelastic = MatElastic(mass_density=1e-9,young_modulus=1)\nmatsphfluid = MatSPHIncompressibleFluid(\n mass_density=1e-9, dynamic_viscosity=1e-9, tension_coefficient1=1e6, tension_coefficient2=1000\n)\nmatsphstruct = MatSPHIncompressibleStructure(mass_density=1e-9)\n\nsensorplane = ShellPart(1)\nsensorplane.set_material(platemat2)\nsensorplane.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nsensorplane.set_thickness(0.1)\nisphobj.parts.add(sensorplane)\n\nmovingcube = ShellPart(7)\nmovingcube.set_material(platemat1)\nmovingcube.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nmovingcube.set_thickness(0.1)\nisphobj.parts.add(movingcube)\n\nwallsmesh = ShellPart(8)\nwallsmesh.set_material(platemat2)\nwallsmesh.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nwallsmesh.set_thickness(0.1)\nisphobj.parts.add(wallsmesh)\n\nsphwall = ISPHStructPart(4, PartSet([8]), 12)\nsphwall.set_material(matsphstruct)\nsphwall.set_smoothing_length(1, 1, 1, 12)\nisphobj.parts.add(sphwall)\n\nsphcube = ISPHStructPart(5, PartSet([7]), 12)\nsphcube.set_material(matsphstruct)\nsphcube.set_smoothing_length(1, 1, 1, 12)\nisphobj.parts.add(sphcube)\n\nsphwater = ISPHFluidPart(6, Point(-588, -588, 9), Point(1176, 1176, 204), 98, 98, 17)\nsphwater.set_material(matsphfluid)\nsphwater.set_smoothing_length(1, 1, 1, 12)\nsphwater.create_massflow_plane(PartSet([1]))\nisphobj.parts.add(sphwater)\n\n# Constraint\nisphobj.constraints.merge_two_rigid_bodies(7, 1)\n\n# Define boundary conddition\nisphobj.boundaryconditions.create_imposed_motion(\n PartSet([7]),\n Curve(x=[0, 0.1, 0.11, 20], y=[3000, 3000, 0, 0]),\n dof=DOF.X_TRANSLATIONAL,\n motion=Motion.VELOCITY,\n)\nisphobj.boundaryconditions.create_imposed_motion(\n PartSet([7]),\n Curve(x=[0, 0.1, 0.11, 20], y=[500, 500, 500, 500]),\n dof=DOF.Z_ROTATIONAL,\n motion=Motion.VELOCITY,\n scalefactor=0.01,\n)\n\n# Load\ng = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 100], y=[9810, 9810]))\nisphobj.add(g)\n\nisphsolution.set_output_database(glstat=0.001, sphmassflow=0.001)\nisphsolution.create_database_binary(dt=0.01)\nisphsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/220449ba0d8ffa6e2f805998039f9539/icfd_dam_break.py b/version/0.2/_downloads/220449ba0d8ffa6e2f805998039f9539/icfd_dam_break.py new file mode 100644 index 000000000..6d3209572 --- /dev/null +++ b/version/0.2/_downloads/220449ba0d8ffa6e2f805998039f9539/icfd_dam_break.py @@ -0,0 +1,82 @@ +""" +Dam break +========= + +This example shows a simple free surface example using the ICFD solver. A column of water collapses under the load of gravity. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Gravity, + GravityOption, + Compressible +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/dam_break.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.dam_break + os.sep +fns.append(path + "dam_break.k") +solution.open_files(fns) +solution.set_termination(termination_time=50) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001) +mat2 = MatICFD(flag=Compressible.VACUUM) + +part1 = ICFDPart(1) +part1.set_material(mat1) +part1.set_free_slip() +icfd.parts.add(part1) + +part2 = ICFDPart(2) +part2.set_material(mat2) +part2.set_free_slip() +icfd.parts.add(part2) + +part3 = ICFDPart(3) +part3.set_material(mat1) +icfd.parts.add(part3) + +g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[9.81, 9.81])) +icfd.add(g) + +partvol1 = ICFDVolumePart(surfaces=[1, 3]) +partvol1.set_material(mat1) +icfd.parts.add(partvol1) + +partvol2 = ICFDVolumePart(surfaces=[2, 3]) +partvol2.set_material(mat2) +icfd.parts.add(partvol2) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2]) +meshvol.set_fluid_interfaces([3]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.2) +solution.save_file() diff --git a/version/0.2/_downloads/25de11a0620151df3876302373b85a20/icfd_internal_3d_flow.py b/version/0.2/_downloads/25de11a0620151df3876302373b85a20/icfd_internal_3d_flow.py new file mode 100644 index 000000000..72a2ffcbf --- /dev/null +++ b/version/0.2/_downloads/25de11a0620151df3876302373b85a20/icfd_internal_3d_flow.py @@ -0,0 +1,79 @@ +""" +Internal 3D flow +================ + +This example shows a simple 3D ICFD problem. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ICFD_SurfRemeshMethod +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/internal_3d_flow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.internal_3d_flow + os.sep +fns.append(path + "internal_3d_flow.k") +solution.open_files(fns) +solution.set_termination(termination_time=10) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(timestep=0.05) +icfdanalysis.set_volume_mesh(mesh_growth_scale_factor=1.1) +icfdanalysis.set_surface_mesh(remesh_method = ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING) +icfd.add(icfdanalysis) +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +part_inflow.set_boundary_layer_symmetry_condition() +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +part_outflow.set_boundary_layer_symmetry_condition() +part_outflow.compute_flux() +icfd.parts.add(part_outflow) + +part_wall = ICFDPart(3) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.set_boundary_layer(2) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.2/_downloads/2987fa9c38b9ff89d53308f8acc39fad/icfd_strong_fsi.ipynb b/version/0.2/_downloads/2987fa9c38b9ff89d53308f8acc39fad/icfd_strong_fsi.ipynb new file mode 100644 index 000000000..c41f4c6fa --- /dev/null +++ b/version/0.2/_downloads/2987fa9c38b9ff89d53308f8acc39fad/icfd_strong_fsi.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Strong FSI\n==========\n\nThis example shows a simple FSI coupling problem using strong FSI.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n ShellPart,\n ShellFormulation,\n PartSet,\n Curve,\n DOF,\n Motion\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.strong_fsi + os.sep\nfns.append(path + \"strong_fsi.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfdanalysis.set_fsi()\nicfd.add(icfdanalysis)\n\nicfd.implicitanalysis.set_initial_timestep_size(\n size=10\n)\nicfd.implicitanalysis.set_dynamic(gamma=0.6, beta=0.4)\nicfd.implicitanalysis.set_solution(\n iteration_limit=100, stiffness_reformation_limit=150\n)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.set_fsi()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\n#define rigid cylinder\nmatrigid = MatRigid(mass_density=1.2,young_modulus=2e11,poisson_ratio=0.3)\ncylinder = ShellPart(1)\ncylinder.set_material(matrigid)\ncylinder.set_element_formulation(ShellFormulation.PLANE_STRESS)\nicfd.parts.add(cylinder)\n# Define boundary conddition\nicfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY)\n\nsolution.create_database_binary(dt=0.1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/2ea9b215ea6bbb3a321df65967122d5d/icfd_mesh_adaptivity.py b/version/0.2/_downloads/2ea9b215ea6bbb3a321df65967122d5d/icfd_mesh_adaptivity.py new file mode 100644 index 000000000..ad829c8ef --- /dev/null +++ b/version/0.2/_downloads/2ea9b215ea6bbb3a321df65967122d5d/icfd_mesh_adaptivity.py @@ -0,0 +1,85 @@ +""" +Mesh Adaptivity +=============== + +This example shows a simple ICFD problem with adaptivity. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/mesh_adaptivity.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.mesh_adaptivity + os.sep +fns.append(path + "mesh_adaptivity.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfdanalysis.set_mesh_adaptivity(min_mesh_size=0.02,max_mesh_size=0.2,max_perceptual_error=2,num_iteration=10) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=2) +icfd.parts.add(part_wall) + +part_meshsize = ICFDPart(5) +part_meshsize.set_material(mat) +icfd.parts.add(part_meshsize) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.5) +solution.save_file() diff --git a/version/0.2/_downloads/3120a704a273732a88354748305c8e04/icfd_weak_fsi.py b/version/0.2/_downloads/3120a704a273732a88354748305c8e04/icfd_weak_fsi.py new file mode 100644 index 000000000..642cd1f01 --- /dev/null +++ b/version/0.2/_downloads/3120a704a273732a88354748305c8e04/icfd_weak_fsi.py @@ -0,0 +1,100 @@ +""" +Weak FSI +======== + +This example shows a simple FSI coupling problem using weak/loose/explicit FSI. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ShellPart, + ShellFormulation, + PartSet, + Curve, + DOF, + Motion +) +from ansys.dyna.core.pre.dynamaterial import MatRigid +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/weak_fsi.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.weak_fsi + os.sep +fns.append(path + "weak_fsi.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfd.set_timestep(tssfac=0.9,max_timestep=Curve(x=[0,10000],y=[0.05,0.05])) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfdanalysis.set_fsi() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.set_fsi() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +#define rigid cylinder +matrigid = MatRigid(mass_density=1000,young_modulus=2e11,poisson_ratio=0.3) +cylinder = ShellPart(1) +cylinder.set_material(matrigid) +cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS) +icfd.parts.add(cylinder) +# Define boundary conddition +icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY) + +solution.create_database_binary(dt=0.2) +solution.save_file() diff --git a/version/0.2/_downloads/316dc8e808c890bbb2d9d3adafb25fac/icfd_mesh_morphing.py b/version/0.2/_downloads/316dc8e808c890bbb2d9d3adafb25fac/icfd_mesh_morphing.py new file mode 100644 index 000000000..9bd90490c --- /dev/null +++ b/version/0.2/_downloads/316dc8e808c890bbb2d9d3adafb25fac/icfd_mesh_morphing.py @@ -0,0 +1,90 @@ +""" +Mesh Morphing +============= + +This example shows a simple ICFD problem with mesh morphing. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/mesh_morphing.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.mesh_morphing + os.sep +fns.append(path + "mesh_morphing.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=2) +part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) +icfd.parts.add(part_wall) + +part_meshmorph = ICFDPart(5) +part_meshmorph.set_material(mat) +icfd.parts.add(part_meshmorph) + +partvol1 = ICFDVolumePart(surfaces=[1, 2, 3, 5]) +partvol1.set_material(mat) +icfd.parts.add(partvol1) +partvol2 = ICFDVolumePart(surfaces=[5, 4]) +partvol2.set_material(mat) +partvol2.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) +icfd.parts.add(partvol2) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +meshvol.set_fluid_interfaces([5]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.5) +solution.save_file() diff --git a/version/0.2/_downloads/3762eb96bf39f8b01034ec6d8e400a90/icfd_mesh_size.py b/version/0.2/_downloads/3762eb96bf39f8b01034ec6d8e400a90/icfd_mesh_size.py new file mode 100644 index 000000000..4264309b9 --- /dev/null +++ b/version/0.2/_downloads/3762eb96bf39f8b01034ec6d8e400a90/icfd_mesh_size.py @@ -0,0 +1,85 @@ +""" +Mesh size +========== + +This example shows a simple ICFD input deck with a coarse mesh. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/mesh_size.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.mesh_size + os.sep +fns.append(path + "mesh_size.k") +solution.open_files(fns) +solution.set_termination(termination_time=50) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=2) +icfd.parts.add(part_wall) + +part_meshsize = ICFDPart(5) +part_meshsize.set_material(mat) +icfd.parts.add(part_meshsize) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +meshvol.set_meshsize([5]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.2/_downloads/557451bf975d8f7c5fd2b858396c5b06/sale_efp.py b/version/0.2/_downloads/557451bf975d8f7c5fd2b858396c5b06/sale_efp.py new file mode 100644 index 000000000..2ca5f1f02 --- /dev/null +++ b/version/0.2/_downloads/557451bf975d8f7c5fd2b858396c5b06/sale_efp.py @@ -0,0 +1,100 @@ +""" +EFP Concrete Target +=================== + +This example demonstrates how to create a SALE input deck. \n +LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe +""" + +import os +import sys + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynasale import ( + DynaSALE, + ControlPoint, + AdvectionMethod, + StructuredMesh, + FillDirection, + Point, +) +from ansys.dyna.core.pre import dynamaterial as matDB +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/sale/efpcase.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +efp_solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.sale_efp + os.sep +fns.append(path + "efpcase.k") +efp_solution.open_files(fns) + +# set termination +efp_solution.set_termination(280) + +efp = DynaSALE() +efp_solution.add(efp) + +# set post result ouput interval +efp.set_output_interval(5.0) + +# set analysis type +efp.set_analysis_type(method=AdvectionMethod.VAN_LEER_WITH_HIS) + +# define mesh +control_points_x = [ + ControlPoint(number=1, position=0, ratio=1), + ControlPoint(number=11, position=-2.5, ratio=0.5), + ControlPoint(number=21, position=0, ratio=0.5), + ControlPoint(number=31, position=0, ratio=1), +] + +control_points_y = [ + ControlPoint(number=1, position=0, ratio=1), + ControlPoint(number=11, position=-2.5, ratio=0.5), + ControlPoint(number=21, position=0, ratio=0.5), + ControlPoint(number=31, position=0, ratio=1), +] + +control_points_z = [ + ControlPoint(number=1, position=0, ratio=0.5), + ControlPoint(number=269, position=11, ratio=0.25), + ControlPoint(number=309, position=21, ratio=0.25), + ControlPoint(number=339, position=0, ratio=5), +] + +mesh = StructuredMesh(control_points_x, control_points_y, control_points_z) +efp.add(mesh) + +# fill material +vacuum = matDB.Vacuum() +mesh.fill(vacuum) +air = matDB.Air() +mesh.fill(air, geometry_type="ALL", reference_pressure=1.01325e-6) +he = matDB.HighExplosive() +mesh.fill( + he, + geometry_type="PART", + define_geometry_parameters=[23], + inout=FillDirection.OUTSIDE_THE_GEOMETRY, +) +liner = matDB.Liner() +mesh.fill( + liner, + geometry_type="PART", + define_geometry_parameters=[22], + inout=FillDirection.OUTSIDE_THE_GEOMETRY, +) + +# Set the initial conditions +mesh.initial_detonation(Point(0, 0, 19.33)) + +# set outut datebase +efp_solution.set_output_database(matsum=0.2, glstat=0.2) + +# save file on server end +efp_solution.save_file() diff --git a/version/0.2/_downloads/641e8ca7397ddfb3c989598901785a70/frf_plate_damping.ipynb b/version/0.2/_downloads/641e8ca7397ddfb3c989598901785a70/frf_plate_damping.ipynb new file mode 100644 index 000000000..24190e031 --- /dev/null +++ b/version/0.2/_downloads/641e8ca7397ddfb3c989598901785a70/frf_plate_damping.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "FRF for a rectangular plate\n===========================\n\nThis example shows how to setup the keywords for FRF computation.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamaterial import MatElastic\nfrom ansys.dyna.core.pre.dynanvh import (\n DynaNVH,\n FrequencyDomain,\n ExcitationDOF,\n Curve,\n NodeSet,\n ShellPart,\n ShellFormulation,\n ResponseDOF,\n ResponseType,\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.nvh_frf_plate_damping + os.sep\nfns.append(path + \"frf_plate_damping.k\")\nsolution.open_files(fns)\n\nnvhobj = DynaNVH()\nsolution.add(nvhobj)\n\nnvhobj.implicitanalysis.set_initial_timestep_size(1.0)\nnvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100)\nnvhobj.implicitanalysis.set_solution(solution_method=1)\n\nfd = FrequencyDomain()\ncrv = Curve(\n x=[1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 200],\n y=[0, 0, 0.0045, 0.00713, 0.00386, 0.00328, 0.0034, 0.00624, 7.2e-4, 8.3e-4, 0, 0],\n)\nfd.set_frequency_response_function(\n excitation_input_set=NodeSet([131]),\n excitation_input_dof=ExcitationDOF.Z,\n max_natural_frequency=2000,\n modal_damping_coefficient_curve_type=1,\n modal_damping_coefficient_curve=crv,\n response_output_set=NodeSet([131, 651]),\n response_output_dof=ResponseDOF.Z,\n response_output_type=ResponseType.BASE_ACCELERATION,\n frf_output_min_frequency=1,\n frf_output_max_frequency=400,\n frf_output_num_frequency=400,\n)\nnvhobj.add(fd)\n\nmatelastic = MatElastic(mass_density=7870, young_modulus=2.07e11, poisson_ratio=0.292)\n\nboxshell = ShellPart(1)\nboxshell.set_material(matelastic)\nboxshell.set_element_formulation(ShellFormulation.SR_HUGHES_LIU)\nboxshell.set_thickness(0.002)\nboxshell.set_shear_factor(0.833)\nboxshell.set_printout(3)\nnvhobj.parts.add(boxshell)\n\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/69246894ad7ee81da23aebe12fa78d56/icfd_mesh_size.ipynb b/version/0.2/_downloads/69246894ad7ee81da23aebe12fa78d56/icfd_mesh_size.ipynb new file mode 100644 index 000000000..d0e98fc2a --- /dev/null +++ b/version/0.2/_downloads/69246894ad7ee81da23aebe12fa78d56/icfd_mesh_size.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Mesh size\n=========\n\nThis example shows a simple ICFD input deck with a coarse mesh.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.mesh_size + os.sep\nfns.append(path + \"mesh_size.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=50)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=2)\nicfd.parts.add(part_wall)\n\npart_meshsize = ICFDPart(5)\npart_meshsize.set_material(mat)\nicfd.parts.add(part_meshsize)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nmeshvol.set_meshsize([5])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/7234df4157bdc1351f6df25383a34811/icfd_imposed_move.py b/version/0.2/_downloads/7234df4157bdc1351f6df25383a34811/icfd_imposed_move.py new file mode 100644 index 000000000..e6f59f109 --- /dev/null +++ b/version/0.2/_downloads/7234df4157bdc1351f6df25383a34811/icfd_imposed_move.py @@ -0,0 +1,82 @@ +""" +Imposed move +============ + +This example shows how to impose the displacements on the fluid nodes through the use of the ICFD_CONTROL_IMPOSED_MOVE keyword. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Curve + ) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/imposed_move.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.imposed_move + os.sep +fns.append(path + "imposed_move.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.5) +solution.save_file() diff --git a/version/0.2/_downloads/742ba0a1cc9342277b608285746b2314/icfd_thermal_flow.ipynb b/version/0.2/_downloads/742ba0a1cc9342277b608285746b2314/icfd_thermal_flow.ipynb new file mode 100644 index 000000000..d026e2e1e --- /dev/null +++ b/version/0.2/_downloads/742ba0a1cc9342277b608285746b2314/icfd_thermal_flow.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Thermal flow\n============\n\nThis example shows a simple ICFD forced convection input deck with a\ncoarse mesh.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.thermal_flow + os.sep\nfns.append(path + \"thermal_flow.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=100)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005,heat_capacity = 1000,thermal_conductivity=200)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\npart_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[20, 20]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[80, 80]))\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\nicfd.parts.add(part_wall)\n\nicfd.set_initial(temperature=10)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3,4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/7b1802958cf339ccc8ce45783df382f0/frf_plate_damping.py b/version/0.2/_downloads/7b1802958cf339ccc8ce45783df382f0/frf_plate_damping.py new file mode 100644 index 000000000..86be41f55 --- /dev/null +++ b/version/0.2/_downloads/7b1802958cf339ccc8ce45783df382f0/frf_plate_damping.py @@ -0,0 +1,75 @@ +""" +FRF for a rectangular plate +=========================== + +This example shows how to setup the keywords for FRF computation. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamaterial import MatElastic +from ansys.dyna.core.pre.dynanvh import ( + DynaNVH, + FrequencyDomain, + ExcitationDOF, + Curve, + NodeSet, + ShellPart, + ShellFormulation, + ResponseDOF, + ResponseType, +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/nvh/frf_plate_damping.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +solution = DynaSolution(hostname) +fns = [] +path = examples.nvh_frf_plate_damping + os.sep +fns.append(path + "frf_plate_damping.k") +solution.open_files(fns) + +nvhobj = DynaNVH() +solution.add(nvhobj) + +nvhobj.implicitanalysis.set_initial_timestep_size(1.0) +nvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100) +nvhobj.implicitanalysis.set_solution(solution_method=1) + +fd = FrequencyDomain() +crv = Curve( + x=[1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 200], + y=[0, 0, 0.0045, 0.00713, 0.00386, 0.00328, 0.0034, 0.00624, 7.2e-4, 8.3e-4, 0, 0], +) +fd.set_frequency_response_function( + excitation_input_set=NodeSet([131]), + excitation_input_dof=ExcitationDOF.Z, + max_natural_frequency=2000, + modal_damping_coefficient_curve_type=1, + modal_damping_coefficient_curve=crv, + response_output_set=NodeSet([131, 651]), + response_output_dof=ResponseDOF.Z, + response_output_type=ResponseType.BASE_ACCELERATION, + frf_output_min_frequency=1, + frf_output_max_frequency=400, + frf_output_num_frequency=400, +) +nvhobj.add(fd) + +matelastic = MatElastic(mass_density=7870, young_modulus=2.07e11, poisson_ratio=0.292) + +boxshell = ShellPart(1) +boxshell.set_material(matelastic) +boxshell.set_element_formulation(ShellFormulation.SR_HUGHES_LIU) +boxshell.set_thickness(0.002) +boxshell.set_shear_factor(0.833) +boxshell.set_printout(3) +nvhobj.parts.add(boxshell) + +solution.save_file() diff --git a/version/0.2/_downloads/7ea211e3cf584bc95d4cbd98aa169e97/thermal_stress.ipynb b/version/0.2/_downloads/7ea211e3cf584bc95d4cbd98aa169e97/thermal_stress.ipynb new file mode 100644 index 000000000..76f78e776 --- /dev/null +++ b/version/0.2/_downloads/7ea211e3cf584bc95d4cbd98aa169e97/thermal_stress.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Thermal stress example\n======================\n\nThis example show how to create a thermal stress model with Pydyna-pre\nmodule.\n\nLS-DYNA version :\nls-dyna\\_smp\\_s\\_R13.0\\_365-gf8a97bda2a\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n ThermalAnalysis,\n ThermalAnalysisType,\n SolidPart,\n SolidFormulation,\n NodeSet\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatElasticPlasticThermal\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.thermal_stress + os.sep\nfns.append(path + \"thermal_stress.k\")\nsolution.open_files(fns)\n\nsolution.set_termination(3.0)\n\nts = DynaMech()\nsolution.add(ts)\n\ntanalysis = ThermalAnalysis()\ntanalysis.set_timestep(initial_timestep=0.1)\ntanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT)\nts.add(tanalysis)\n\nts.set_timestep(timestep_size_for_mass_scaled=0.01)\n\nmat = MatElasticPlasticThermal(\n mass_density=1.0,\n temperatures=(0,10,20,30,40,50),\n young_modulus=(1e10,1e10,1e10,1e10,1e10,1e10),\n poisson_ratio=(0.3,0.3,0.3,0.3,0.3,0.3),\n thermal_expansion=(0,2e-6,4e-6,6e-6,8e-6,1e-5),\n yield_stress = (1e20,1e20,1e20,1e20,1e20,1e20)\n)\nmat.set_thermal_isotropic(density=1,generation_rate_multiplier=10,specific_heat=1,conductivity=1)\n\nslab = SolidPart(1)\nslab.set_material(mat)\nslab.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nts.parts.add(slab)\n\n# Define initial conddition\nfor i in range(1,9):\n ts.initialconditions.create_temperature(NodeSet([i]),temperature=10)\n\nsolution.set_output_database(glstat=0.03)\nsolution.create_database_binary(dt=0.01)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/811a081e5b26ce516983730fed64dfc6/icfd_plate_flow.py b/version/0.2/_downloads/811a081e5b26ce516983730fed64dfc6/icfd_plate_flow.py new file mode 100644 index 000000000..d4ad24337 --- /dev/null +++ b/version/0.2/_downloads/811a081e5b26ce516983730fed64dfc6/icfd_plate_flow.py @@ -0,0 +1,81 @@ +""" +Plate flow +========== + +This example shows a simple ICFD input deck with a coarse mesh. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/plate_flow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.plate_flow + os.sep +fns.append(path + "plate_flow.k") +solution.open_files(fns) +solution.set_termination(termination_time=100) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=2) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3]) +meshvol.embed_shell([4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.2/_downloads/83bc05e59def5da3bb748c90ef26415a/sale_efp.ipynb b/version/0.2/_downloads/83bc05e59def5da3bb748c90ef26415a/sale_efp.ipynb new file mode 100644 index 000000000..64b168679 --- /dev/null +++ b/version/0.2/_downloads/83bc05e59def5da3bb748c90ef26415a/sale_efp.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "EFP Concrete Target\n===================\n\nThis example demonstrates how to create a SALE input deck.\n\nLS-DYNA version :\nls-dyna\\_smp\\_s\\_R13.0\\_365-gf8a97bda2a\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynasale import (\n DynaSALE,\n ControlPoint,\n AdvectionMethod,\n StructuredMesh,\n FillDirection,\n Point,\n)\nfrom ansys.dyna.core.pre import dynamaterial as matDB\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nefp_solution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.sale_efp + os.sep\nfns.append(path + \"efpcase.k\")\nefp_solution.open_files(fns)\n\n# set termination\nefp_solution.set_termination(280)\n\nefp = DynaSALE()\nefp_solution.add(efp)\n\n# set post result ouput interval\nefp.set_output_interval(5.0)\n\n# set analysis type\nefp.set_analysis_type(method=AdvectionMethod.VAN_LEER_WITH_HIS)\n\n# define mesh\ncontrol_points_x = [\n ControlPoint(number=1, position=0, ratio=1),\n ControlPoint(number=11, position=-2.5, ratio=0.5),\n ControlPoint(number=21, position=0, ratio=0.5),\n ControlPoint(number=31, position=0, ratio=1),\n]\n\ncontrol_points_y = [\n ControlPoint(number=1, position=0, ratio=1),\n ControlPoint(number=11, position=-2.5, ratio=0.5),\n ControlPoint(number=21, position=0, ratio=0.5),\n ControlPoint(number=31, position=0, ratio=1),\n]\n\ncontrol_points_z = [\n ControlPoint(number=1, position=0, ratio=0.5),\n ControlPoint(number=269, position=11, ratio=0.25),\n ControlPoint(number=309, position=21, ratio=0.25),\n ControlPoint(number=339, position=0, ratio=5),\n]\n\nmesh = StructuredMesh(control_points_x, control_points_y, control_points_z)\nefp.add(mesh)\n\n# fill material\nvacuum = matDB.Vacuum()\nmesh.fill(vacuum)\nair = matDB.Air()\nmesh.fill(air, geometry_type=\"ALL\", reference_pressure=1.01325e-6)\nhe = matDB.HighExplosive()\nmesh.fill(\n he,\n geometry_type=\"PART\",\n define_geometry_parameters=[23],\n inout=FillDirection.OUTSIDE_THE_GEOMETRY,\n)\nliner = matDB.Liner()\nmesh.fill(\n liner,\n geometry_type=\"PART\",\n define_geometry_parameters=[22],\n inout=FillDirection.OUTSIDE_THE_GEOMETRY,\n)\n\n# Set the initial conditions\nmesh.initial_detonation(Point(0, 0, 19.33))\n\n# set outut datebase\nefp_solution.set_output_database(matsum=0.2, glstat=0.2)\n\n# save file on server end\nefp_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/9475b9e250d1cdfb05933e66928b6173/icfd_dem_coupling.ipynb b/version/0.2/_downloads/9475b9e250d1cdfb05933e66928b6173/icfd_dem_coupling.ipynb new file mode 100644 index 000000000..1e77fc1f2 --- /dev/null +++ b/version/0.2/_downloads/9475b9e250d1cdfb05933e66928b6173/icfd_dem_coupling.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "DEM Coupling\n============\n\nThis example shows how to couple the ICFD fluid solver with DEM\nparticles.\n\nLS-DYNA version : ls-dyna\\_smp\\_d\\_R101\\_winx64\\_ifort131.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n SolidPart,\n SolidFormulation,\n Curve,\n Velocity,\n Point,\n ICFD_CouplingForm\n)\nfrom ansys.dyna.core.pre.dynadem import DEMAnalysis\nfrom ansys.dyna.core.pre.dynamaterial import MatRigidDiscrete\nfrom ansys.dyna.core.pre import examples\n\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.dem_coupling + os.sep\nfns.append(path + \"dem_coupling.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=100)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfd.set_timestep(tssfac=0.8)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfdanalysis.set_coupling_dem(formulation=ICFD_CouplingForm.FORCE_USING_FLUID_PRESSURE_GRADIENT)\nicfd.add(icfdanalysis)\n\ndemanalysis = DEMAnalysis()\ndemanalysis.set_des(normal_damping_coeff=0.9, tangential_damping_coeff=0.9, static_friction_coeff=0.3, rolling_friction_coeff=0.001)\nicfd.add(demanalysis)\n\n# define model\nmat = MatICFD(flow_density=2.0, dynamic_viscosity=0.01)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\nicfd.set_initial(velocity=Velocity(1, 0, 0))\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3])\nmeshvol.meshsize_box(size=0.05,min_point=Point(-1, -1, -1),max_point=Point(1, 1, 1))\nicfd.add(meshvol)\n\n#define rigid cylinder\nmatrigid = MatRigidDiscrete(mass_density=1000,young_modulus=1e4)\ndisc = SolidPart(101)\ndisc.set_material(matrigid)\ndisc.set_element_formulation(SolidFormulation.ONE_POINT_COROTATIONAL)\nicfd.parts.add(disc)\n\nsolution.create_database_binary(dt=1.0)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/94ad1be567957bdba5011e7f2ac40c7f/icfd_internal_3d_flow.ipynb b/version/0.2/_downloads/94ad1be567957bdba5011e7f2ac40c7f/icfd_internal_3d_flow.ipynb new file mode 100644 index 000000000..f18774278 --- /dev/null +++ b/version/0.2/_downloads/94ad1be567957bdba5011e7f2ac40c7f/icfd_internal_3d_flow.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Internal 3D flow\n================\n\nThis example shows a simple 3D ICFD problem.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n ICFD_SurfRemeshMethod\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.internal_3d_flow + os.sep\nfns.append(path + \"internal_3d_flow.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=10)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(timestep=0.05)\nicfdanalysis.set_volume_mesh(mesh_growth_scale_factor=1.1)\nicfdanalysis.set_surface_mesh(remesh_method = ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING)\nicfd.add(icfdanalysis)\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\npart_inflow.set_boundary_layer_symmetry_condition()\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\npart_outflow.set_boundary_layer_symmetry_condition()\npart_outflow.compute_flux()\nicfd.parts.add(part_outflow)\n\npart_wall = ICFDPart(3)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.set_boundary_layer(2)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/9f3c5771e8aaf289fc5dc494e644a933/airbag_deploy.py b/version/0.2/_downloads/9f3c5771e8aaf289fc5dc494e644a933/airbag_deploy.py new file mode 100644 index 000000000..852f31ff1 --- /dev/null +++ b/version/0.2/_downloads/9f3c5771e8aaf289fc5dc494e644a933/airbag_deploy.py @@ -0,0 +1,108 @@ +""" +Airbag deploy example +===================== + +This example show how to create an Airbag deploy model with Pydyna-pre module. \n +LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Airbag, + PartSet, + Curve, + Point, + RigidwallPlanar, + Contact, + ContactSurface, + ContactCategory, + ShellPart, + ShellFormulation, +) +from ansys.dyna.core.pre.dynamaterial import MatRigid, MatFabric +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/airbag/airbag.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +airbag_solution = DynaSolution(hostname) +fns = [] +# path = sys.path[0] + os.sep + "input" + os.sep + "airbag_deploy" + os.sep +path = examples.airbag_deploy + os.sep +fns.append(path + "airbag_deploy.k") +airbag_solution.open_files(fns) + +airbag_solution.set_termination(0.03) + +airbagdeploy = DynaMech() +airbag_solution.add(airbagdeploy) + +airbag = Airbag( + set=PartSet([3]), + heat_capacity_at_constant_volume=1.736e3, + heat_capacity_at_constant_pressure=2.43e3, + input_gas_temperature=1.2e3, + input_mass_flow_rate=Curve(x=[0, 0.032, 0.045, 0.08], y=[0, 26, 0.6, 0.1]), + shape_factor_for_exit_hole=0.7, + ambient_pressure=14.7, + ambient_density=3.821e-6, +) +airbagdeploy.add(airbag) + +rigidwall = RigidwallPlanar(Point(0, 0, 0), Point(0, 1, 0), coulomb_friction_coefficient=0.5) +airbagdeploy.add(rigidwall) + +contact = Contact(category=ContactCategory.NODES_TO_SURFACE) +contact.set_friction_coefficient(static=0.5, dynamic=0.5) +surf1 = ContactSurface(PartSet([3])) +surf2 = ContactSurface(PartSet([2])) +surf2.set_penalty_stiffness_scale_factor(0.06667) +contact.set_slave_surface(surf1) +contact.set_master_surface(surf2) +airbagdeploy.contacts.add(contact) + +platemat = MatRigid( + mass_density=7.84e-4, + young_modulus=30e6, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, +) +cylindermat = MatRigid(mass_density=1.96e-4, young_modulus=30e6) +airbagmat = MatFabric( + mass_density=1e-4, + young_modulus_longitudinal_direction=2e6, + young_modulus_transverse_direction=2e6, + shear_modulus=1.53e6, +) + +plate = ShellPart(1) +plate.set_material(platemat) +plate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +plate.set_thickness(0.5) +airbagdeploy.parts.add(plate) + +cylinder = ShellPart(2) +cylinder.set_material(cylindermat) +cylinder.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +cylinder.set_thickness(0.5) +airbagdeploy.parts.add(cylinder) + +airbagpart = ShellPart(3) +airbagpart.set_material(airbagmat) +airbagpart.set_element_formulation(ShellFormulation.FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE) +airbagpart.set_thickness(0.015) +airbagpart.set_integration_points(4) +airbagdeploy.parts.add(airbagpart) + +airbag_solution.set_output_database( + abstat=2.0e-4, glstat=2.0e-4, matsum=2.0e-4, rcforc=2.0e-4, rbdout=2.0e-4, rwforc=2.0e-4 +) +airbag_solution.create_database_binary(dt=5e-4, ieverp=1) +airbag_solution.save_file() diff --git a/version/0.2/_downloads/a4918dca4a4aa228342e8bd9d796cb73/icfd_thermal_flow.py b/version/0.2/_downloads/a4918dca4a4aa228342e8bd9d796cb73/icfd_thermal_flow.py new file mode 100644 index 000000000..e334579a5 --- /dev/null +++ b/version/0.2/_downloads/a4918dca4a4aa228342e8bd9d796cb73/icfd_thermal_flow.py @@ -0,0 +1,84 @@ +""" +Thermal flow +============ + +This example shows a simple ICFD forced convection input deck with a coarse mesh. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/thermal_flow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.thermal_flow + os.sep +fns.append(path + "thermal_flow.k") +solution.open_files(fns) +solution.set_termination(termination_time=100) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005,heat_capacity = 1000,thermal_conductivity=200) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[20, 20])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[80, 80])) +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +icfd.parts.add(part_wall) + +icfd.set_initial(temperature=10) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3,4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.2/_downloads/aa171cc18b4e4d68e2332837af606e40/belted_dummy.py b/version/0.2/_downloads/aa171cc18b4e4d68e2332837af606e40/belted_dummy.py new file mode 100644 index 000000000..b716bf593 --- /dev/null +++ b/version/0.2/_downloads/aa171cc18b4e4d68e2332837af606e40/belted_dummy.py @@ -0,0 +1,137 @@ +""" +Belted dummy example +===================== + +This example show how to create an Belted dummy model with Pydyna-pre module. \n +LS-DYNA version : LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Velocity, + Curve, + ShellPart, + DiscretePart, + NodeSet, + SegmentSet, + DRO, + Contact, + ContactSurface, + ContactCategory, + Motion, + Gravity, + GravityOption, +) +from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatElastic, + MatSpringNonlinearElastic, + MatDamperViscous, + MatDamperNonlinearViscous, +) +from belted_dummy_data import * +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/explicit/belted_dummy.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +dummy_solution = DynaSolution(hostname) +fns = [] +path = examples.belted_dummy + os.sep +fns.append(path + "belted_dummy.k") +dummy_solution.open_files(fns) +dummy_solution.set_termination(termination_time=0.12) +dummy_solution.create_database_binary(dt=2.5e-3) + +dummy = DynaMech() +dummy_solution.add(dummy) + +dummy.set_timestep(tssfac=0.8) +dummy.set_init_velocity(Velocity(14.8, 0, 0)) + +# Define material +shellmatlist = [] +for i in range(15): + matrigid = MatRigid( + mass_density=rigidmats[i][0], young_modulus=rigidmats[i][1], poisson_ratio=0.3 + ) + shellmatlist.append(matrigid) + +for i in range(16, 23): + index = i - 16 + matelastic = MatElastic( + mass_density=elasticmats[index][0], young_modulus=elasticmats[index][1], poisson_ratio=0.3 + ) + shellmatlist.append(matelastic) + +discmatlist = [] +for i in range(101, 143): + index = i - 101 + mat = MatSpringNonlinearElastic(curve=Curve(x=curvedata[index][0], y=curvedata[index][1])) + discmatlist.append(mat) + +for i in range(143, 185): + index = i - 143 + mat = MatDamperViscous(damping_constant=dampingconst[index]) + discmatlist.append(mat) + +for i in range(185, 209): + index = i - 185 + mat = MatDamperNonlinearViscous( + curve=Curve(x=curvedata[lcidlist[index]][0], y=curvedata[lcidlist[index]][1]) + ) + discmatlist.append(mat) + +# Set part properties +for i in range(1, 23): + part = ShellPart(i) + part.set_material(shellmatlist[i - 1]) + part.set_thickness(shellsec[i - 1][0]) + part.set_integration_points(shellsec[i - 1][1]) + if i in range(1, 16): + part.set_extra_nodes(NodeSet(extra_nodes[i - 1])) + dummy.parts.add(part) + +for i in range(101, 209): + index = i - 101 + part = DiscretePart(i) + part.set_material(discmatlist[index]) + part.set_displacement_option(displacement_option=DRO.DESCRIBES_TORSIONAL_SPRING) + dummy.parts.add(part) + +# Contact +fslist = [0.62, 0.62, 0.62, 0.8, 1, 0.8, 0.88, 0.88, 0.16, 0.88, 0] +for i in range(11): + contact = Contact(category=ContactCategory.SURFACE_TO_SURFACE_CONTACT) + contact.set_friction_coefficient(static=fslist[i]) + surf1 = ContactSurface(SegmentSet(segments[2 * i])) + surf2 = ContactSurface(SegmentSet(segments[2 * i + 1])) + contact.set_slave_surface(surf1) + contact.set_master_surface(surf2) + dummy.contacts.add(contact) + +# Constraint +for i in range(14): + dummy.constraints.create_joint_spherical(nodes=jointlist[i]) + +# Boundary condition +dummy.boundaryconditions.create_imposed_motion( + NodeSet(motion_nodes), + Curve(x=motion_curve_x, y=motion_curve_y), + motion=Motion.ACCELERATION, + scalefactor=-1, +) + +# Load +g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0.152], y=[9.81, 9.81])) +dummy.add(g) + +dummy_solution.create_database_binary(dt=2.5e-3) +dummy_solution.save_file() diff --git a/version/0.2/_downloads/ab9bf938c72e60c57fbe5e6a82fd2cb9/icfd_driven_cavity.ipynb b/version/0.2/_downloads/ab9bf938c72e60c57fbe5e6a82fd2cb9/icfd_driven_cavity.ipynb new file mode 100644 index 000000000..690f1e6d4 --- /dev/null +++ b/version/0.2/_downloads/ab9bf938c72e60c57fbe5e6a82fd2cb9/icfd_driven_cavity.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Driven cavity\n=============\n\nThis example shows the universally famous driven cavity case tested with\nthe second order steady solver and for Re=1000.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n ICFD_AnalysisType,\n ICFD_MessageLevel,\n ICFDDOF\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.driven_cavity + os.sep\nfns.append(path + \"driven_cavity.k\")\nsolution.open_files(fns)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_type(analysis_type=ICFD_AnalysisType.STEADY_STATE_ANALYSIS)\nicfdanalysis.set_output(messagelevel=ICFD_MessageLevel.FULL_OUTPUT_INFORMATION,iteration_interval=250)\nicfdanalysis.set_steady_state(max_iteration=2500,momentum_tol_limit=1e-8,pressure_tol_limit=1e-8,velocity_relax_param=1,pressure_relax_param=1)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1, dynamic_viscosity=0.001)\n\npart1 = ICFDPart(1)\npart1.set_material(mat)\npart1.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\nicfd.parts.add(part1)\n\npart2 = ICFDPart(2)\npart2.set_material(mat)\npart2.set_non_slip()\nicfd.parts.add(part2)\n\npartvol = ICFDVolumePart(surfaces=[1, 2])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=250)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/aba191ff39a3846f649b65a67560e3a0/icfd_mesh_morphing.ipynb b/version/0.2/_downloads/aba191ff39a3846f649b65a67560e3a0/icfd_mesh_morphing.ipynb new file mode 100644 index 000000000..b329ebdb3 --- /dev/null +++ b/version/0.2/_downloads/aba191ff39a3846f649b65a67560e3a0/icfd_mesh_morphing.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Mesh Morphing\n=============\n\nThis example shows a simple ICFD problem with mesh morphing.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.mesh_morphing + os.sep\nfns.append(path + \"mesh_morphing.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=2)\npart_wall.set_imposed_move(vy=Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"))\nicfd.parts.add(part_wall)\n\npart_meshmorph = ICFDPart(5)\npart_meshmorph.set_material(mat)\nicfd.parts.add(part_meshmorph)\n\npartvol1 = ICFDVolumePart(surfaces=[1, 2, 3, 5])\npartvol1.set_material(mat)\nicfd.parts.add(partvol1)\npartvol2 = ICFDVolumePart(surfaces=[5, 4])\npartvol2.set_material(mat)\npartvol2.set_imposed_move(vy=Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"))\nicfd.parts.add(partvol2)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nmeshvol.set_fluid_interfaces([5])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.5)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/b530acc23666046a7e7e36ad3c8630c7/iga_sample.ipynb b/version/0.2/_downloads/b530acc23666046a7e7e36ad3c8630c7/iga_sample.ipynb new file mode 100644 index 000000000..84edc9c50 --- /dev/null +++ b/version/0.2/_downloads/b530acc23666046a7e7e36ad3c8630c7/iga_sample.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "IGA example\n===========\n\nThis example demonstrates how to create an IGA input deck.\n\nLS-DYNA version :\nls-dyna\\_smp\\_s\\_R13.0\\_365-gf8a97bda2a\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaiga import (\n DynaIGA,\n IGAPart,\n PartSet,\n IGAFormulation,\n SolidPart,\n HourglassType,\n SolidFormulation,\n RigidwallCylinder,\n Point,\n Curve,\n Direction,\n ContactType,\n ContactCategory,\n OffsetType,\n)\nfrom ansys.dyna.core.pre.dynamech import *\nfrom ansys.dyna.core.pre.dynamaterial import MatPiecewiseLinearPlasticity, MatSpotweld\nfrom iga_sample_data import *\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\niga_solution = DynaSolution(hostname)\nfns = []\npath = examples.iga_sample + os.sep\nfns.append(path + \"maino.k\")\nfns.append(path + \"rkrwelds.key\")\nfns.append(path + \"27parts.key\")\niga_solution.open_files(fns)\n\niga_solution.set_termination(20)\niga_solution.create_database_binary(dt=0.1)\n\niga = DynaIGA()\niga_solution.add(iga)\n\niga.set_timestep(timestep_size_for_mass_scaled=-0.0004)\n\n# define material\nplastic = MatPiecewiseLinearPlasticity(\n mass_density=7.830e-06, young_modulus=200, yield_stress=1.5, tangent_modulus=0.5\n)\nswmatlist = []\nfor mat in materialdata:\n spotweld = MatSpotweld(\n mass_density=mat[0],\n young_modulus=mat[1],\n poisson_ratio=mat[2],\n yield_stress=mat[3],\n plastic_hardening_modulus=mat[4],\n axial_force_resultant_at_failure=mat[5],\n force_resultant_nrs_at_failure=mat[6],\n force_resultant_nrt_at_failure=mat[7],\n )\n swmatlist.append(spotweld)\n\nfor id in igaparts:\n part = IGAPart(id)\n part.set_material(plastic)\n part.set_element_formulation(IGAFormulation.REISSNER_MINDLIN_FIBERS_AT_CONTROL_POINTS)\n part.set_thickness(1.0)\n iga.parts.add(part)\n\nfor index in range(len(spotwelds)):\n part = SolidPart(spotwelds[index])\n if index != 1:\n part.set_hourglass(type=HourglassType.BELYTSCHKO_BINDEMAN)\n part.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\n part.set_material(swmatlist[index])\n iga.parts.add(part)\n\ncylinder1 = RigidwallCylinder(\n Point(2472.37, -600.000, 1270.98), Point(2472.37, -600.000, 2668.53), 100, 1000\n)\niga.add(cylinder1)\ncylinder2 = RigidwallCylinder(\n Point(3580.25, -600.000, 1261.37), Point(3580.25, -600.000, 3130.49), 100, 1000\n)\niga.add(cylinder2)\ncylinder3 = RigidwallCylinder(\n Point(3090.59, -955.35, 1299.42), Point(3090.59, -955.35, 2958.43), 100, 1000\n)\ncylinder3.set_motion(Curve(x=[0, 100], y=[20, 20]), dir=Direction(0, 1, 0))\niga.add(cylinder3)\n\n# define contact\nselfcontact = Contact(type=ContactType.AUTOMATIC)\nselfcontact.set_friction_coefficient(static=0.2)\nsurf1 = ContactSurface(PartSet(igaparts))\nselfcontact.set_slave_surface(surf1)\niga.add(selfcontact)\n\nswcontact = Contact(\n type=ContactType.TIED,\n category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT,\n offset=OffsetType.OFFSET,\n)\nspotweldsolid = ContactSurface(PartSet(spotwelds))\nspotweldsurface = ContactSurface(PartSet(igaparts))\nswcontact.set_slave_surface(spotweldsolid)\nswcontact.set_master_surface(spotweldsurface)\niga.add(swcontact)\n\niga_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/b91df3575d79fd262c84187d1f6fb77c/belted_dummy.ipynb b/version/0.2/_downloads/b91df3575d79fd262c84187d1f6fb77c/belted_dummy.ipynb new file mode 100644 index 000000000..c00231e30 --- /dev/null +++ b/version/0.2/_downloads/b91df3575d79fd262c84187d1f6fb77c/belted_dummy.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Belted dummy example\n====================\n\nThis example show how to create an Belted dummy model with Pydyna-pre\nmodule.\n\nLS-DYNA version : LS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.0\\_365-gf8a97bda2a\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n Velocity,\n Curve,\n ShellPart,\n DiscretePart,\n NodeSet,\n SegmentSet,\n DRO,\n Contact,\n ContactSurface,\n ContactCategory,\n Motion,\n Gravity,\n GravityOption,\n)\nfrom ansys.dyna.core.pre.dynamaterial import (\n MatRigid,\n MatElastic,\n MatSpringNonlinearElastic,\n MatDamperViscous,\n MatDamperNonlinearViscous,\n)\nfrom belted_dummy_data import *\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\ndummy_solution = DynaSolution(hostname)\nfns = []\npath = examples.belted_dummy + os.sep\nfns.append(path + \"belted_dummy.k\")\ndummy_solution.open_files(fns)\ndummy_solution.set_termination(termination_time=0.12)\ndummy_solution.create_database_binary(dt=2.5e-3)\n\ndummy = DynaMech()\ndummy_solution.add(dummy)\n\ndummy.set_timestep(tssfac=0.8)\ndummy.set_init_velocity(Velocity(14.8, 0, 0))\n\n# Define material\nshellmatlist = []\nfor i in range(15):\n matrigid = MatRigid(\n mass_density=rigidmats[i][0], young_modulus=rigidmats[i][1], poisson_ratio=0.3\n )\n shellmatlist.append(matrigid)\n\nfor i in range(16, 23):\n index = i - 16\n matelastic = MatElastic(\n mass_density=elasticmats[index][0], young_modulus=elasticmats[index][1], poisson_ratio=0.3\n )\n shellmatlist.append(matelastic)\n\ndiscmatlist = []\nfor i in range(101, 143):\n index = i - 101\n mat = MatSpringNonlinearElastic(curve=Curve(x=curvedata[index][0], y=curvedata[index][1]))\n discmatlist.append(mat)\n\nfor i in range(143, 185):\n index = i - 143\n mat = MatDamperViscous(damping_constant=dampingconst[index])\n discmatlist.append(mat)\n\nfor i in range(185, 209):\n index = i - 185\n mat = MatDamperNonlinearViscous(\n curve=Curve(x=curvedata[lcidlist[index]][0], y=curvedata[lcidlist[index]][1])\n )\n discmatlist.append(mat)\n\n# Set part properties\nfor i in range(1, 23):\n part = ShellPart(i)\n part.set_material(shellmatlist[i - 1])\n part.set_thickness(shellsec[i - 1][0])\n part.set_integration_points(shellsec[i - 1][1])\n if i in range(1, 16):\n part.set_extra_nodes(NodeSet(extra_nodes[i - 1]))\n dummy.parts.add(part)\n\nfor i in range(101, 209):\n index = i - 101\n part = DiscretePart(i)\n part.set_material(discmatlist[index])\n part.set_displacement_option(displacement_option=DRO.DESCRIBES_TORSIONAL_SPRING)\n dummy.parts.add(part)\n\n# Contact\nfslist = [0.62, 0.62, 0.62, 0.8, 1, 0.8, 0.88, 0.88, 0.16, 0.88, 0]\nfor i in range(11):\n contact = Contact(category=ContactCategory.SURFACE_TO_SURFACE_CONTACT)\n contact.set_friction_coefficient(static=fslist[i])\n surf1 = ContactSurface(SegmentSet(segments[2 * i]))\n surf2 = ContactSurface(SegmentSet(segments[2 * i + 1]))\n contact.set_slave_surface(surf1)\n contact.set_master_surface(surf2)\n dummy.contacts.add(contact)\n\n# Constraint\nfor i in range(14):\n dummy.constraints.create_joint_spherical(nodes=jointlist[i])\n\n# Boundary condition\ndummy.boundaryconditions.create_imposed_motion(\n NodeSet(motion_nodes),\n Curve(x=motion_curve_x, y=motion_curve_y),\n motion=Motion.ACCELERATION,\n scalefactor=-1,\n)\n\n# Load\ng = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0.152], y=[9.81, 9.81]))\ndummy.add(g)\n\ndummy_solution.create_database_binary(dt=2.5e-3)\ndummy_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/bc298b4ebddba5ef8ca2aea8ce1eb3ad/icfd_dem_coupling.py b/version/0.2/_downloads/bc298b4ebddba5ef8ca2aea8ce1eb3ad/icfd_dem_coupling.py new file mode 100644 index 000000000..a3bd64bd2 --- /dev/null +++ b/version/0.2/_downloads/bc298b4ebddba5ef8ca2aea8ce1eb3ad/icfd_dem_coupling.py @@ -0,0 +1,98 @@ +""" +DEM Coupling +============ + +This example shows how to couple the ICFD fluid solver with DEM particles. \n +LS-DYNA version : ls-dyna_smp_d_R101_winx64_ifort131.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + SolidPart, + SolidFormulation, + Curve, + Velocity, + Point, + ICFD_CouplingForm +) +from ansys.dyna.core.pre.dynadem import DEMAnalysis +from ansys.dyna.core.pre.dynamaterial import MatRigidDiscrete +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/dem_coupling.png' + + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.dem_coupling + os.sep +fns.append(path + "dem_coupling.k") +solution.open_files(fns) +solution.set_termination(termination_time=100) +icfd = DynaICFD() +solution.add(icfd) + +icfd.set_timestep(tssfac=0.8) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfdanalysis.set_coupling_dem(formulation=ICFD_CouplingForm.FORCE_USING_FLUID_PRESSURE_GRADIENT) +icfd.add(icfdanalysis) + +demanalysis = DEMAnalysis() +demanalysis.set_des(normal_damping_coeff=0.9, tangential_damping_coeff=0.9, static_friction_coeff=0.3, rolling_friction_coeff=0.001) +icfd.add(demanalysis) + +# define model +mat = MatICFD(flow_density=2.0, dynamic_viscosity=0.01) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +icfd.set_initial(velocity=Velocity(1, 0, 0)) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3]) +meshvol.meshsize_box(size=0.05,min_point=Point(-1, -1, -1),max_point=Point(1, 1, 1)) +icfd.add(meshvol) + +#define rigid cylinder +matrigid = MatRigidDiscrete(mass_density=1000,young_modulus=1e4) +disc = SolidPart(101) +disc.set_material(matrigid) +disc.set_element_formulation(SolidFormulation.ONE_POINT_COROTATIONAL) +icfd.parts.add(disc) + +solution.create_database_binary(dt=1.0) +solution.save_file() diff --git a/version/0.2/_downloads/bf771f225224686f80c0ae60d04741f3/icfd_free_convection_flow.py b/version/0.2/_downloads/bf771f225224686f80c0ae60d04741f3/icfd_free_convection_flow.py new file mode 100644 index 000000000..c4133188f --- /dev/null +++ b/version/0.2/_downloads/bf771f225224686f80c0ae60d04741f3/icfd_free_convection_flow.py @@ -0,0 +1,88 @@ +""" +Thermal flow +============ + +This example shows a simple ICFD forced convection input deck with a coarse mesh. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Gravity, + GravityOption + +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/free_convection_flow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.free_convection_flow + os.sep +fns.append(path + "free_convection_flow.k") +solution.open_files(fns) +solution.set_termination(termination_time=30) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.01) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=37.799999, dynamic_viscosity=1,heat_capacity = 0.7,thermal_conductivity=1.0,thermal_expansion_coefficient=1) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_non_slip() +part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[1, 1])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_non_slip() +part_outflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_non_slip() +part_symmetric.compute_temperature() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_temperature() +icfd.parts.add(part_wall) + +icfd.set_initial() + +g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[1, 1])) +icfd.add(g) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3,4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.2/_downloads/c04899840c098784ca12117d664f304c/camry_rc.py b/version/0.2/_downloads/c04899840c098784ca12117d664f304c/camry_rc.py new file mode 100644 index 000000000..26b1b45d1 --- /dev/null +++ b/version/0.2/_downloads/c04899840c098784ca12117d664f304c/camry_rc.py @@ -0,0 +1,269 @@ +""" +Crash example +===================== + +This example demonstrates how to create a simple crash input deck. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Curve, + BeamPart, + ShellPart, + NodeSet, + PartSet, + TimestepCtrol, + Contact, + ContactType, + ContactCategory, + ContactSurface, + DOF, + OffsetType, +) +from ansys.dyna.core.pre.dynamaterial import ( + MatNull, + MatRigid, + MatSpotweld, + MatModifiedPiecewiseLinearPlasticity, + MatPiecewiseLinearPlasticity, +) +from camry_rc_data import * +from ansys.dyna.core.pre import examples + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +camry_solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.camry_rc + os.sep +fns.append(path + "Camry_RC_main.k") +fns.append(path + "501_RIG_BAR_roof_crush_platen5.key") +fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7.k") +fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7_nodes.k") +fns.append(path + "roof_welds.k") +fns.append(path + "weld7.k") +fns.append(path + "xtra_sw.k") +camry_solution.open_files(fns) + +# global setting +camry_solution.set_termination(10) +camry_solution.create_database_binary(dt=0.001) + +camry = DynaMech() +camry_solution.add(camry) + +camry.implicitanalysis.set_timestep( + control_flag=TimestepCtrol.AUTOMATICALLY_ADJUST_TIMESTEP_SIZE, + Optimum_equilibrium_iteration_count=511, +) +camry.implicitanalysis.set_dynamic(gamma=0.6, beta=0.38) +camry.implicitanalysis.set_eigenvalue() +camry.implicitanalysis.set_solution( + stiffness_reformation_limit=55, absolute_convergence_tolerance=-100 +) + +# create material +matnull = MatNull(mass_density=6e-11) +matrigid = MatRigid(mass_density=7.890e-09, young_modulus=2.100e05, poisson_ratio=0.3) +matplaten = MatRigid( + mass_density=7.80e-09, + young_modulus=2.00e05, + poisson_ratio=0.3, + center_of_mass_constraint=1, + rotational_constraint=7, +) +spotweldharden2100 = MatSpotweld( + mass_density=7.850e-09, + young_modulus=2.100e05, + poisson_ratio=0.3, + yield_stress=510, + plastic_hardening_modulus=2100, +) +spotweldharden2200 = MatSpotweld( + mass_density=7.850e-09, + young_modulus=2.100e05, + poisson_ratio=0.3, + yield_stress=510, + plastic_hardening_modulus=2200, +) +windowshield = MatModifiedPiecewiseLinearPlasticity( + mass_density=2.355e-09, + young_modulus=7.000e04, + poisson_ratio=0.22, + yield_stress=30, + tangent_modulus=1400, + plastic_strain_to_failure=0.015, + integration_points_number=1, +) +windowsrear = MatModifiedPiecewiseLinearPlasticity( + mass_density=2.425e-09, + young_modulus=7.000e04, + poisson_ratio=0.22, + yield_stress=30, + tangent_modulus=1400, + plastic_strain_to_failure=0.015, + integration_points_number=1, +) +plastic300 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=300, tangent_modulus=5000 +) +plastic250 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=250, tangent_modulus=5000 +) +plastic360 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=360, tangent_modulus=5000 +) +plastic180 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=180, tangent_modulus=5000 +) +plastic450 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=450, tangent_modulus=5000 +) +plastic1300 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=1300, tangent_modulus=5000 +) +plastic400 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=400, tangent_modulus=5000 +) +plastic500 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=500, tangent_modulus=5000 +) +plastic675 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=675, tangent_modulus=5000 +) +plastic310 = MatPiecewiseLinearPlasticity( + mass_density=2.255e-09, young_modulus=70000, yield_stress=310, tangent_modulus=5000 +) +plastic220 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=5000 +) +plastic220_410 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=410 +) + +# set model +for bpart in beamparts: + part = BeamPart(bpart[0]) + if part.id in [50000002]: + part.set_material(spotweldharden2200) + else: + part.set_material(spotweldharden2100) + part.set_element_formulation(bpart[1]) + part.set_diameter(bpart[2]) + camry.parts.add(part) + +for spart in shellparts: + part = ShellPart(spart[0]) + if part.id in [1463, 1464]: + part.set_material(matnull) + elif part.id in [417, 419, 530, 532, 585, 586, 587, 588]: + part.set_material(matrigid) + elif part.id in [50000001]: + part.set_material(matplaten) + elif part.id in [290]: + part.set_material(windowshield) + elif part.id in [291]: + part.set_material(windowsrear) + elif part.id in partswithmat300: + part.set_material(plastic300) + elif part.id in partswithmat250: + part.set_material(plastic250) + elif part.id in partswithmat360: + part.set_material(plastic360) + elif part.id in partswithmat180: + part.set_material(plastic180) + elif part.id in partswithmat450: + part.set_material(plastic450) + elif part.id in partswithmat400: + part.set_material(plastic400) + elif part.id in partswithmat500: + part.set_material(plastic500) + elif part.id in [57]: + part.set_material(plastic1300) + elif part.id in [286]: + part.set_material(plastic675) + elif part.id in [5000000]: + part.set_material(plastic310) + elif part.id in [5000006]: + part.set_material(plastic220) + elif part.id in [5000007]: + part.set_material(plastic220_410) + else: + pass + part.set_element_formulation(spart[1]) + part.set_thickness(spart[2]) + camry.parts.add(part) + +# define constrained +for sw in spotweld: + camry.constraints.create_spotweld(nodeid1=sw[0], nodeid2=sw[1]) + +for cnrb in cnrbs: + camry.constraints.create_cnrb(nodeset=NodeSet(cnrb)) + +# define contact +selfcontact = Contact(type=ContactType.AUTOMATIC) +selfcontact.set_mortar() +selfcontact.set_friction_coefficient(static=0.2) +surf1 = ContactSurface(PartSet(vehicle)) +selfcontact.set_slave_surface(surf1) +camry.contacts.add(selfcontact) + +platebiw = Contact(type=ContactType.AUTOMATIC, category=ContactCategory.SURFACE_TO_SURFACE_CONTACT) +platebiw.set_mortar() +platebiw.set_friction_coefficient(static=0.2, dynamic=0.2) +surf1 = ContactSurface(PartSet(biw)) +surf2 = ContactSurface(PartSet(platen)) +platebiw.set_slave_surface(surf1) +platebiw.set_master_surface(surf2) +camry.contacts.add(platebiw) + +swcontact = Contact( + type=ContactType.TIED, + category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT, + offset=OffsetType.CONSTRAINED_OFFSET, +) +spotweldbeam = ContactSurface(PartSet(spotweldbeams)) +spotweldbeam.set_contact_thickness(thickness=-0.9) +spotweldsurface = ContactSurface(PartSet(spotweldsurfaces)) +spotweldsurface.set_contact_thickness(thickness=-0.9) +swcontact.set_slave_surface(spotweldbeam) +swcontact.set_master_surface(spotweldsurface) +camry.contacts.add(swcontact) + +# define boundary +camry.boundaryconditions.create_spc(NodeSet(spc)) + +crv = Curve( + x=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9.77, 100], + y=[0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 127, 127], +) +platen = PartSet([50000001]) +camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.X_TRANSLATIONAL, scalefactor=-0.0802216 +) +camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.Y_TRANSLATIONAL, scalefactor=-0.0802216 +) +camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.Z_TRANSLATIONAL, scalefactor=-0.0802216 +) + +camry_solution.set_output_database( + elout=0.0001, + glstat=0.0001, + matsum=0.0001, + nodout=0.0001, + rbdout=0.0001, + rcforc=0.0001, + secforc=0.0001, +) + +camry_solution.save_file() diff --git a/version/0.2/_downloads/cd113194b07b8f747fc3e64868361218/airbag_deploy.ipynb b/version/0.2/_downloads/cd113194b07b8f747fc3e64868361218/airbag_deploy.ipynb new file mode 100644 index 000000000..d83158ddb --- /dev/null +++ b/version/0.2/_downloads/cd113194b07b8f747fc3e64868361218/airbag_deploy.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Airbag deploy example\n=====================\n\nThis example show how to create an Airbag deploy model with Pydyna-pre\nmodule.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.0\\_365-gf8a97bda2a\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n Airbag,\n PartSet,\n Curve,\n Point,\n RigidwallPlanar,\n Contact,\n ContactSurface,\n ContactCategory,\n ShellPart,\n ShellFormulation,\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid, MatFabric\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nairbag_solution = DynaSolution(hostname)\nfns = []\n# path = sys.path[0] + os.sep + \"input\" + os.sep + \"airbag_deploy\" + os.sep\npath = examples.airbag_deploy + os.sep\nfns.append(path + \"airbag_deploy.k\")\nairbag_solution.open_files(fns)\n\nairbag_solution.set_termination(0.03)\n\nairbagdeploy = DynaMech()\nairbag_solution.add(airbagdeploy)\n\nairbag = Airbag(\n set=PartSet([3]),\n heat_capacity_at_constant_volume=1.736e3,\n heat_capacity_at_constant_pressure=2.43e3,\n input_gas_temperature=1.2e3,\n input_mass_flow_rate=Curve(x=[0, 0.032, 0.045, 0.08], y=[0, 26, 0.6, 0.1]),\n shape_factor_for_exit_hole=0.7,\n ambient_pressure=14.7,\n ambient_density=3.821e-6,\n)\nairbagdeploy.add(airbag)\n\nrigidwall = RigidwallPlanar(Point(0, 0, 0), Point(0, 1, 0), coulomb_friction_coefficient=0.5)\nairbagdeploy.add(rigidwall)\n\ncontact = Contact(category=ContactCategory.NODES_TO_SURFACE)\ncontact.set_friction_coefficient(static=0.5, dynamic=0.5)\nsurf1 = ContactSurface(PartSet([3]))\nsurf2 = ContactSurface(PartSet([2]))\nsurf2.set_penalty_stiffness_scale_factor(0.06667)\ncontact.set_slave_surface(surf1)\ncontact.set_master_surface(surf2)\nairbagdeploy.contacts.add(contact)\n\nplatemat = MatRigid(\n mass_density=7.84e-4,\n young_modulus=30e6,\n center_of_mass_constraint=1,\n translational_constraint=7,\n rotational_constraint=7,\n)\ncylindermat = MatRigid(mass_density=1.96e-4, young_modulus=30e6)\nairbagmat = MatFabric(\n mass_density=1e-4,\n young_modulus_longitudinal_direction=2e6,\n young_modulus_transverse_direction=2e6,\n shear_modulus=1.53e6,\n)\n\nplate = ShellPart(1)\nplate.set_material(platemat)\nplate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nplate.set_thickness(0.5)\nairbagdeploy.parts.add(plate)\n\ncylinder = ShellPart(2)\ncylinder.set_material(cylindermat)\ncylinder.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\ncylinder.set_thickness(0.5)\nairbagdeploy.parts.add(cylinder)\n\nairbagpart = ShellPart(3)\nairbagpart.set_material(airbagmat)\nairbagpart.set_element_formulation(ShellFormulation.FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE)\nairbagpart.set_thickness(0.015)\nairbagpart.set_integration_points(4)\nairbagdeploy.parts.add(airbagpart)\n\nairbag_solution.set_output_database(\n abstat=2.0e-4, glstat=2.0e-4, matsum=2.0e-4, rcforc=2.0e-4, rbdout=2.0e-4, rwforc=2.0e-4\n)\nairbag_solution.create_database_binary(dt=5e-4, ieverp=1)\nairbag_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/ce5db160925f8de4caffc07437be1bc7/icfd_cylinderflow.ipynb b/version/0.2/_downloads/ce5db160925f8de4caffc07437be1bc7/icfd_cylinderflow.ipynb new file mode 100644 index 000000000..e31cf68a0 --- /dev/null +++ b/version/0.2/_downloads/ce5db160925f8de4caffc07437be1bc7/icfd_cylinderflow.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Cylinder flow example\n=====================\n\nThis example demonstrates how to create a simple ICFD cylinder flow\ninput deck.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n ICFDAnalysis,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nicfd_solution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.cylinder_flow + os.sep\nfns.append(path + \"cylinder_flow.k\")\nicfd_solution.open_files(fns)\n# Set total time of simulation\nicfd_solution.set_termination(termination_time=100)\n\nicfd = DynaICFD()\nicfd_solution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\nicfd_solution.create_database_binary(dt=1)\nicfd_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/d66c56577eff715fd2297ff61958c66b/icfd_free_convection_flow.ipynb b/version/0.2/_downloads/d66c56577eff715fd2297ff61958c66b/icfd_free_convection_flow.ipynb new file mode 100644 index 000000000..20710fd60 --- /dev/null +++ b/version/0.2/_downloads/d66c56577eff715fd2297ff61958c66b/icfd_free_convection_flow.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Thermal flow\n============\n\nThis example shows a simple ICFD forced convection input deck with a\ncoarse mesh.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n Gravity,\n GravityOption\n\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.free_convection_flow + os.sep\nfns.append(path + \"free_convection_flow.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=30)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.01)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=37.799999, dynamic_viscosity=1,heat_capacity = 0.7,thermal_conductivity=1.0,thermal_expansion_coefficient=1)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_non_slip()\npart_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[1, 1]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_non_slip()\npart_outflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_non_slip()\npart_symmetric.compute_temperature()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_temperature()\nicfd.parts.add(part_wall)\n\nicfd.set_initial()\n\ng = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[1, 1]))\nicfd.add(g)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3,4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/d75c8269ba954daad414a42a3b4d1b92/thermal_stress.py b/version/0.2/_downloads/d75c8269ba954daad414a42a3b4d1b92/thermal_stress.py new file mode 100644 index 000000000..b26dfa32f --- /dev/null +++ b/version/0.2/_downloads/d75c8269ba954daad414a42a3b4d1b92/thermal_stress.py @@ -0,0 +1,68 @@ +""" +Thermal stress example +====================== + +This example show how to create a thermal stress model with Pydyna-pre module. \n +LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + ThermalAnalysis, + ThermalAnalysisType, + SolidPart, + SolidFormulation, + NodeSet +) +from ansys.dyna.core.pre.dynamaterial import MatElasticPlasticThermal +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/thermal/thermal.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +solution = DynaSolution(hostname) +fns = [] +path = examples.thermal_stress + os.sep +fns.append(path + "thermal_stress.k") +solution.open_files(fns) + +solution.set_termination(3.0) + +ts = DynaMech() +solution.add(ts) + +tanalysis = ThermalAnalysis() +tanalysis.set_timestep(initial_timestep=0.1) +tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) +ts.add(tanalysis) + +ts.set_timestep(timestep_size_for_mass_scaled=0.01) + +mat = MatElasticPlasticThermal( + mass_density=1.0, + temperatures=(0,10,20,30,40,50), + young_modulus=(1e10,1e10,1e10,1e10,1e10,1e10), + poisson_ratio=(0.3,0.3,0.3,0.3,0.3,0.3), + thermal_expansion=(0,2e-6,4e-6,6e-6,8e-6,1e-5), + yield_stress = (1e20,1e20,1e20,1e20,1e20,1e20) +) +mat.set_thermal_isotropic(density=1,generation_rate_multiplier=10,specific_heat=1,conductivity=1) + +slab = SolidPart(1) +slab.set_material(mat) +slab.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +ts.parts.add(slab) + +# Define initial conddition +for i in range(1,9): + ts.initialconditions.create_temperature(NodeSet([i]),temperature=10) + +solution.set_output_database(glstat=0.03) +solution.create_database_binary(dt=0.01) +solution.save_file() diff --git a/version/0.2/_downloads/deb99af49d21747cb9cfb700f66939b1/icfd_strong_fsi.py b/version/0.2/_downloads/deb99af49d21747cb9cfb700f66939b1/icfd_strong_fsi.py new file mode 100644 index 000000000..65eea4f39 --- /dev/null +++ b/version/0.2/_downloads/deb99af49d21747cb9cfb700f66939b1/icfd_strong_fsi.py @@ -0,0 +1,106 @@ +""" +Strong FSI +========== + +This example shows a simple FSI coupling problem using strong FSI. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ShellPart, + ShellFormulation, + PartSet, + Curve, + DOF, + Motion +) +from ansys.dyna.core.pre.dynamaterial import MatRigid +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/strong_fsi.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.strong_fsi + os.sep +fns.append(path + "strong_fsi.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfdanalysis.set_fsi() +icfd.add(icfdanalysis) + +icfd.implicitanalysis.set_initial_timestep_size( + size=10 +) +icfd.implicitanalysis.set_dynamic(gamma=0.6, beta=0.4) +icfd.implicitanalysis.set_solution( + iteration_limit=100, stiffness_reformation_limit=150 +) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.set_fsi() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +#define rigid cylinder +matrigid = MatRigid(mass_density=1.2,young_modulus=2e11,poisson_ratio=0.3) +cylinder = ShellPart(1) +cylinder.set_material(matrigid) +cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS) +icfd.parts.add(cylinder) +# Define boundary conddition +icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY) + +solution.create_database_binary(dt=0.1) +solution.save_file() diff --git a/version/0.2/_downloads/dff1fd718c788ff289bc3567fbe7d66e/em_railgun.ipynb b/version/0.2/_downloads/dff1fd718c788ff289bc3567fbe7d66e/em_railgun.ipynb new file mode 100644 index 000000000..e357dad30 --- /dev/null +++ b/version/0.2/_downloads/dff1fd718c788ff289bc3567fbe7d66e/em_railgun.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Railgun example\n===============\n\nThis example demonstrates how to create an EM Railgun input deck.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.0\\_365-gf8a97bda2a\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaem import (\n DynaEM,\n Circuit,\n CircuitType,\n SegmentSet,\n NodeSet,\n Curve,\n SolidPart,\n SolidFormulation,\n EMContact,\n BEMSOLVER,\n FEMSOLVER,\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatElastic, MatRigid, EMMATTYPE\nfrom em_railgun_data import *\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nem_solution = DynaSolution(hostname)\nfns = []\npath = examples.em_railgun + os.sep\nfns.append(path + \"em_railgun.k\")\nem_solution.open_files(fns)\nem_solution.set_termination(termination_time=3e-4)\nem_solution.create_database_binary(dt=5e-6)\n\nrailgun = DynaEM()\nem_solution.add(railgun)\n\nrailgun.analysis.set_timestep(timestep=5e-6)\nrailgun.analysis.set_solver_bem(solver=BEMSOLVER.PCG)\nrailgun.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3)\n\ncircuit = Circuit(\n circuit_type=CircuitType.IMPOSED_CURRENT_VS_TIME,\n loadcurve=Curve(x=[0, 8e-5, 2e-4, 4e-4, 6e-4, 1e-3], y=[0, 350, 450, 310, 230, 125], sfo=2e6),\n)\ncircuit.set_current(\n current=SegmentSet(cur), current_inlet=SegmentSet(inlet), current_outlet=SegmentSet(outlet)\n)\nrailgun.add(circuit)\n\nmatelastic = MatElastic(mass_density=2.64e-3, young_modulus=9.7e10, poisson_ratio=0.31)\nmatelastic.set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=25)\nmatrigid = MatRigid(\n mass_density=2.64e-3,\n young_modulus=9.7e10,\n poisson_ratio=0.31,\n center_of_mass_constraint=1,\n translational_constraint=7,\n rotational_constraint=7,\n)\nmatrigid.set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=25)\n\ncoil = SolidPart(1)\ncoil.set_material(matelastic)\ncoil.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nrailgun.parts.add(coil)\n\nworkpiece1 = SolidPart(2)\nworkpiece1.set_material(matrigid)\nworkpiece1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nrailgun.parts.add(workpiece1)\n\nworkpiece2 = SolidPart(3)\nworkpiece2.set_material(matrigid)\nworkpiece2.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nrailgun.parts.add(workpiece2)\n\nrailgun.boundaryconditions.create_spc(NodeSet(spc1), tx=False, ty=False, rz=False, death=0)\nrailgun.boundaryconditions.create_spc(NodeSet(spc2), tx=False, ty=False, rz=False, death=0)\n\ncontact = EMContact()\nrailgun.contacts.add(contact)\n\nrailgun.set_rogowsky_coil_to_output_current(SegmentSet(cur))\n\nem_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/f2b17e41428aefa2fc2b234ab1eb9292/iga_sample.py b/version/0.2/_downloads/f2b17e41428aefa2fc2b234ab1eb9292/iga_sample.py new file mode 100644 index 000000000..a7881cd75 --- /dev/null +++ b/version/0.2/_downloads/f2b17e41428aefa2fc2b234ab1eb9292/iga_sample.py @@ -0,0 +1,121 @@ +""" +IGA example +===================== + +This example demonstrates how to create an IGA input deck. \n +LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaiga import ( + DynaIGA, + IGAPart, + PartSet, + IGAFormulation, + SolidPart, + HourglassType, + SolidFormulation, + RigidwallCylinder, + Point, + Curve, + Direction, + ContactType, + ContactCategory, + OffsetType, +) +from ansys.dyna.core.pre.dynamech import * +from ansys.dyna.core.pre.dynamaterial import MatPiecewiseLinearPlasticity, MatSpotweld +from iga_sample_data import * +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/iga/rkrweld.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +iga_solution = DynaSolution(hostname) +fns = [] +path = examples.iga_sample + os.sep +fns.append(path + "maino.k") +fns.append(path + "rkrwelds.key") +fns.append(path + "27parts.key") +iga_solution.open_files(fns) + +iga_solution.set_termination(20) +iga_solution.create_database_binary(dt=0.1) + +iga = DynaIGA() +iga_solution.add(iga) + +iga.set_timestep(timestep_size_for_mass_scaled=-0.0004) + +# define material +plastic = MatPiecewiseLinearPlasticity( + mass_density=7.830e-06, young_modulus=200, yield_stress=1.5, tangent_modulus=0.5 +) +swmatlist = [] +for mat in materialdata: + spotweld = MatSpotweld( + mass_density=mat[0], + young_modulus=mat[1], + poisson_ratio=mat[2], + yield_stress=mat[3], + plastic_hardening_modulus=mat[4], + axial_force_resultant_at_failure=mat[5], + force_resultant_nrs_at_failure=mat[6], + force_resultant_nrt_at_failure=mat[7], + ) + swmatlist.append(spotweld) + +for id in igaparts: + part = IGAPart(id) + part.set_material(plastic) + part.set_element_formulation(IGAFormulation.REISSNER_MINDLIN_FIBERS_AT_CONTROL_POINTS) + part.set_thickness(1.0) + iga.parts.add(part) + +for index in range(len(spotwelds)): + part = SolidPart(spotwelds[index]) + if index != 1: + part.set_hourglass(type=HourglassType.BELYTSCHKO_BINDEMAN) + part.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + part.set_material(swmatlist[index]) + iga.parts.add(part) + +cylinder1 = RigidwallCylinder( + Point(2472.37, -600.000, 1270.98), Point(2472.37, -600.000, 2668.53), 100, 1000 +) +iga.add(cylinder1) +cylinder2 = RigidwallCylinder( + Point(3580.25, -600.000, 1261.37), Point(3580.25, -600.000, 3130.49), 100, 1000 +) +iga.add(cylinder2) +cylinder3 = RigidwallCylinder( + Point(3090.59, -955.35, 1299.42), Point(3090.59, -955.35, 2958.43), 100, 1000 +) +cylinder3.set_motion(Curve(x=[0, 100], y=[20, 20]), dir=Direction(0, 1, 0)) +iga.add(cylinder3) + +# define contact +selfcontact = Contact(type=ContactType.AUTOMATIC) +selfcontact.set_friction_coefficient(static=0.2) +surf1 = ContactSurface(PartSet(igaparts)) +selfcontact.set_slave_surface(surf1) +iga.add(selfcontact) + +swcontact = Contact( + type=ContactType.TIED, + category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT, + offset=OffsetType.OFFSET, +) +spotweldsolid = ContactSurface(PartSet(spotwelds)) +spotweldsurface = ContactSurface(PartSet(igaparts)) +swcontact.set_slave_surface(spotweldsolid) +swcontact.set_master_surface(spotweldsurface) +iga.add(swcontact) + +iga_solution.save_file() diff --git a/version/0.2/_downloads/f772d2eaa98aea077addd1d4ac381d80/icfd_plate_flow.ipynb b/version/0.2/_downloads/f772d2eaa98aea077addd1d4ac381d80/icfd_plate_flow.ipynb new file mode 100644 index 000000000..bb39a70fc --- /dev/null +++ b/version/0.2/_downloads/f772d2eaa98aea077addd1d4ac381d80/icfd_plate_flow.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Plate flow\n==========\n\nThis example shows a simple ICFD input deck with a coarse mesh.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.1\\_138-g8429c8a10f\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.plate_flow + os.sep\nfns.append(path + \"plate_flow.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=100)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=2)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3])\nmeshvol.embed_shell([4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/f931ce2f3420bcc18336a610f9d61e31/icfd_sloshing.ipynb b/version/0.2/_downloads/f931ce2f3420bcc18336a610f9d61e31/icfd_sloshing.ipynb new file mode 100644 index 000000000..6b3a858d4 --- /dev/null +++ b/version/0.2/_downloads/f931ce2f3420bcc18336a610f9d61e31/icfd_sloshing.ipynb @@ -0,0 +1,54 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "%matplotlib inline" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Sloshing\n========\n\nThis example shows how to directly impose a displacement of the entire\nvolume mesh through the use of the keyword ICFD\\_CONTROL\\_IMPOSED\\_MOVE.\n\nLS-DYNA version :\nls-dyna\\_smp\\_d\\_R13.0\\_365-gf8a97bda2a\\_winx64\\_ifort190.exe\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n Curve,\n Gravity,\n GravityOption,\n Compressible\n )\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.sloshing + os.sep\nfns.append(path + \"sloshing.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=1)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.02)\nicfd.add(icfdanalysis)\n\n# define model\nmat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001)\nmat2 = MatICFD(flag=Compressible.VACUUM)\n\npart_bottom = ICFDPart(1)\npart_bottom.set_material(mat1)\npart_bottom.set_non_slip()\nicfd.parts.add(part_bottom)\n\npart_top = ICFDPart(2)\npart_top.set_material(mat2)\npart_top.set_non_slip()\nicfd.parts.add(part_top)\n\npart_mid = ICFDPart(3)\npart_mid.set_material(mat1)\nicfd.parts.add(part_mid)\n\ng = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 10000], y=[9.81, 9.81]))\nicfd.add(g)\n\nicfd.set_imposed_move(vx=Curve(x=[0, 0.5, 0.52, 0.8, 0.82, 2.0], y=[1, 1, -1, -1, 0, 0]))\n\npartvol_bottom = ICFDVolumePart(surfaces=[1, 3])\npartvol_bottom.set_material(mat1)\nicfd.parts.add(partvol_bottom)\n\npartvol_top = ICFDVolumePart(surfaces=[2, 3])\npartvol_top.set_material(mat2)\nicfd.parts.add(partvol_top)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2])\nmeshvol.set_fluid_interfaces([3])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.02)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.16" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.2/_downloads/fa27bef149c4f04c67f5d551cc275438/rigidtest.py b/version/0.2/_downloads/fa27bef149c4f04c67f5d551cc275438/rigidtest.py new file mode 100644 index 000000000..a33bb6852 --- /dev/null +++ b/version/0.2/_downloads/fa27bef149c4f04c67f5d551cc275438/rigidtest.py @@ -0,0 +1,135 @@ +""" +Rigid test example +===================== + +This example show how to create an ISPH model with Pydyna-pre module. \n +LS-DYNA version : ls-dyna_mpp_d_R13.0_365-gf8a97bda2a_winx64_ifort190_msmpi.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatSPHIncompressibleFluid, + MatSPHIncompressibleStructure, +) +from ansys.dyna.core.pre.dynaisph import ( + DynaISPH, + Box, + Point, + Curve, + PartSet, + ShellPart, + ShellFormulation, + ISPHStructPart, + ISPHFluidPart, + DOF, + Motion, + Gravity, + GravityOption, +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/isph/rigidtest.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +isphsolution = DynaSolution(hostname) +fns = [] +path = examples.isph_rigidtest + os.sep +fns.append(path + "rigidtest.k") +isphsolution.open_files(fns) + +isphsolution.set_termination(0.5) + +isphobj = DynaISPH() +isphsolution.add(isphobj) + +isphobj.set_timestep( + tssfac=1, max_timestep=Curve(x=[0, 0.04, 0.05, 0.1, 100], y=[0.5, 0.5, 1, 1, 1]) +) +isphobj.isphanalysis.set_box(Box(-750, 800, -800, 800, -100, 3000)) + +platemat1 = MatRigid( + mass_density=1e-9, + young_modulus=10, + center_of_mass_constraint=1, + translational_constraint=5, + rotational_constraint=4, +) +platemat2 = MatRigid( + mass_density=1e-9, + young_modulus=10, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, +) +# platemat3 = MatRigid(mass_density=1e-9,young_modulus=10) +# matelastic = MatElastic(mass_density=1e-9,young_modulus=1) +matsphfluid = MatSPHIncompressibleFluid( + mass_density=1e-9, dynamic_viscosity=1e-9, tension_coefficient1=1e6, tension_coefficient2=1000 +) +matsphstruct = MatSPHIncompressibleStructure(mass_density=1e-9) + +sensorplane = ShellPart(1) +sensorplane.set_material(platemat2) +sensorplane.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +sensorplane.set_thickness(0.1) +isphobj.parts.add(sensorplane) + +movingcube = ShellPart(7) +movingcube.set_material(platemat1) +movingcube.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +movingcube.set_thickness(0.1) +isphobj.parts.add(movingcube) + +wallsmesh = ShellPart(8) +wallsmesh.set_material(platemat2) +wallsmesh.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +wallsmesh.set_thickness(0.1) +isphobj.parts.add(wallsmesh) + +sphwall = ISPHStructPart(4, PartSet([8]), 12) +sphwall.set_material(matsphstruct) +sphwall.set_smoothing_length(1, 1, 1, 12) +isphobj.parts.add(sphwall) + +sphcube = ISPHStructPart(5, PartSet([7]), 12) +sphcube.set_material(matsphstruct) +sphcube.set_smoothing_length(1, 1, 1, 12) +isphobj.parts.add(sphcube) + +sphwater = ISPHFluidPart(6, Point(-588, -588, 9), Point(1176, 1176, 204), 98, 98, 17) +sphwater.set_material(matsphfluid) +sphwater.set_smoothing_length(1, 1, 1, 12) +sphwater.create_massflow_plane(PartSet([1])) +isphobj.parts.add(sphwater) + +# Constraint +isphobj.constraints.merge_two_rigid_bodies(7, 1) + +# Define boundary conddition +isphobj.boundaryconditions.create_imposed_motion( + PartSet([7]), + Curve(x=[0, 0.1, 0.11, 20], y=[3000, 3000, 0, 0]), + dof=DOF.X_TRANSLATIONAL, + motion=Motion.VELOCITY, +) +isphobj.boundaryconditions.create_imposed_motion( + PartSet([7]), + Curve(x=[0, 0.1, 0.11, 20], y=[500, 500, 500, 500]), + dof=DOF.Z_ROTATIONAL, + motion=Motion.VELOCITY, + scalefactor=0.01, +) + +# Load +g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 100], y=[9810, 9810])) +isphobj.add(g) + +isphsolution.set_output_database(glstat=0.001, sphmassflow=0.001) +isphsolution.create_database_binary(dt=0.01) +isphsolution.save_file() diff --git a/version/0.2/_downloads/fc54448b1d063bcbabcf08f2cb3771e4/icfd_driven_cavity.py b/version/0.2/_downloads/fc54448b1d063bcbabcf08f2cb3771e4/icfd_driven_cavity.py new file mode 100644 index 000000000..8ecf40426 --- /dev/null +++ b/version/0.2/_downloads/fc54448b1d063bcbabcf08f2cb3771e4/icfd_driven_cavity.py @@ -0,0 +1,70 @@ +""" +Driven cavity +============= + +This example shows the universally famous driven cavity case tested with the second order steady solver and for Re=1000. \n +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ICFD_AnalysisType, + ICFD_MessageLevel, + ICFDDOF +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/driven_cavity.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.driven_cavity + os.sep +fns.append(path + "driven_cavity.k") +solution.open_files(fns) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_type(analysis_type=ICFD_AnalysisType.STEADY_STATE_ANALYSIS) +icfdanalysis.set_output(messagelevel=ICFD_MessageLevel.FULL_OUTPUT_INFORMATION,iteration_interval=250) +icfdanalysis.set_steady_state(max_iteration=2500,momentum_tol_limit=1e-8,pressure_tol_limit=1e-8,velocity_relax_param=1,pressure_relax_param=1) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1, dynamic_viscosity=0.001) + +part1 = ICFDPart(1) +part1.set_material(mat) +part1.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +icfd.parts.add(part1) + +part2 = ICFDPart(2) +part2.set_material(mat) +part2.set_non_slip() +icfd.parts.add(part2) + +partvol = ICFDVolumePart(surfaces=[1, 2]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2]) +icfd.add(meshvol) + +solution.create_database_binary(dt=250) +solution.save_file() diff --git a/version/0.2/_images/sphx_glr_airbag_deploy_thumb.png b/version/0.2/_images/sphx_glr_airbag_deploy_thumb.png new file mode 100644 index 000000000..82fd57b81 Binary files /dev/null and b/version/0.2/_images/sphx_glr_airbag_deploy_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_belted_dummy_thumb.png b/version/0.2/_images/sphx_glr_belted_dummy_thumb.png new file mode 100644 index 000000000..59777891b Binary files /dev/null and b/version/0.2/_images/sphx_glr_belted_dummy_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_camry_rc_thumb.png b/version/0.2/_images/sphx_glr_camry_rc_thumb.png new file mode 100644 index 000000000..93e0ffa84 Binary files /dev/null and b/version/0.2/_images/sphx_glr_camry_rc_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_em_railgun_thumb.png b/version/0.2/_images/sphx_glr_em_railgun_thumb.png new file mode 100644 index 000000000..8ddb7bbc2 Binary files /dev/null and b/version/0.2/_images/sphx_glr_em_railgun_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_frf_plate_damping_thumb.png b/version/0.2/_images/sphx_glr_frf_plate_damping_thumb.png new file mode 100644 index 000000000..67cf56c55 Binary files /dev/null and b/version/0.2/_images/sphx_glr_frf_plate_damping_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_cylinderflow_thumb.png b/version/0.2/_images/sphx_glr_icfd_cylinderflow_thumb.png new file mode 100644 index 000000000..a08dedbbd Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_cylinderflow_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_dam_break_thumb.png b/version/0.2/_images/sphx_glr_icfd_dam_break_thumb.png new file mode 100644 index 000000000..c8bd883ed Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_dam_break_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_dem_coupling_thumb.png b/version/0.2/_images/sphx_glr_icfd_dem_coupling_thumb.png new file mode 100644 index 000000000..4cbc141ad Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_dem_coupling_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_driven_cavity_thumb.png b/version/0.2/_images/sphx_glr_icfd_driven_cavity_thumb.png new file mode 100644 index 000000000..805b07279 Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_driven_cavity_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_free_convection_flow_thumb.png b/version/0.2/_images/sphx_glr_icfd_free_convection_flow_thumb.png new file mode 100644 index 000000000..8164be344 Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_free_convection_flow_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_imposed_move_thumb.png b/version/0.2/_images/sphx_glr_icfd_imposed_move_thumb.png new file mode 100644 index 000000000..a033a48bc Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_imposed_move_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_internal_3d_flow_thumb.png b/version/0.2/_images/sphx_glr_icfd_internal_3d_flow_thumb.png new file mode 100644 index 000000000..16a0a3418 Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_internal_3d_flow_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_mesh_adaptivity_thumb.png b/version/0.2/_images/sphx_glr_icfd_mesh_adaptivity_thumb.png new file mode 100644 index 000000000..02cf5d142 Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_mesh_adaptivity_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_mesh_morphing_thumb.png b/version/0.2/_images/sphx_glr_icfd_mesh_morphing_thumb.png new file mode 100644 index 000000000..164358867 Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_mesh_morphing_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_mesh_size_thumb.png b/version/0.2/_images/sphx_glr_icfd_mesh_size_thumb.png new file mode 100644 index 000000000..5126e35b7 Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_mesh_size_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_plate_flow_thumb.png b/version/0.2/_images/sphx_glr_icfd_plate_flow_thumb.png new file mode 100644 index 000000000..9b8d31f11 Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_plate_flow_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_sloshing_thumb.png b/version/0.2/_images/sphx_glr_icfd_sloshing_thumb.png new file mode 100644 index 000000000..0aa4a0acb Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_sloshing_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_strong_fsi_thumb.png b/version/0.2/_images/sphx_glr_icfd_strong_fsi_thumb.png new file mode 100644 index 000000000..784b9df3b Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_strong_fsi_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_thermal_flow_thumb.png b/version/0.2/_images/sphx_glr_icfd_thermal_flow_thumb.png new file mode 100644 index 000000000..f1f986e3e Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_thermal_flow_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_icfd_weak_fsi_thumb.png b/version/0.2/_images/sphx_glr_icfd_weak_fsi_thumb.png new file mode 100644 index 000000000..10f0e7d92 Binary files /dev/null and b/version/0.2/_images/sphx_glr_icfd_weak_fsi_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_iga_sample_thumb.png b/version/0.2/_images/sphx_glr_iga_sample_thumb.png new file mode 100644 index 000000000..729c9bf19 Binary files /dev/null and b/version/0.2/_images/sphx_glr_iga_sample_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_rigidtest_thumb.png b/version/0.2/_images/sphx_glr_rigidtest_thumb.png new file mode 100644 index 000000000..f7abca2a9 Binary files /dev/null and b/version/0.2/_images/sphx_glr_rigidtest_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_sale_efp_thumb.png b/version/0.2/_images/sphx_glr_sale_efp_thumb.png new file mode 100644 index 000000000..7182b6df7 Binary files /dev/null and b/version/0.2/_images/sphx_glr_sale_efp_thumb.png differ diff --git a/version/0.2/_images/sphx_glr_thermal_stress_thumb.png b/version/0.2/_images/sphx_glr_thermal_stress_thumb.png new file mode 100644 index 000000000..988cae9e4 Binary files /dev/null and b/version/0.2/_images/sphx_glr_thermal_stress_thumb.png differ diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynabase.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynabase.rst.txt new file mode 100644 index 000000000..ef299db44 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynabase.rst.txt @@ -0,0 +1,6 @@ +dynabase +======== + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynabase \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynadem.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynadem.rst.txt new file mode 100644 index 000000000..646962a6f --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynadem.rst.txt @@ -0,0 +1,6 @@ +dynadem +======= + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynadem \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaem.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaem.rst.txt new file mode 100644 index 000000000..7d6341d46 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaem.rst.txt @@ -0,0 +1,6 @@ +dynaem +====== + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynaem \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaicfd.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaicfd.rst.txt new file mode 100644 index 000000000..7383493e0 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaicfd.rst.txt @@ -0,0 +1,6 @@ +dynaicfd +======== + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynaicfd \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaiga.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaiga.rst.txt new file mode 100644 index 000000000..8a9873e09 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaiga.rst.txt @@ -0,0 +1,6 @@ +dynaiga +======= + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynaiga \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaisph.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaisph.rst.txt new file mode 100644 index 000000000..27c9867f4 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynaisph.rst.txt @@ -0,0 +1,6 @@ +dynaisph +======== + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynaisph \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynamaterial.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynamaterial.rst.txt new file mode 100644 index 000000000..a803819b5 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynamaterial.rst.txt @@ -0,0 +1,6 @@ +dynamaterial +============ + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynamaterial \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynamech.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynamech.rst.txt new file mode 100644 index 000000000..8aa35290f --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynamech.rst.txt @@ -0,0 +1,6 @@ +dynamech +======== + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynamech \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynanvh.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynanvh.rst.txt new file mode 100644 index 000000000..8331cd461 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynanvh.rst.txt @@ -0,0 +1,6 @@ +dynanvh +======= + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynanvh \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynasale.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynasale.rst.txt new file mode 100644 index 000000000..abf6549e8 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynasale.rst.txt @@ -0,0 +1,6 @@ +dynasale +======== + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynasale \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynasolution.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynasolution.rst.txt new file mode 100644 index 000000000..c501aa08e --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.pre.dynasolution.rst.txt @@ -0,0 +1,6 @@ +dynasolution +============ + +.. currentmodule:: ansys.dyna.core.pre + +.. automodule:: dynasolution \ No newline at end of file diff --git a/version/0.2/_sources/API/_autosummary/ansys.dyna.core.solver.dynasolver.rst.txt b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.solver.dynasolver.rst.txt new file mode 100644 index 000000000..dede5f4d7 --- /dev/null +++ b/version/0.2/_sources/API/_autosummary/ansys.dyna.core.solver.dynasolver.rst.txt @@ -0,0 +1,6 @@ +dynasolver +========== + +.. currentmodule:: ansys.dyna.core.solver + +.. automodule:: dynasolver \ No newline at end of file diff --git a/version/0.2/_sources/API/index.rst.txt b/version/0.2/_sources/API/index.rst.txt new file mode 100644 index 000000000..4a5f5c4cc --- /dev/null +++ b/version/0.2/_sources/API/index.rst.txt @@ -0,0 +1,15 @@ +============= +API reference +============= + +This section describes PyDyna core classes, methods, and functions +for LS-Dyna apps and modules. Use the search feature or click links +to view API documentation. + +.. toctree:: + :maxdepth: 5 + + pre + solver + + \ No newline at end of file diff --git a/version/0.2/_sources/API/pre.rst.txt b/version/0.2/_sources/API/pre.rst.txt new file mode 100644 index 000000000..3bbeb848c --- /dev/null +++ b/version/0.2/_sources/API/pre.rst.txt @@ -0,0 +1,25 @@ +PyDyna-pre APIs +=============== + +The PyDyna-pre API includes classes for apps and modules. + +.. currentmodule:: ansys.dyna.core + +.. autosummary:: + :template: custom-module-template.rst + :toctree: _autosummary + + pre.dynabase + pre.dynasolution + pre.dynamech + pre.dynaem + pre.dynaicfd + pre.dynaiga + pre.dynaisph + pre.dynamaterial + pre.dynanvh + pre.dynasale + pre.dynadem + + + \ No newline at end of file diff --git a/version/0.2/_sources/API/solver.rst.txt b/version/0.2/_sources/API/solver.rst.txt new file mode 100644 index 000000000..aea8147b4 --- /dev/null +++ b/version/0.2/_sources/API/solver.rst.txt @@ -0,0 +1,11 @@ +PyDyna-solver APIs +=================== +The PyDyna-solver API includes classes for apps and modules. + +.. currentmodule:: ansys.dyna.core + +.. autosummary:: + :template: custom-module-template.rst + :toctree: _autosummary + + solver.dynasolver diff --git a/version/0.2/_sources/Resources/Contributing.rst.txt b/version/0.2/_sources/Resources/Contributing.rst.txt new file mode 100644 index 000000000..9fc662378 --- /dev/null +++ b/version/0.2/_sources/Resources/Contributing.rst.txt @@ -0,0 +1,8 @@ +Contributing +------------- + +Overall guidance on contributing to a PyAnsys repository appears in the +`Contributing `_ topic +in the *PyAnsys Developer's Guide*. Ensure that you are thoroughly familiar +with it and all `Guidelines and Best Practices `_ +before attempting to contribute to PyDyna. \ No newline at end of file diff --git a/version/0.2/_sources/Resources/Getting_Started.rst.txt b/version/0.2/_sources/Resources/Getting_Started.rst.txt new file mode 100644 index 000000000..03ea27823 --- /dev/null +++ b/version/0.2/_sources/Resources/Getting_Started.rst.txt @@ -0,0 +1,50 @@ +Getting started +=============== + +Installation +~~~~~~~~~~~~ + +This package is not yet available on the public PyPI, but you can still install +it using ``pip`` from our private PyPI repository. + +The following on Windows: + +.. code:: + + set PYANSYS_PYPI_PRIVATE_PAT= + set INDEX_URL=https://%PYANSYS_PYPI_PRIVATE_PAT%@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/ + python -m pip install ansys-dyna-core --index-url %INDEX_URL% + +And if you are running Linux: + +.. code:: + + PYANSYS_PYPI_PRIVATE_PAT= + export INDEX_URL='https://$PYANSYS_PYPI_PRIVATE_PAT@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/' + python -m pip install ansys-dyna-core --index-url $INDEX_URL + +Email your friendly PyAnsys team member for the ``PYANSYS_PYPI_PRIVATE_PAT`` +at `pyansys.core@ansys.com `_ or send us a message via Teams. + +**Installing from git** + +If you have ``git`` installed and want the bleeding edge version: + +.. code:: + + pip install -U git+https://github.com/pyansys/pyDyna@main + +You need to be logged into GitHub locally and be a member of the `PyAnsys Organization `_. + +Alternatively, if you need to modify the repository locally (or want to +do local development), you can clone it and install it in "development" mode with: + +.. code:: + + git clone https://github.com/pyansys/pyDyna + cd pyDyna + pip install -e . + +Note the ``-e`` flag, which denotes that you are in development mode. +You can make changes in the local ``pyDyna`` and have them reflected +in your local install of PyDyna. diff --git a/version/0.2/_sources/Resources/User_Guide.rst.txt b/version/0.2/_sources/Resources/User_Guide.rst.txt new file mode 100644 index 000000000..eccbf28f7 --- /dev/null +++ b/version/0.2/_sources/Resources/User_Guide.rst.txt @@ -0,0 +1,37 @@ +User guide +---------- + +There are 3 related packages here, all under the ``ansys/dyna`` directory. + +PyDyna-pre provides interface to create DYNA input deck. + +PyDyna-solver contains code for interfacing with the LS-DYNA solver directly. +As LS-DYNA is primarily a batch solver with very limited interactive +capabilities, the code here is similarly limited. The target +use case is that LS-DYNA is running in a container environment +such as Docker or Kubernetes. The code here then allows for pushing +input files to the container, starting LS-DYNA and monitoring its +progress, and retrieving results files. + +The Data Processing Framework (DPF) is designed to provide numerical +simulation users/engineers with a toolbox for accessing and +transforming simulation data. DPF can access data from solver result +files as well as several neutral formats (``.csv``, ``.hdf5``, ``.vtk``, +etc.). Various operators are available allowing the manipulation and +the transformation of this data. + +The Python `ansys-dpf-post` package provides a simplified Python +interface to DPF, thus enabling rapid postprocessing without ever +leaving a Python environment. + +Visit the `DPF-Post Documentation `_ for a +detailed description of the package + +.. toctree:: + :hidden: + + pydyna_pre + pydyna_solver + pydyna_post + + diff --git a/version/0.2/_sources/Resources/pydyna_post.rst.txt b/version/0.2/_sources/Resources/pydyna_post.rst.txt new file mode 100644 index 000000000..9e83ed1be --- /dev/null +++ b/version/0.2/_sources/Resources/pydyna_post.rst.txt @@ -0,0 +1,1034 @@ +Using PyDPF-post for LS-DYNA +============================ + +Operators +~~~~~~~~~ + +1. ``d3plot`` + +- ``lsdyna::d3plot::meshes_provider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + # for regular mesh + meshOP = dpf.Operator("lsdyna::d3plot::meshes_provider") + meshOP.inputs.data_sources.connect(ds) + meshes = meshOP.outputs.meshes() + mesh = meshes.get_mesh({}) + + # for adaptive mesh + meshOP = dpf.Operator("lsdyna::d3plot::meshes_provider") + meshOP.inputs.data_sources.connect(ds) + timeScoping = dpf.Scoping() + timeScoping.ids = list(range(1, 21)) + meshOP.inputs.time_scoping.connect(timeScoping) + meshes = meshOP.outputs.meshes() + mesh = meshes.get_mesh({'time':1}) + +- ``lsdyna::d3plot::U`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + coord = dpf.Operator("lsdyna::d3plot::U") + coord.inputs.data_sources.connect(ds) + # set the time + coord.inputs.time_scoping.connect([3]) + fields = coord.outputs.displacement() + +- ``lsdyna::d3plot::TimeFreqSupportProvider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + time = dpf.Operator("lsdyna::d3plot::TimeFreqSupportProvider") + time.inputs.data_sources.connect(ds) + result_time_freq_support = time.outputs.time_freq_support() + +- ``lsdyna::d3plot::result_info_provider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultInfoOp = dpf.Operator("lsdyna::d3plot::result_info_provider") + resultInfoOp.inputs.data_sources(ds) + result_info = resultInfoOp.outputs.result_info() + +- ``lsdyna::d3plot::eng_ke`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::eng_ke") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.global_kinetic_energy() + +- ``lsdyna::d3plot::global_internal_energy`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::global_internal_energy") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.global_internal_energy() + +- ``lsdyna::d3plot::global_total_energy`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::global_total_energy") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.global_total_energy() + +- ``lsdyna::d3plot::global_velocity`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::global_velocity") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.global_velocity() + +- ``lsdyna::d3plot::node_initial_coordinates`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_initial_coordinates") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_initial_coordinates() + +- ``lsdyna::d3plot::node_coordinates`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_coordinates") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_coordinates() + +- ``lsdyna::d3plot::V`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::V") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_velocities() + +- ``lsdyna::d3plot::A`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::A") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_accelerations() + +- ``lsdyna::d3plot::node_temperature`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_temperature") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_temperature() + +- ``lsdyna::d3plot::node_heat_flux`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_heat_flux") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_heat_flux() + +- ``lsdyna::d3plot::node_mass_scaling`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_mass_scaling") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_mass_scaling() + +- ``lsdyna::d3plot::node_temperature_divide_time`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_temperature_divide_time") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_temperature_divide_time() + +- ``lsdyna::d3plot::node_residual_force`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_residual_force") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_residual_force() + +- ``lsdyna::d3plot::node_residual_moment`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_residual_moment") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_residual_moment() + +- ``lsdyna::d3plot::node_penetration`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_penetration") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_penetration() + +- ``lsdyna::d3plot::node_relative_penetration`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_relative_penetration") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_relative_penetration() + +- ``lsdyna::d3plot::node_contact_energy_density`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::node_contact_energy_density") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.node_contact_energy_density() + +- ``lsdyna::d3plot::S`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::S") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.stress() + +- ``lsdyna::d3plot::stress_von_mises`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::stress_von_mises") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.stress_von_mises() + +- ``lsdyna::d3plot::effective_plastic_strain`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::effective_plastic_strain") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.effective_plastic_strain() + +- ``lsdyna::d3plot::EPEL`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::EPEL") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.strain() + +- ``lsdyna::d3plot::strain_von_mises`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::strain_von_mises") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.strain_von_mises() + +- ``lsdyna::d3plot::history_var`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::history_var") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.history_var() + +- ``lsdyna::d3plot::thickness`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::thickness") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.thickness() + +- ``lsdyna::d3plot::element_dependent_var_1`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::element_dependent_var_1") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.element_dependent_var_1() + +- ``lsdyna::d3plot::element_dependent_var_2`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::element_dependent_var_2") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.element_dependent_var_2() + +- ``lsdyna::d3plot::mx`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::mx") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.mx() + +- ``lsdyna::d3plot::my`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::my") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.my() + +- ``lsdyna::d3plot::mxy`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::mxy") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.mxy() + +- ``lsdyna::d3plot::qx`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::qx") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.qx() + +- ``lsdyna::d3plot::qy`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::qy") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.qy() + +- ``lsdyna::d3plot::nx`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::nx") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.nx() + +- ``lsdyna::d3plot::ny`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::ny") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.ny() + +- ``lsdyna::d3plot::nxy`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::nxy") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.nxy() + +- ``lsdyna::d3plot::axial_force`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::axial_force") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.axial_force() + +- ``lsdyna::d3plot::s_shear_resultant`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::s_shear_resultant") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.s_shear_resultant() + +- ``lsdyna::d3plot::t_shear_resultant`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::t_shear_resultant") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.t_shear_resultant() + +- ``lsdyna::d3plot::s_bending_moment`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::s_bending_moment") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.s_bending_moment() + +- ``lsdyna::d3plot::t_bending_moment`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::t_bending_moment") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.t_bending_moment() + +- ``lsdyna::d3plot::torsional_resultant`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::torsional_resultant") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.torsional_resultant() + +- ``lsdyna::d3plot::axial_stress`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::axial_stress") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.axial_stress() + +- ``lsdyna::d3plot::rs_shear_stress`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::rs_shear_stress") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.rs_shear_stress() + +- ``lsdyna::d3plot::tr_shear_stress`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::tr_shear_stress") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.tr_shear_stress() + +- ``lsdyna::d3plot::axial_plastic_strain`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::axial_plastic_strain") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.axial_plastic_strain() + +- ``lsdyna::d3plot::axial_strain`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./d3plot', 'd3plot') + + resultOp = dpf.Operator("lsdyna::d3plot::axial_strain") + resultOp.inputs.data_sources(ds) + # set the time + resultOp.inputs.time_scoping.connect([3]) + result = resultOp.outputs.axial_strain() + +2. ``binout`` + +- ``lsdyna::binout::meshes_provider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() ds.set_result_file_path(r'./binout', 'binout') + + meshOP = dpf.Operator("lsdyna::binout::meshes_provider") + meshOP.inputs.data_sources.connect(ds) meshes = meshOP.outputs.meshes() + mesh = meshes.get_mesh({}) + +- ``lsdyna::binout::U`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() ds.set_result_file_path(r'./binout', 'binout') + + coord = dpf.Operator("lsdyna::binout::U") + coord.inputs.data_sources.connect(ds) + # set the time + coord.inputs.time_scoping.connect([3]) + fields = coord.outputs.displacement() + +- ``lsdyna::binout::TimeFreqSupportProvider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r"./binout", "binout") + + op = dpf.Operator("lsdyna::binout::TimeFreqSupportProvider") + op.inputs.data_sources(ds) + result_time_freq_support = op.outputs.time_freq_support() + +- ``lsdyna::binout::glstat::TimeFreqSupportProvider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + op = dpf.Operator("llsdyna::binout::glstat::TimeFreqSupportProvider") + op.inputs.data_sources(ds) + result_time_freq_support = op.outputs.time_freq_support() + +- ``lsdyna::binout::matsum::TimeFreqSupportProvider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + op = dpf.Operator("llsdyna::binout::matsum::TimeFreqSupportProvider") + op.inputs.data_sources(ds) + result_time_freq_support = op.outputs.time_freq_support() + +- ``lsdyna::binout::rcforc::TimeFreqSupportProvider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + op = dpf.Operator("llsdyna::binout::rcforc::TimeFreqSupportProvider") + op.inputs.data_sources(ds) + result_time_freq_support = op.outputs.time_freq_support() + +- ``lsdyna::binout::result_info_provider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + resultInfoOp = dpf.Operator("lsdyna::binout::result_info_provider") + resultInfoOp.inputs.data_sources(ds) + result_info = resultInfoOp.outputs.result_info() + +- ``lsdyna::binout::S`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + stressOp = dpf.Operator("lsdyna::binout::S") + stressOp.inputs.data_sources(ds) + fields = stressOp.outputs.stress() + +- ``lsdyna::binout::EPEL`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + resultOp = dpf.Operator("lsdyna::binout::EPEL") + resultOp.inputs.data_sources(ds) + result = resultOp.outputs.strain() + +- ``lsdyna::binout::glstat`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + glstat_op = dpf.Operator("lsdyna::binout::glstat") + glstat_op.inputs.data_sources(ds) + fields = glstat_op.outputs.results() + + # get correponding result by component(from lsdyna::binout::result_info_provider) + field0 = fields.get_field({"component":0}) + field1 = fields.get_field({"component":1}) + ... + +- ``lsdyna::binout::matsum`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + glstat_op = dpf.Operator("lsdyna::binout::matsum") + glstat_op.inputs.data_sources(ds) + fields = glstat_op.outputs.results() + + # get correponding result by component(from lsdyna::binout::result_info_provider) + field0 = fields.get_field({"component":0}) + field1 = fields.get_field({"component":1}) + ... + +- ``lsdyna::binout::rcforc`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./binout', 'binout') + + glstat_op = dpf.Operator("lsdyna::binout::rcforc") + glstat_op.inputs.data_sources(ds) + fields = glstat_op.outputs.results() + + # get correponding result by component(from lsdyna::binout::result_info_provider) + field0 = fields.get_field({"component":0}) + field1 = fields.get_field({"component":1}) + ... + +1. ``nvh`` + +- ``lsdyna::d3ssd::meshes_provider`` + +- ``lsdyna::d3spcm::meshes_provider`` + +- ``lsdyna::d3psd::meshes_provider`` + +- ``lsdyna::d3rms::meshes_provider`` + +- ``lsdyna::d3zcf::meshes_provider`` + +- ``lsdyna::d3ssd::result_info_provider`` + +- ``lsdyna::d3ssd::U`` + +- ``lsdyna::d3ssd::V`` + +- ``lsdyna::d3ssd::A`` + +- ``lsdyna::d3ssd::S`` + +- ``lsdyna::d3ssd::EPEL`` + +- ``lsdyna::d3ssd::TimeFreqSupportProvider`` + + same as d3plot + +- ``lsdyna::moddynout::TimeFreqSupportProvider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./moddynout', 'moddynout') + + resultOp = dpf.Operator("lsdyna::moddynout::TimeFreqSupportProvider") + resultOp.inputs.data_sources(ds) + result = resultOp.outputs.time_freq_support() + +- ``lsdyna::moddynout::result_info_provider`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./moddynout', 'moddynout') + + resultInfoOp = dpf.Operator("lsdyna::moddynout::result_info_provider") + resultInfoOp.inputs.data_sources(ds) + result_info = resultInfoOp.outputs.result_info() + +- ``lsdyna::moddynout::F`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./moddynout', 'moddynout') + + times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + disOp = dpf.Operator("lsdyna::moddynout::F") + disOp.inputs.data_sources(ds) + disOp.inputs.time_scoping(times) + fields = disOp.outputs.moddynout_force() + +- ``lsdyna::moddynout::A`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./moddynout', 'moddynout') + + times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + disOp = dpf.Operator("lsdyna::moddynout::A") + disOp.inputs.data_sources(ds) + disOp.inputs.time_scoping(times) + fields = disOp.outputs.moddynout_acceleration() + +- ``lsdyna::moddynout::V`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./moddynout', 'moddynout') + + times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + disOp = dpf.Operator("lsdyna::moddynout::V") + disOp.inputs.data_sources(ds) + disOp.inputs.time_scoping(times) + fields = disOp.outputs.moddynout_velocity() + +- ``lsdyna::moddynout::U`` + + .. code:: python + + from ansys.dpf import core as dpf + + ds = dpf.DataSources() + ds.set_result_file_path(r'./moddynout', 'moddynout') + + times = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] + disOp = dpf.Operator("lsdyna::moddynout::U") + disOp.inputs.data_sources(ds) + disOp.inputs.time_scoping(times) + fields = disOp.outputs.moddynout_disp() diff --git a/version/0.2/_sources/Resources/pydyna_pre.rst.txt b/version/0.2/_sources/Resources/pydyna_pre.rst.txt new file mode 100644 index 000000000..33edbf9a9 --- /dev/null +++ b/version/0.2/_sources/Resources/pydyna_pre.rst.txt @@ -0,0 +1,193 @@ +PyDyna-pre +========== + +The PyDyna-pre provide the ability to create keyword ``inputdeck`` through gRPC framework. + +Running pyDyna-pre in ``virtualenv`` +------------------------------------ + +``virtualenv`` is a CLI tool that needs a Python interpreter to run. + +Install ``virtualenv`` +~~~~~~~~~~~~~~~~~~~~~~ + +.. code:: python + + pip install virtualenv + +Create a Python virtual environment of the same version as ``virtualenv``, installed into the subdirectory ``venv``. + +.. code:: python + + virtualenv venv + +Activate ``venv`` on Windows by running command: + +.. code:: python + + cd venv + ./Scripts/activate + +Activate ``venv`` on Linux by running command: + +.. code:: python + + cd venv + source bin/activate + +Copy pyDyna package in ``venv`` folder +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code:: python + + venv/ + pyDyna/ + ansys + /dyna/pre/Server + doc + examples + .flake8 + LICENSE + ... + + +Requirements +------------ + +Go to ``pyDyna/requirements/pythonxx`` according to your Python version. +Then running command: + +.. code:: python + + cd pyDyna/requirement/pythonxx + pip install -r requirements.txt + +Starting the server +------------------- + +So far, Python 3.8/3.9 is used to start server, make sure this like below: + +.. code:: python + + (venv) C:\pyDyna\examples\pre> C:\python38\python.exe --version + Python 3.8.10 + +Here is the minimal content in server folder +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. code:: python + + Server/ + kwserver.py + kwprocess_pb2.py + kwprocess_pb2_grpc.py + lib/ + linux/ + keywordreader.so + windows/ + cp38/keywordreader.pyd + cp39/keywordreader.pyd + + +Starting the server on Windows +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Start server by running command: + +.. code:: python + + shell + (venv) C:\pyDyna\ansys\dyna\pre\Server> python .\kwserver.py + kwgrpc Server listening on: localhost:50051 + +Starting the server on Linux +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Start server by running command: + +.. code:: python + + (venv) :~/pyDyna/ansys/dyna/pre/Server> python kwserver.py + +Running pyDyna-pre client +------------------------- + +See the examples in the examples folder for some basic example. More to be added later. + +Structure ALE demo +~~~~~~~~~~~~~~~~~~ + +Go to ``pyDyna/examples/pre``,and run ``sale_efp.py``: + +.. code:: python + + (venv) C:\pyDyna\examples\pre> python .\sale_efp.py + 2022-07-05 08:19:42 : Connected to kwServer... + 2022-07-05 08:19:42 : C:\pyDyna\examples\pre\input\sale\input\efpcase.k uploaded to server... + 2022-07-05 08:19:43 : Setup Analysis... + 2022-07-05 08:19:43 : Material air Created... + 2022-07-05 08:19:43 : Material air Created... + 2022-07-05 08:19:43 : Material HE Created... + 2022-07-05 08:19:43 : Material HE Created... + 2022-07-05 08:19:43 : Material liner Created... + 2022-07-05 08:19:43 : Material liner Created... + 2022-07-05 08:19:43 : Material vacuum Created... + 2022-07-05 08:19:43 : Material vacuum Created... + 2022-07-05 08:19:43 : ALE Structured mesh 1 Created... + 2022-07-05 08:19:43 : Material air filled in Mesh 1... + 2022-07-05 08:19:43 : Material HE filled in Mesh 1... + 2022-07-05 08:19:43 : Material liner filled in Mesh 1... + 2022-07-05 08:19:43 : Location of high explosive detonation Defined... + 2022-07-05 08:19:43 : Output Setting... + 2022-07-05 08:19:43 : efpcase.k is outputed... + +At the same time, corresponding information is printed in the server side. + +.. code:: bash + + Load model: C:\pyDyna\ansys\dyna\pre\Server\input\efpcase.k + *DATABASE_SALE Created... + Termination Created... + DB Binary Created... + *CONTROL_ALE Created... + *EOS_LINEAR_POLYNOMIAL Created... + *MAT_NULL Created... + *ALE_STRUCTURED_MULTI-MATERIAL_GROUP Created... + *MAT_HIGH_EXPLOSIVE_BURN Created... + *EOS_JWL Created... + *ALE_STRUCTURED_MULTI-MATERIAL_GROUP Created... + *MAT_JOHNSON_COOK Created... + *EOS_GRUNEISEN Created... + *ALE_STRUCTURED_MULTI-MATERIAL_GROUP Created... + *MAT_VACUUM Created... + *ALE_STRUCTURED_MULTI-MATERIAL_GROUP Created... + *ALE_STRUCTURED_MESH_CONTROL_POINTS Created... + *ALE_STRUCTURED_MESH_CONTROL_POINTS Created... + *ALE_STRUCTURED_MESH_CONTROL_POINTS Created... + *ALE_STRUCTURED_MESH Created... + *ALE_STRUCTURED_MESH_VOLUME_FILLING Created... + *ALE_STRUCTURED_MESH_VOLUME_FILLING Created... + *ALE_STRUCTURED_MESH_VOLUME_FILLING Created... + *INITIAL_DETONATION Created... + Database MATSUMCreated... + Database GLSTATCreated... + Saved Successfully! + + +After running this file, the result file is saved in ``pyDyna/ansys/dyna/pre/Server/output``. + +.. code:: bash + + (venv) C:\pyDyna\ansys\dyna\pre\Server> cd .\output\ + (venv) C:\pyDyna\ansys\dyna\pre\Server\output> ls + + + Directory: C:\pyDyna\ansys\dyna\pre\Server\output + + + Mode LastWriteTime Length Name + ---- ------------- ------ ---- + -a---- 2022/7/5 8:19 2436058 efpcase.k + + +Submit the result file, ``efpcase.k``, to LS-Dyna for simulation results. \ No newline at end of file diff --git a/version/0.2/_sources/Resources/pydyna_solver.rst.txt b/version/0.2/_sources/Resources/pydyna_solver.rst.txt new file mode 100644 index 000000000..210e39490 --- /dev/null +++ b/version/0.2/_sources/Resources/pydyna_solver.rst.txt @@ -0,0 +1,33 @@ +PyDyna-solver +============= + +Here is a quick preview for how Python code looks using the +``pyansys-DynaSolver``. For more examples, click the links at the +top of the page to see function, method, and class documentation. + + +Rendered Python code +-------------------- + +.. code:: python + + >>> import ansys.dyna.core.solver as solver + >>> hostname="localhost" + >>> port="5000" + >>> dyna=solver.DynaSolver(hostname,port) + >>> dyna.push("input.k") + >>> dyna.start(3) + >>> dyna.run("i=input.k") + + +Usage +----- +Here is a basic example: + +.. code:: python + + >>> import ansys.dyna.core.solver as solver + >>> dyna=solver.DynaSovler(hostname,port) # connect to the container + >>> dyna.push("input.k") # push an input file + >>> dyna.start(4) # start 4 ranks of mppdyna + >>> dyna.run("i=input.k memory=10m ncycle=20000") # begin execution \ No newline at end of file diff --git a/version/0.2/_sources/_templates/autosummary/base.rst.txt b/version/0.2/_sources/_templates/autosummary/base.rst.txt new file mode 100644 index 000000000..5536fa108 --- /dev/null +++ b/version/0.2/_sources/_templates/autosummary/base.rst.txt @@ -0,0 +1,5 @@ +{{ name | escape | underline}} + +.. currentmodule:: {{ module }} + +.. auto{{ objtype }}:: {{ objname }} diff --git a/version/0.2/_sources/_templates/autosummary/class.rst.txt b/version/0.2/_sources/_templates/autosummary/class.rst.txt new file mode 100644 index 000000000..1fbe69615 --- /dev/null +++ b/version/0.2/_sources/_templates/autosummary/class.rst.txt @@ -0,0 +1,38 @@ +.. vale off + +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + + {% block methods %} + + {% if methods %} + .. rubric:: {{ _('Methods') }} + + .. autosummary:: + :toctree: + {% for item in methods %} + {% if item != "__init__" %} + {{ name }}.{{ item }} + {% endif %} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: {{ _('Attributes') }} + + .. autosummary:: + :toctree: + {% for item in attributes %} + {% if item.0 != item.upper().0 %} + {{ name }}.{{ item }} + {% endif %} + {%- endfor %} + {% endif %} + {% endblock %} + +.. vale on \ No newline at end of file diff --git a/version/0.2/_sources/_templates/custom-class-template.rst.txt b/version/0.2/_sources/_templates/custom-class-template.rst.txt new file mode 100644 index 000000000..1fbe69615 --- /dev/null +++ b/version/0.2/_sources/_templates/custom-class-template.rst.txt @@ -0,0 +1,38 @@ +.. vale off + +{{ fullname | escape | underline}} + +.. currentmodule:: {{ module }} + +.. autoclass:: {{ objname }} + + {% block methods %} + + {% if methods %} + .. rubric:: {{ _('Methods') }} + + .. autosummary:: + :toctree: + {% for item in methods %} + {% if item != "__init__" %} + {{ name }}.{{ item }} + {% endif %} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block attributes %} + {% if attributes %} + .. rubric:: {{ _('Attributes') }} + + .. autosummary:: + :toctree: + {% for item in attributes %} + {% if item.0 != item.upper().0 %} + {{ name }}.{{ item }} + {% endif %} + {%- endfor %} + {% endif %} + {% endblock %} + +.. vale on \ No newline at end of file diff --git a/version/0.2/_sources/_templates/custom-module-template.rst.txt b/version/0.2/_sources/_templates/custom-module-template.rst.txt new file mode 100644 index 000000000..009898a32 --- /dev/null +++ b/version/0.2/_sources/_templates/custom-module-template.rst.txt @@ -0,0 +1,70 @@ +.. vale off + +{{ fullname | escape | underline}} + +.. automodule:: {{ fullname }} + + {% block attributes %} + {% if attributes %} + .. rubric:: Module Attributes + + .. autosummary:: + :toctree: + {% for item in attributes %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block functions %} + {% if functions %} + .. rubric:: {{ _('Functions') }} + + .. autosummary:: + :toctree: + {% for item in functions %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block classes %} + {% if classes %} + .. rubric:: {{ _('Classes') }} + + .. autosummary:: + :toctree: + :template: custom-class-template.rst + {% for item in classes %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + + {% block exceptions %} + {% if exceptions %} + .. rubric:: {{ _('Exceptions') }} + + .. autosummary:: + :toctree: + {% for item in exceptions %} + {{ item }} + {%- endfor %} + {% endif %} + {% endblock %} + +{% block modules %} +{% if modules %} +.. rubric:: Modules + +.. autosummary:: + :toctree: + :template: custom-module-template.rst + :recursive: +{% for item in modules %} + {{ item }} +{%- endfor %} +{% endif %} +{% endblock %} + +.. vale on \ No newline at end of file diff --git a/version/0.2/_sources/examples/Airbag/airbag_deploy.rst.txt b/version/0.2/_sources/examples/Airbag/airbag_deploy.rst.txt new file mode 100644 index 000000000..ff861c964 --- /dev/null +++ b/version/0.2/_sources/examples/Airbag/airbag_deploy.rst.txt @@ -0,0 +1,195 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Airbag/airbag_deploy.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Airbag_airbag_deploy.py: + + +Airbag deploy example +===================== + +This example show how to create an Airbag deploy model with Pydyna-pre module. + +LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-108 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 2023-03-07 08:40:50 : Connected to kwServer... + 2023-03-07 08:40:50 : /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/ansys/dyna/core/pre/examples/airbag/airbag_deploy/airbag_deploy.k uploaded to server... + 2023-03-07 08:40:50 : Setting termination time ... + 2023-03-07 08:40:50 : Curve 1 defined... + 2023-03-07 08:40:50 : Material RIGID Created... + 2023-03-07 08:40:50 : Material RIGID Created... + 2023-03-07 08:40:51 : Material Fabric Created... + 2023-03-07 08:40:51 : Output Setting... + 2023-03-07 08:40:51 : DB Binary Created... + 2023-03-07 08:40:51 : Control Accuracy Created... + 2023-03-07 08:40:51 : Control Bulk Viscosity Created... + 2023-03-07 08:40:51 : Control Energy Created... + 2023-03-07 08:40:51 : Control Hourglass Created... + 2023-03-07 08:40:51 : Control Shell Created... + 2023-03-07 08:40:51 : Control Contact Created... + 2023-03-07 08:40:51 : Contact Created... + 2023-03-07 08:40:51 : Airbag Model Created... + 2023-03-07 08:40:51 : Rigidwall Planar Created... + 2023-03-07 08:40:51 : airbag_deploy.k is outputed... + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Airbag, + PartSet, + Curve, + Point, + RigidwallPlanar, + Contact, + ContactSurface, + ContactCategory, + ShellPart, + ShellFormulation, + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid, MatFabric + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + airbag_solution = DynaSolution(hostname) + fns = [] + # path = sys.path[0] + os.sep + "input" + os.sep + "airbag_deploy" + os.sep + path = examples.airbag_deploy + os.sep + fns.append(path + "airbag_deploy.k") + airbag_solution.open_files(fns) + + airbag_solution.set_termination(0.03) + + airbagdeploy = DynaMech() + airbag_solution.add(airbagdeploy) + + airbag = Airbag( + set=PartSet([3]), + heat_capacity_at_constant_volume=1.736e3, + heat_capacity_at_constant_pressure=2.43e3, + input_gas_temperature=1.2e3, + input_mass_flow_rate=Curve(x=[0, 0.032, 0.045, 0.08], y=[0, 26, 0.6, 0.1]), + shape_factor_for_exit_hole=0.7, + ambient_pressure=14.7, + ambient_density=3.821e-6, + ) + airbagdeploy.add(airbag) + + rigidwall = RigidwallPlanar(Point(0, 0, 0), Point(0, 1, 0), coulomb_friction_coefficient=0.5) + airbagdeploy.add(rigidwall) + + contact = Contact(category=ContactCategory.NODES_TO_SURFACE) + contact.set_friction_coefficient(static=0.5, dynamic=0.5) + surf1 = ContactSurface(PartSet([3])) + surf2 = ContactSurface(PartSet([2])) + surf2.set_penalty_stiffness_scale_factor(0.06667) + contact.set_slave_surface(surf1) + contact.set_master_surface(surf2) + airbagdeploy.contacts.add(contact) + + platemat = MatRigid( + mass_density=7.84e-4, + young_modulus=30e6, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, + ) + cylindermat = MatRigid(mass_density=1.96e-4, young_modulus=30e6) + airbagmat = MatFabric( + mass_density=1e-4, + young_modulus_longitudinal_direction=2e6, + young_modulus_transverse_direction=2e6, + shear_modulus=1.53e6, + ) + + plate = ShellPart(1) + plate.set_material(platemat) + plate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + plate.set_thickness(0.5) + airbagdeploy.parts.add(plate) + + cylinder = ShellPart(2) + cylinder.set_material(cylindermat) + cylinder.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + cylinder.set_thickness(0.5) + airbagdeploy.parts.add(cylinder) + + airbagpart = ShellPart(3) + airbagpart.set_material(airbagmat) + airbagpart.set_element_formulation(ShellFormulation.FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE) + airbagpart.set_thickness(0.015) + airbagpart.set_integration_points(4) + airbagdeploy.parts.add(airbagpart) + + airbag_solution.set_output_database( + abstat=2.0e-4, glstat=2.0e-4, matsum=2.0e-4, rcforc=2.0e-4, rbdout=2.0e-4, rwforc=2.0e-4 + ) + airbag_solution.create_database_binary(dt=5e-4, ieverp=1) + airbag_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.254 seconds) + + +.. _sphx_glr_download_examples_Airbag_airbag_deploy.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: airbag_deploy.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: airbag_deploy.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/Airbag/index.rst.txt b/version/0.2/_sources/examples/Airbag/index.rst.txt new file mode 100644 index 000000000..529954af8 --- /dev/null +++ b/version/0.2/_sources/examples/Airbag/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_Airbag: + +Airbag examples +~~~~~~~~~~~~~~~~ + +These examples show how to create Airbag model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Airbag/images/thumb/sphx_glr_airbag_deploy_thumb.png + :alt: Airbag deploy example + + :ref:`sphx_glr_examples_Airbag_airbag_deploy.py` + +.. raw:: html + +
Airbag deploy example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/Airbag/airbag_deploy + diff --git a/version/0.2/_sources/examples/Airbag/sg_execution_times.rst.txt b/version/0.2/_sources/examples/Airbag/sg_execution_times.rst.txt new file mode 100644 index 000000000..20381fbf2 --- /dev/null +++ b/version/0.2/_sources/examples/Airbag/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_Airbag_sg_execution_times: + +Computation times +================= +**00:00.254** total execution time for **examples_Airbag** files: + ++-------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Airbag_airbag_deploy.py` (``airbag_deploy.py``) | 00:00.254 | 0.0 MB | ++-------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/EM/em_railgun.rst.txt b/version/0.2/_sources/examples/EM/em_railgun.rst.txt new file mode 100644 index 000000000..6144ae867 --- /dev/null +++ b/version/0.2/_sources/examples/EM/em_railgun.rst.txt @@ -0,0 +1,162 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/EM/em_railgun.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_EM_em_railgun.py: + + +Railgun example +=============== + +This example demonstrates how to create an EM Railgun input deck. + +LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-94 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaem import ( + DynaEM, + Circuit, + CircuitType, + SegmentSet, + NodeSet, + Curve, + SolidPart, + SolidFormulation, + EMContact, + BEMSOLVER, + FEMSOLVER, + ) + from ansys.dyna.core.pre.dynamaterial import MatElastic, MatRigid, EMMATTYPE + from em_railgun_data import * + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + em_solution = DynaSolution(hostname) + fns = [] + path = examples.em_railgun + os.sep + fns.append(path + "em_railgun.k") + em_solution.open_files(fns) + em_solution.set_termination(termination_time=3e-4) + em_solution.create_database_binary(dt=5e-6) + + railgun = DynaEM() + em_solution.add(railgun) + + railgun.analysis.set_timestep(timestep=5e-6) + railgun.analysis.set_solver_bem(solver=BEMSOLVER.PCG) + railgun.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3) + + circuit = Circuit( + circuit_type=CircuitType.IMPOSED_CURRENT_VS_TIME, + loadcurve=Curve(x=[0, 8e-5, 2e-4, 4e-4, 6e-4, 1e-3], y=[0, 350, 450, 310, 230, 125], sfo=2e6), + ) + circuit.set_current( + current=SegmentSet(cur), current_inlet=SegmentSet(inlet), current_outlet=SegmentSet(outlet) + ) + railgun.add(circuit) + + matelastic = MatElastic(mass_density=2.64e-3, young_modulus=9.7e10, poisson_ratio=0.31) + matelastic.set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=25) + matrigid = MatRigid( + mass_density=2.64e-3, + young_modulus=9.7e10, + poisson_ratio=0.31, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, + ) + matrigid.set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=25) + + coil = SolidPart(1) + coil.set_material(matelastic) + coil.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + railgun.parts.add(coil) + + workpiece1 = SolidPart(2) + workpiece1.set_material(matrigid) + workpiece1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + railgun.parts.add(workpiece1) + + workpiece2 = SolidPart(3) + workpiece2.set_material(matrigid) + workpiece2.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + railgun.parts.add(workpiece2) + + railgun.boundaryconditions.create_spc(NodeSet(spc1), tx=False, ty=False, rz=False, death=0) + railgun.boundaryconditions.create_spc(NodeSet(spc2), tx=False, ty=False, rz=False, death=0) + + contact = EMContact() + railgun.contacts.add(contact) + + railgun.set_rogowsky_coil_to_output_current(SegmentSet(cur)) + + em_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.759 seconds) + + +.. _sphx_glr_download_examples_EM_em_railgun.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: em_railgun.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: em_railgun.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/EM/index.rst.txt b/version/0.2/_sources/examples/EM/index.rst.txt new file mode 100644 index 000000000..36d1a0254 --- /dev/null +++ b/version/0.2/_sources/examples/EM/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_EM: + +EM examples +~~~~~~~~~~~~ + +These examples show how to create electromagnetic model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_railgun_thumb.png + :alt: Railgun example + + :ref:`sphx_glr_examples_EM_em_railgun.py` + +.. raw:: html + +
Railgun example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/EM/em_railgun + diff --git a/version/0.2/_sources/examples/EM/sg_execution_times.rst.txt b/version/0.2/_sources/examples/EM/sg_execution_times.rst.txt new file mode 100644 index 000000000..e97602cdf --- /dev/null +++ b/version/0.2/_sources/examples/EM/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_EM_sg_execution_times: + +Computation times +================= +**00:01.759** total execution time for **examples_EM** files: + ++---------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_EM_em_railgun.py` (``em_railgun.py``) | 00:01.759 | 0.0 MB | ++---------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/Explicit/belted_dummy.rst.txt b/version/0.2/_sources/examples/Explicit/belted_dummy.rst.txt new file mode 100644 index 000000000..30bfa8824 --- /dev/null +++ b/version/0.2/_sources/examples/Explicit/belted_dummy.rst.txt @@ -0,0 +1,205 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Explicit/belted_dummy.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Explicit_belted_dummy.py: + + +Belted dummy example +===================== + +This example show how to create an Belted dummy model with Pydyna-pre module. + +LS-DYNA version : LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-137 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Velocity, + Curve, + ShellPart, + DiscretePart, + NodeSet, + SegmentSet, + DRO, + Contact, + ContactSurface, + ContactCategory, + Motion, + Gravity, + GravityOption, + ) + from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatElastic, + MatSpringNonlinearElastic, + MatDamperViscous, + MatDamperNonlinearViscous, + ) + from belted_dummy_data import * + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + dummy_solution = DynaSolution(hostname) + fns = [] + path = examples.belted_dummy + os.sep + fns.append(path + "belted_dummy.k") + dummy_solution.open_files(fns) + dummy_solution.set_termination(termination_time=0.12) + dummy_solution.create_database_binary(dt=2.5e-3) + + dummy = DynaMech() + dummy_solution.add(dummy) + + dummy.set_timestep(tssfac=0.8) + dummy.set_init_velocity(Velocity(14.8, 0, 0)) + + # Define material + shellmatlist = [] + for i in range(15): + matrigid = MatRigid( + mass_density=rigidmats[i][0], young_modulus=rigidmats[i][1], poisson_ratio=0.3 + ) + shellmatlist.append(matrigid) + + for i in range(16, 23): + index = i - 16 + matelastic = MatElastic( + mass_density=elasticmats[index][0], young_modulus=elasticmats[index][1], poisson_ratio=0.3 + ) + shellmatlist.append(matelastic) + + discmatlist = [] + for i in range(101, 143): + index = i - 101 + mat = MatSpringNonlinearElastic(curve=Curve(x=curvedata[index][0], y=curvedata[index][1])) + discmatlist.append(mat) + + for i in range(143, 185): + index = i - 143 + mat = MatDamperViscous(damping_constant=dampingconst[index]) + discmatlist.append(mat) + + for i in range(185, 209): + index = i - 185 + mat = MatDamperNonlinearViscous( + curve=Curve(x=curvedata[lcidlist[index]][0], y=curvedata[lcidlist[index]][1]) + ) + discmatlist.append(mat) + + # Set part properties + for i in range(1, 23): + part = ShellPart(i) + part.set_material(shellmatlist[i - 1]) + part.set_thickness(shellsec[i - 1][0]) + part.set_integration_points(shellsec[i - 1][1]) + if i in range(1, 16): + part.set_extra_nodes(NodeSet(extra_nodes[i - 1])) + dummy.parts.add(part) + + for i in range(101, 209): + index = i - 101 + part = DiscretePart(i) + part.set_material(discmatlist[index]) + part.set_displacement_option(displacement_option=DRO.DESCRIBES_TORSIONAL_SPRING) + dummy.parts.add(part) + + # Contact + fslist = [0.62, 0.62, 0.62, 0.8, 1, 0.8, 0.88, 0.88, 0.16, 0.88, 0] + for i in range(11): + contact = Contact(category=ContactCategory.SURFACE_TO_SURFACE_CONTACT) + contact.set_friction_coefficient(static=fslist[i]) + surf1 = ContactSurface(SegmentSet(segments[2 * i])) + surf2 = ContactSurface(SegmentSet(segments[2 * i + 1])) + contact.set_slave_surface(surf1) + contact.set_master_surface(surf2) + dummy.contacts.add(contact) + + # Constraint + for i in range(14): + dummy.constraints.create_joint_spherical(nodes=jointlist[i]) + + # Boundary condition + dummy.boundaryconditions.create_imposed_motion( + NodeSet(motion_nodes), + Curve(x=motion_curve_x, y=motion_curve_y), + motion=Motion.ACCELERATION, + scalefactor=-1, + ) + + # Load + g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0.152], y=[9.81, 9.81])) + dummy.add(g) + + dummy_solution.create_database_binary(dt=2.5e-3) + dummy_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.917 seconds) + + +.. _sphx_glr_download_examples_Explicit_belted_dummy.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: belted_dummy.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: belted_dummy.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/Explicit/index.rst.txt b/version/0.2/_sources/examples/Explicit/index.rst.txt new file mode 100644 index 000000000..bb72c3997 --- /dev/null +++ b/version/0.2/_sources/examples/Explicit/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_Explicit: + +Explicit examples +~~~~~~~~~~~~~~~~~ + +These examples show how to create Explicit model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Explicit/images/thumb/sphx_glr_belted_dummy_thumb.png + :alt: Belted dummy example + + :ref:`sphx_glr_examples_Explicit_belted_dummy.py` + +.. raw:: html + +
Belted dummy example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/Explicit/belted_dummy + diff --git a/version/0.2/_sources/examples/Explicit/sg_execution_times.rst.txt b/version/0.2/_sources/examples/Explicit/sg_execution_times.rst.txt new file mode 100644 index 000000000..64db39757 --- /dev/null +++ b/version/0.2/_sources/examples/Explicit/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_Explicit_sg_execution_times: + +Computation times +================= +**00:01.917** total execution time for **examples_Explicit** files: + ++-------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Explicit_belted_dummy.py` (``belted_dummy.py``) | 00:01.917 | 0.0 MB | ++-------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/ICFD/icfd_cylinderflow.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_cylinderflow.rst.txt new file mode 100644 index 000000000..f59cbf46f --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_cylinderflow.rst.txt @@ -0,0 +1,150 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_cylinderflow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_cylinderflow.py: + + +Cylinder flow example +===================== + +This example demonstrates how to create a simple ICFD cylinder flow input deck. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-82 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + ICFDAnalysis, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + icfd_solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.cylinder_flow + os.sep + fns.append(path + "cylinder_flow.k") + icfd_solution.open_files(fns) + # Set total time of simulation + icfd_solution.set_termination(termination_time=100) + + icfd = DynaICFD() + icfd_solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + icfd_solution.create_database_binary(dt=1) + icfd_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.546 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_cylinderflow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_cylinderflow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_cylinderflow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_dam_break.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_dam_break.rst.txt new file mode 100644 index 000000000..0236c0534 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_dam_break.rst.txt @@ -0,0 +1,150 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_dam_break.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_dam_break.py: + + +Dam break +========= + +This example shows a simple free surface example using the ICFD solver. A column of water collapses under the load of gravity. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-82 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Gravity, + GravityOption, + Compressible + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.dam_break + os.sep + fns.append(path + "dam_break.k") + solution.open_files(fns) + solution.set_termination(termination_time=50) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001) + mat2 = MatICFD(flag=Compressible.VACUUM) + + part1 = ICFDPart(1) + part1.set_material(mat1) + part1.set_free_slip() + icfd.parts.add(part1) + + part2 = ICFDPart(2) + part2.set_material(mat2) + part2.set_free_slip() + icfd.parts.add(part2) + + part3 = ICFDPart(3) + part3.set_material(mat1) + icfd.parts.add(part3) + + g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[9.81, 9.81])) + icfd.add(g) + + partvol1 = ICFDVolumePart(surfaces=[1, 3]) + partvol1.set_material(mat1) + icfd.parts.add(partvol1) + + partvol2 = ICFDVolumePart(surfaces=[2, 3]) + partvol2.set_material(mat2) + icfd.parts.add(partvol2) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2]) + meshvol.set_fluid_interfaces([3]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.2) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.779 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_dam_break.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_dam_break.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_dam_break.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_dem_coupling.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_dem_coupling.rst.txt new file mode 100644 index 000000000..b9009b489 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_dem_coupling.rst.txt @@ -0,0 +1,166 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_dem_coupling.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_dem_coupling.py: + + +DEM Coupling +============ + +This example shows how to couple the ICFD fluid solver with DEM particles. + +LS-DYNA version : ls-dyna_smp_d_R101_winx64_ifort131.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-98 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + SolidPart, + SolidFormulation, + Curve, + Velocity, + Point, + ICFD_CouplingForm + ) + from ansys.dyna.core.pre.dynadem import DEMAnalysis + from ansys.dyna.core.pre.dynamaterial import MatRigidDiscrete + from ansys.dyna.core.pre import examples + + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.dem_coupling + os.sep + fns.append(path + "dem_coupling.k") + solution.open_files(fns) + solution.set_termination(termination_time=100) + icfd = DynaICFD() + solution.add(icfd) + + icfd.set_timestep(tssfac=0.8) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfdanalysis.set_coupling_dem(formulation=ICFD_CouplingForm.FORCE_USING_FLUID_PRESSURE_GRADIENT) + icfd.add(icfdanalysis) + + demanalysis = DEMAnalysis() + demanalysis.set_des(normal_damping_coeff=0.9, tangential_damping_coeff=0.9, static_friction_coeff=0.3, rolling_friction_coeff=0.001) + icfd.add(demanalysis) + + # define model + mat = MatICFD(flow_density=2.0, dynamic_viscosity=0.01) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + icfd.set_initial(velocity=Velocity(1, 0, 0)) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3]) + meshvol.meshsize_box(size=0.05,min_point=Point(-1, -1, -1),max_point=Point(1, 1, 1)) + icfd.add(meshvol) + + #define rigid cylinder + matrigid = MatRigidDiscrete(mass_density=1000,young_modulus=1e4) + disc = SolidPart(101) + disc.set_material(matrigid) + disc.set_element_formulation(SolidFormulation.ONE_POINT_COROTATIONAL) + icfd.parts.add(disc) + + solution.create_database_binary(dt=1.0) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.770 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_dem_coupling.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_dem_coupling.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_dem_coupling.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_driven_cavity.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_driven_cavity.rst.txt new file mode 100644 index 000000000..07d10d4f4 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_driven_cavity.rst.txt @@ -0,0 +1,138 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_driven_cavity.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_driven_cavity.py: + + +Driven cavity +============= + +This example shows the universally famous driven cavity case tested with the second order steady solver and for Re=1000. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-70 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ICFD_AnalysisType, + ICFD_MessageLevel, + ICFDDOF + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.driven_cavity + os.sep + fns.append(path + "driven_cavity.k") + solution.open_files(fns) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_type(analysis_type=ICFD_AnalysisType.STEADY_STATE_ANALYSIS) + icfdanalysis.set_output(messagelevel=ICFD_MessageLevel.FULL_OUTPUT_INFORMATION,iteration_interval=250) + icfdanalysis.set_steady_state(max_iteration=2500,momentum_tol_limit=1e-8,pressure_tol_limit=1e-8,velocity_relax_param=1,pressure_relax_param=1) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1, dynamic_viscosity=0.001) + + part1 = ICFDPart(1) + part1.set_material(mat) + part1.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + icfd.parts.add(part1) + + part2 = ICFDPart(2) + part2.set_material(mat) + part2.set_non_slip() + icfd.parts.add(part2) + + partvol = ICFDVolumePart(surfaces=[1, 2]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2]) + icfd.add(meshvol) + + solution.create_database_binary(dt=250) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.768 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_driven_cavity.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_driven_cavity.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_driven_cavity.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_free_convection_flow.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_free_convection_flow.rst.txt new file mode 100644 index 000000000..33a7a6202 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_free_convection_flow.rst.txt @@ -0,0 +1,156 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_free_convection_flow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_free_convection_flow.py: + + +Thermal flow +============ + +This example shows a simple ICFD forced convection input deck with a coarse mesh. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-88 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Gravity, + GravityOption + + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.free_convection_flow + os.sep + fns.append(path + "free_convection_flow.k") + solution.open_files(fns) + solution.set_termination(termination_time=30) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.01) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=37.799999, dynamic_viscosity=1,heat_capacity = 0.7,thermal_conductivity=1.0,thermal_expansion_coefficient=1) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_non_slip() + part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[1, 1])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_non_slip() + part_outflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_non_slip() + part_symmetric.compute_temperature() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_temperature() + icfd.parts.add(part_wall) + + icfd.set_initial() + + g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[1, 1])) + icfd.add(g) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3,4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.773 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_free_convection_flow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_free_convection_flow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_free_convection_flow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_imposed_move.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_imposed_move.rst.txt new file mode 100644 index 000000000..906a504e5 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_imposed_move.rst.txt @@ -0,0 +1,150 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_imposed_move.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_imposed_move.py: + + +Imposed move +============ + +This example shows how to impose the displacements on the fluid nodes through the use of the ICFD_CONTROL_IMPOSED_MOVE keyword. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-82 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Curve + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.imposed_move + os.sep + fns.append(path + "imposed_move.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.5) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.755 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_imposed_move.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_imposed_move.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_imposed_move.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_internal_3d_flow.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_internal_3d_flow.rst.txt new file mode 100644 index 000000000..71d45fb8a --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_internal_3d_flow.rst.txt @@ -0,0 +1,147 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_internal_3d_flow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_internal_3d_flow.py: + + +Internal 3D flow +================ + +This example shows a simple 3D ICFD problem. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-79 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ICFD_SurfRemeshMethod + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.internal_3d_flow + os.sep + fns.append(path + "internal_3d_flow.k") + solution.open_files(fns) + solution.set_termination(termination_time=10) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(timestep=0.05) + icfdanalysis.set_volume_mesh(mesh_growth_scale_factor=1.1) + icfdanalysis.set_surface_mesh(remesh_method = ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING) + icfd.add(icfdanalysis) + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + part_inflow.set_boundary_layer_symmetry_condition() + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + part_outflow.set_boundary_layer_symmetry_condition() + part_outflow.compute_flux() + icfd.parts.add(part_outflow) + + part_wall = ICFDPart(3) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.set_boundary_layer(2) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.762 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_internal_3d_flow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_internal_3d_flow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_internal_3d_flow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_mesh_adaptivity.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_mesh_adaptivity.rst.txt new file mode 100644 index 000000000..41020dca8 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_mesh_adaptivity.rst.txt @@ -0,0 +1,153 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_mesh_adaptivity.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_mesh_adaptivity.py: + + +Mesh Adaptivity +=============== + +This example shows a simple ICFD problem with adaptivity. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-85 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.mesh_adaptivity + os.sep + fns.append(path + "mesh_adaptivity.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfdanalysis.set_mesh_adaptivity(min_mesh_size=0.02,max_mesh_size=0.2,max_perceptual_error=2,num_iteration=10) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=2) + icfd.parts.add(part_wall) + + part_meshsize = ICFDPart(5) + part_meshsize.set_material(mat) + icfd.parts.add(part_meshsize) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.5) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.772 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_mesh_adaptivity.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_mesh_adaptivity.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_mesh_adaptivity.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_mesh_morphing.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_mesh_morphing.rst.txt new file mode 100644 index 000000000..7cc5d6a56 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_mesh_morphing.rst.txt @@ -0,0 +1,158 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_mesh_morphing.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_mesh_morphing.py: + + +Mesh Morphing +============= + +This example shows a simple ICFD problem with mesh morphing. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-90 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.mesh_morphing + os.sep + fns.append(path + "mesh_morphing.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=2) + part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) + icfd.parts.add(part_wall) + + part_meshmorph = ICFDPart(5) + part_meshmorph.set_material(mat) + icfd.parts.add(part_meshmorph) + + partvol1 = ICFDVolumePart(surfaces=[1, 2, 3, 5]) + partvol1.set_material(mat) + icfd.parts.add(partvol1) + partvol2 = ICFDVolumePart(surfaces=[5, 4]) + partvol2.set_material(mat) + partvol2.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) + icfd.parts.add(partvol2) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + meshvol.set_fluid_interfaces([5]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.5) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.759 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_mesh_morphing.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_mesh_morphing.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_mesh_morphing.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_mesh_size.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_mesh_size.rst.txt new file mode 100644 index 000000000..0a6bba0f7 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_mesh_size.rst.txt @@ -0,0 +1,153 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_mesh_size.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_mesh_size.py: + + +Mesh size +========== + +This example shows a simple ICFD input deck with a coarse mesh. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-85 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.mesh_size + os.sep + fns.append(path + "mesh_size.k") + solution.open_files(fns) + solution.set_termination(termination_time=50) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=2) + icfd.parts.add(part_wall) + + part_meshsize = ICFDPart(5) + part_meshsize.set_material(mat) + icfd.parts.add(part_meshsize) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + meshvol.set_meshsize([5]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.754 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_mesh_size.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_mesh_size.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_mesh_size.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_plate_flow.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_plate_flow.rst.txt new file mode 100644 index 000000000..9f756b053 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_plate_flow.rst.txt @@ -0,0 +1,149 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_plate_flow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_plate_flow.py: + + +Plate flow +========== + +This example shows a simple ICFD input deck with a coarse mesh. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-81 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.plate_flow + os.sep + fns.append(path + "plate_flow.k") + solution.open_files(fns) + solution.set_termination(termination_time=100) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=2) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3]) + meshvol.embed_shell([4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.762 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_plate_flow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_plate_flow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_plate_flow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_sloshing.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_sloshing.rst.txt new file mode 100644 index 000000000..362cd8dae --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_sloshing.rst.txt @@ -0,0 +1,154 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_sloshing.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_sloshing.py: + + +Sloshing +======== + +This example shows how to directly impose a displacement of the entire volume mesh through the use of the keyword ICFD_CONTROL_IMPOSED_MOVE. + +LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-86 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Curve, + Gravity, + GravityOption, + Compressible + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.sloshing + os.sep + fns.append(path + "sloshing.k") + solution.open_files(fns) + solution.set_termination(termination_time=1) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.02) + icfd.add(icfdanalysis) + + # define model + mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001) + mat2 = MatICFD(flag=Compressible.VACUUM) + + part_bottom = ICFDPart(1) + part_bottom.set_material(mat1) + part_bottom.set_non_slip() + icfd.parts.add(part_bottom) + + part_top = ICFDPart(2) + part_top.set_material(mat2) + part_top.set_non_slip() + icfd.parts.add(part_top) + + part_mid = ICFDPart(3) + part_mid.set_material(mat1) + icfd.parts.add(part_mid) + + g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 10000], y=[9.81, 9.81])) + icfd.add(g) + + icfd.set_imposed_move(vx=Curve(x=[0, 0.5, 0.52, 0.8, 0.82, 2.0], y=[1, 1, -1, -1, 0, 0])) + + partvol_bottom = ICFDVolumePart(surfaces=[1, 3]) + partvol_bottom.set_material(mat1) + icfd.parts.add(partvol_bottom) + + partvol_top = ICFDVolumePart(surfaces=[2, 3]) + partvol_top.set_material(mat2) + icfd.parts.add(partvol_top) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2]) + meshvol.set_fluid_interfaces([3]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.02) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.856 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_sloshing.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_sloshing.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_sloshing.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_strong_fsi.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_strong_fsi.rst.txt new file mode 100644 index 000000000..5fa37ddad --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_strong_fsi.rst.txt @@ -0,0 +1,174 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_strong_fsi.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_strong_fsi.py: + + +Strong FSI +========== + +This example shows a simple FSI coupling problem using strong FSI. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-106 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ShellPart, + ShellFormulation, + PartSet, + Curve, + DOF, + Motion + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.strong_fsi + os.sep + fns.append(path + "strong_fsi.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfdanalysis.set_fsi() + icfd.add(icfdanalysis) + + icfd.implicitanalysis.set_initial_timestep_size( + size=10 + ) + icfd.implicitanalysis.set_dynamic(gamma=0.6, beta=0.4) + icfd.implicitanalysis.set_solution( + iteration_limit=100, stiffness_reformation_limit=150 + ) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.set_fsi() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + #define rigid cylinder + matrigid = MatRigid(mass_density=1.2,young_modulus=2e11,poisson_ratio=0.3) + cylinder = ShellPart(1) + cylinder.set_material(matrigid) + cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS) + icfd.parts.add(cylinder) + # Define boundary conddition + icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY) + + solution.create_database_binary(dt=0.1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.681 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_strong_fsi.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_strong_fsi.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_strong_fsi.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_thermal_flow.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_thermal_flow.rst.txt new file mode 100644 index 000000000..82acd7a0e --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_thermal_flow.rst.txt @@ -0,0 +1,152 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_thermal_flow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_thermal_flow.py: + + +Thermal flow +============ + +This example shows a simple ICFD forced convection input deck with a coarse mesh. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-84 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.thermal_flow + os.sep + fns.append(path + "thermal_flow.k") + solution.open_files(fns) + solution.set_termination(termination_time=100) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005,heat_capacity = 1000,thermal_conductivity=200) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[20, 20])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[80, 80])) + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + icfd.parts.add(part_wall) + + icfd.set_initial(temperature=10) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3,4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.777 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_thermal_flow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_thermal_flow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_thermal_flow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/icfd_weak_fsi.rst.txt b/version/0.2/_sources/examples/ICFD/icfd_weak_fsi.rst.txt new file mode 100644 index 000000000..094842f3b --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/icfd_weak_fsi.rst.txt @@ -0,0 +1,168 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_weak_fsi.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_weak_fsi.py: + + +Weak FSI +======== + +This example shows a simple FSI coupling problem using weak/loose/explicit FSI. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-100 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ShellPart, + ShellFormulation, + PartSet, + Curve, + DOF, + Motion + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.weak_fsi + os.sep + fns.append(path + "weak_fsi.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfd.set_timestep(tssfac=0.9,max_timestep=Curve(x=[0,10000],y=[0.05,0.05])) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfdanalysis.set_fsi() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.set_fsi() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + #define rigid cylinder + matrigid = MatRigid(mass_density=1000,young_modulus=2e11,poisson_ratio=0.3) + cylinder = ShellPart(1) + cylinder.set_material(matrigid) + cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS) + icfd.parts.add(cylinder) + # Define boundary conddition + icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY) + + solution.create_database_binary(dt=0.2) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.773 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_weak_fsi.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_weak_fsi.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_weak_fsi.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ICFD/index.rst.txt b/version/0.2/_sources/examples/ICFD/index.rst.txt new file mode 100644 index 000000000..61e80cd0c --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/index.rst.txt @@ -0,0 +1,295 @@ + + +.. _sphx_glr_examples_ICFD: + +ICFD examples +~~~~~~~~~~~~~~ + +These examples show how to create ICFD model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_cylinderflow_thumb.png + :alt: Cylinder flow example + + :ref:`sphx_glr_examples_ICFD_icfd_cylinderflow.py` + +.. raw:: html + +
Cylinder flow example
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_dam_break_thumb.png + :alt: Dam break + + :ref:`sphx_glr_examples_ICFD_icfd_dam_break.py` + +.. raw:: html + +
Dam break
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_dem_coupling_thumb.png + :alt: DEM Coupling + + :ref:`sphx_glr_examples_ICFD_icfd_dem_coupling.py` + +.. raw:: html + +
DEM Coupling
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_driven_cavity_thumb.png + :alt: Driven cavity + + :ref:`sphx_glr_examples_ICFD_icfd_driven_cavity.py` + +.. raw:: html + +
Driven cavity
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_free_convection_flow_thumb.png + :alt: Thermal flow + + :ref:`sphx_glr_examples_ICFD_icfd_free_convection_flow.py` + +.. raw:: html + +
Thermal flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_imposed_move_thumb.png + :alt: Imposed move + + :ref:`sphx_glr_examples_ICFD_icfd_imposed_move.py` + +.. raw:: html + +
Imposed move
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_internal_3d_flow_thumb.png + :alt: Internal 3D flow + + :ref:`sphx_glr_examples_ICFD_icfd_internal_3d_flow.py` + +.. raw:: html + +
Internal 3D flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_adaptivity_thumb.png + :alt: Mesh Adaptivity + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_adaptivity.py` + +.. raw:: html + +
Mesh Adaptivity
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_morphing_thumb.png + :alt: Mesh Morphing + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_morphing.py` + +.. raw:: html + +
Mesh Morphing
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_size_thumb.png + :alt: Mesh size + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_size.py` + +.. raw:: html + +
Mesh size
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_plate_flow_thumb.png + :alt: Plate flow + + :ref:`sphx_glr_examples_ICFD_icfd_plate_flow.py` + +.. raw:: html + +
Plate flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_sloshing_thumb.png + :alt: Sloshing + + :ref:`sphx_glr_examples_ICFD_icfd_sloshing.py` + +.. raw:: html + +
Sloshing
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_strong_fsi_thumb.png + :alt: Strong FSI + + :ref:`sphx_glr_examples_ICFD_icfd_strong_fsi.py` + +.. raw:: html + +
Strong FSI
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_thermal_flow_thumb.png + :alt: Thermal flow + + :ref:`sphx_glr_examples_ICFD_icfd_thermal_flow.py` + +.. raw:: html + +
Thermal flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_weak_fsi_thumb.png + :alt: Weak FSI + + :ref:`sphx_glr_examples_ICFD_icfd_weak_fsi.py` + +.. raw:: html + +
Weak FSI
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/ICFD/icfd_cylinderflow + /examples/ICFD/icfd_dam_break + /examples/ICFD/icfd_dem_coupling + /examples/ICFD/icfd_driven_cavity + /examples/ICFD/icfd_free_convection_flow + /examples/ICFD/icfd_imposed_move + /examples/ICFD/icfd_internal_3d_flow + /examples/ICFD/icfd_mesh_adaptivity + /examples/ICFD/icfd_mesh_morphing + /examples/ICFD/icfd_mesh_size + /examples/ICFD/icfd_plate_flow + /examples/ICFD/icfd_sloshing + /examples/ICFD/icfd_strong_fsi + /examples/ICFD/icfd_thermal_flow + /examples/ICFD/icfd_weak_fsi + diff --git a/version/0.2/_sources/examples/ICFD/sg_execution_times.rst.txt b/version/0.2/_sources/examples/ICFD/sg_execution_times.rst.txt new file mode 100644 index 000000000..51789b330 --- /dev/null +++ b/version/0.2/_sources/examples/ICFD/sg_execution_times.rst.txt @@ -0,0 +1,40 @@ + +:orphan: + +.. _sphx_glr_examples_ICFD_sg_execution_times: + +Computation times +================= +**00:26.288** total execution time for **examples_ICFD** files: + ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_sloshing.py` (``icfd_sloshing.py``) | 00:01.856 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_dam_break.py` (``icfd_dam_break.py``) | 00:01.779 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_thermal_flow.py` (``icfd_thermal_flow.py``) | 00:01.777 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_free_convection_flow.py` (``icfd_free_convection_flow.py``) | 00:01.773 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_weak_fsi.py` (``icfd_weak_fsi.py``) | 00:01.773 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_mesh_adaptivity.py` (``icfd_mesh_adaptivity.py``) | 00:01.772 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_dem_coupling.py` (``icfd_dem_coupling.py``) | 00:01.770 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_driven_cavity.py` (``icfd_driven_cavity.py``) | 00:01.768 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_internal_3d_flow.py` (``icfd_internal_3d_flow.py``) | 00:01.762 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_plate_flow.py` (``icfd_plate_flow.py``) | 00:01.762 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_mesh_morphing.py` (``icfd_mesh_morphing.py``) | 00:01.759 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_imposed_move.py` (``icfd_imposed_move.py``) | 00:01.755 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_mesh_size.py` (``icfd_mesh_size.py``) | 00:01.754 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_strong_fsi.py` (``icfd_strong_fsi.py``) | 00:01.681 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_cylinderflow.py` (``icfd_cylinderflow.py``) | 00:01.546 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/IGA/iga_sample.rst.txt b/version/0.2/_sources/examples/IGA/iga_sample.rst.txt new file mode 100644 index 000000000..6bee0d256 --- /dev/null +++ b/version/0.2/_sources/examples/IGA/iga_sample.rst.txt @@ -0,0 +1,189 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/IGA/iga_sample.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_IGA_iga_sample.py: + + +IGA example +===================== + +This example demonstrates how to create an IGA input deck. + +LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-121 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaiga import ( + DynaIGA, + IGAPart, + PartSet, + IGAFormulation, + SolidPart, + HourglassType, + SolidFormulation, + RigidwallCylinder, + Point, + Curve, + Direction, + ContactType, + ContactCategory, + OffsetType, + ) + from ansys.dyna.core.pre.dynamech import * + from ansys.dyna.core.pre.dynamaterial import MatPiecewiseLinearPlasticity, MatSpotweld + from iga_sample_data import * + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + iga_solution = DynaSolution(hostname) + fns = [] + path = examples.iga_sample + os.sep + fns.append(path + "maino.k") + fns.append(path + "rkrwelds.key") + fns.append(path + "27parts.key") + iga_solution.open_files(fns) + + iga_solution.set_termination(20) + iga_solution.create_database_binary(dt=0.1) + + iga = DynaIGA() + iga_solution.add(iga) + + iga.set_timestep(timestep_size_for_mass_scaled=-0.0004) + + # define material + plastic = MatPiecewiseLinearPlasticity( + mass_density=7.830e-06, young_modulus=200, yield_stress=1.5, tangent_modulus=0.5 + ) + swmatlist = [] + for mat in materialdata: + spotweld = MatSpotweld( + mass_density=mat[0], + young_modulus=mat[1], + poisson_ratio=mat[2], + yield_stress=mat[3], + plastic_hardening_modulus=mat[4], + axial_force_resultant_at_failure=mat[5], + force_resultant_nrs_at_failure=mat[6], + force_resultant_nrt_at_failure=mat[7], + ) + swmatlist.append(spotweld) + + for id in igaparts: + part = IGAPart(id) + part.set_material(plastic) + part.set_element_formulation(IGAFormulation.REISSNER_MINDLIN_FIBERS_AT_CONTROL_POINTS) + part.set_thickness(1.0) + iga.parts.add(part) + + for index in range(len(spotwelds)): + part = SolidPart(spotwelds[index]) + if index != 1: + part.set_hourglass(type=HourglassType.BELYTSCHKO_BINDEMAN) + part.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + part.set_material(swmatlist[index]) + iga.parts.add(part) + + cylinder1 = RigidwallCylinder( + Point(2472.37, -600.000, 1270.98), Point(2472.37, -600.000, 2668.53), 100, 1000 + ) + iga.add(cylinder1) + cylinder2 = RigidwallCylinder( + Point(3580.25, -600.000, 1261.37), Point(3580.25, -600.000, 3130.49), 100, 1000 + ) + iga.add(cylinder2) + cylinder3 = RigidwallCylinder( + Point(3090.59, -955.35, 1299.42), Point(3090.59, -955.35, 2958.43), 100, 1000 + ) + cylinder3.set_motion(Curve(x=[0, 100], y=[20, 20]), dir=Direction(0, 1, 0)) + iga.add(cylinder3) + + # define contact + selfcontact = Contact(type=ContactType.AUTOMATIC) + selfcontact.set_friction_coefficient(static=0.2) + surf1 = ContactSurface(PartSet(igaparts)) + selfcontact.set_slave_surface(surf1) + iga.add(selfcontact) + + swcontact = Contact( + type=ContactType.TIED, + category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT, + offset=OffsetType.OFFSET, + ) + spotweldsolid = ContactSurface(PartSet(spotwelds)) + spotweldsurface = ContactSurface(PartSet(igaparts)) + swcontact.set_slave_surface(spotweldsolid) + swcontact.set_master_surface(spotweldsurface) + iga.add(swcontact) + + iga_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 3.085 seconds) + + +.. _sphx_glr_download_examples_IGA_iga_sample.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: iga_sample.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: iga_sample.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/IGA/index.rst.txt b/version/0.2/_sources/examples/IGA/index.rst.txt new file mode 100644 index 000000000..ca6ff5570 --- /dev/null +++ b/version/0.2/_sources/examples/IGA/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_IGA: + +IGA examples +~~~~~~~~~~~~~ + +These examples show how to create Isogeometric Analysis model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/IGA/images/thumb/sphx_glr_iga_sample_thumb.png + :alt: IGA example + + :ref:`sphx_glr_examples_IGA_iga_sample.py` + +.. raw:: html + +
IGA example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/IGA/iga_sample + diff --git a/version/0.2/_sources/examples/IGA/sg_execution_times.rst.txt b/version/0.2/_sources/examples/IGA/sg_execution_times.rst.txt new file mode 100644 index 000000000..02af36f77 --- /dev/null +++ b/version/0.2/_sources/examples/IGA/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_IGA_sg_execution_times: + +Computation times +================= +**00:03.085** total execution time for **examples_IGA** files: + ++----------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_IGA_iga_sample.py` (``iga_sample.py``) | 00:03.085 | 0.0 MB | ++----------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/ISPH/index.rst.txt b/version/0.2/_sources/examples/ISPH/index.rst.txt new file mode 100644 index 000000000..c2b21038e --- /dev/null +++ b/version/0.2/_sources/examples/ISPH/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_ISPH: + +ISPH examples +~~~~~~~~~~~~~ + +These examples show how to create ISPH model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ISPH/images/thumb/sphx_glr_rigidtest_thumb.png + :alt: Rigid test example + + :ref:`sphx_glr_examples_ISPH_rigidtest.py` + +.. raw:: html + +
Rigid test example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/ISPH/rigidtest + diff --git a/version/0.2/_sources/examples/ISPH/rigidtest.rst.txt b/version/0.2/_sources/examples/ISPH/rigidtest.rst.txt new file mode 100644 index 000000000..cb893fd40 --- /dev/null +++ b/version/0.2/_sources/examples/ISPH/rigidtest.rst.txt @@ -0,0 +1,203 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ISPH/rigidtest.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ISPH_rigidtest.py: + + +Rigid test example +===================== + +This example show how to create an ISPH model with Pydyna-pre module. + +LS-DYNA version : ls-dyna_mpp_d_R13.0_365-gf8a97bda2a_winx64_ifort190_msmpi.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-135 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatSPHIncompressibleFluid, + MatSPHIncompressibleStructure, + ) + from ansys.dyna.core.pre.dynaisph import ( + DynaISPH, + Box, + Point, + Curve, + PartSet, + ShellPart, + ShellFormulation, + ISPHStructPart, + ISPHFluidPart, + DOF, + Motion, + Gravity, + GravityOption, + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + isphsolution = DynaSolution(hostname) + fns = [] + path = examples.isph_rigidtest + os.sep + fns.append(path + "rigidtest.k") + isphsolution.open_files(fns) + + isphsolution.set_termination(0.5) + + isphobj = DynaISPH() + isphsolution.add(isphobj) + + isphobj.set_timestep( + tssfac=1, max_timestep=Curve(x=[0, 0.04, 0.05, 0.1, 100], y=[0.5, 0.5, 1, 1, 1]) + ) + isphobj.isphanalysis.set_box(Box(-750, 800, -800, 800, -100, 3000)) + + platemat1 = MatRigid( + mass_density=1e-9, + young_modulus=10, + center_of_mass_constraint=1, + translational_constraint=5, + rotational_constraint=4, + ) + platemat2 = MatRigid( + mass_density=1e-9, + young_modulus=10, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, + ) + # platemat3 = MatRigid(mass_density=1e-9,young_modulus=10) + # matelastic = MatElastic(mass_density=1e-9,young_modulus=1) + matsphfluid = MatSPHIncompressibleFluid( + mass_density=1e-9, dynamic_viscosity=1e-9, tension_coefficient1=1e6, tension_coefficient2=1000 + ) + matsphstruct = MatSPHIncompressibleStructure(mass_density=1e-9) + + sensorplane = ShellPart(1) + sensorplane.set_material(platemat2) + sensorplane.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + sensorplane.set_thickness(0.1) + isphobj.parts.add(sensorplane) + + movingcube = ShellPart(7) + movingcube.set_material(platemat1) + movingcube.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + movingcube.set_thickness(0.1) + isphobj.parts.add(movingcube) + + wallsmesh = ShellPart(8) + wallsmesh.set_material(platemat2) + wallsmesh.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + wallsmesh.set_thickness(0.1) + isphobj.parts.add(wallsmesh) + + sphwall = ISPHStructPart(4, PartSet([8]), 12) + sphwall.set_material(matsphstruct) + sphwall.set_smoothing_length(1, 1, 1, 12) + isphobj.parts.add(sphwall) + + sphcube = ISPHStructPart(5, PartSet([7]), 12) + sphcube.set_material(matsphstruct) + sphcube.set_smoothing_length(1, 1, 1, 12) + isphobj.parts.add(sphcube) + + sphwater = ISPHFluidPart(6, Point(-588, -588, 9), Point(1176, 1176, 204), 98, 98, 17) + sphwater.set_material(matsphfluid) + sphwater.set_smoothing_length(1, 1, 1, 12) + sphwater.create_massflow_plane(PartSet([1])) + isphobj.parts.add(sphwater) + + # Constraint + isphobj.constraints.merge_two_rigid_bodies(7, 1) + + # Define boundary conddition + isphobj.boundaryconditions.create_imposed_motion( + PartSet([7]), + Curve(x=[0, 0.1, 0.11, 20], y=[3000, 3000, 0, 0]), + dof=DOF.X_TRANSLATIONAL, + motion=Motion.VELOCITY, + ) + isphobj.boundaryconditions.create_imposed_motion( + PartSet([7]), + Curve(x=[0, 0.1, 0.11, 20], y=[500, 500, 500, 500]), + dof=DOF.Z_ROTATIONAL, + motion=Motion.VELOCITY, + scalefactor=0.01, + ) + + # Load + g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 100], y=[9810, 9810])) + isphobj.add(g) + + isphsolution.set_output_database(glstat=0.001, sphmassflow=0.001) + isphsolution.create_database_binary(dt=0.01) + isphsolution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.734 seconds) + + +.. _sphx_glr_download_examples_ISPH_rigidtest.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: rigidtest.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: rigidtest.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/ISPH/sg_execution_times.rst.txt b/version/0.2/_sources/examples/ISPH/sg_execution_times.rst.txt new file mode 100644 index 000000000..4a3cf9792 --- /dev/null +++ b/version/0.2/_sources/examples/ISPH/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_ISPH_sg_execution_times: + +Computation times +================= +**00:01.734** total execution time for **examples_ISPH** files: + ++---------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ISPH_rigidtest.py` (``rigidtest.py``) | 00:01.734 | 0.0 MB | ++---------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/Implicit/camry_rc.rst.txt b/version/0.2/_sources/examples/Implicit/camry_rc.rst.txt new file mode 100644 index 000000000..18df823f9 --- /dev/null +++ b/version/0.2/_sources/examples/Implicit/camry_rc.rst.txt @@ -0,0 +1,337 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Implicit/camry_rc.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Implicit_camry_rc.py: + + +Crash example +===================== + +This example demonstrates how to create a simple crash input deck. + +.. GENERATED FROM PYTHON SOURCE LINES 7-270 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Curve, + BeamPart, + ShellPart, + NodeSet, + PartSet, + TimestepCtrol, + Contact, + ContactType, + ContactCategory, + ContactSurface, + DOF, + OffsetType, + ) + from ansys.dyna.core.pre.dynamaterial import ( + MatNull, + MatRigid, + MatSpotweld, + MatModifiedPiecewiseLinearPlasticity, + MatPiecewiseLinearPlasticity, + ) + from camry_rc_data import * + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + camry_solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.camry_rc + os.sep + fns.append(path + "Camry_RC_main.k") + fns.append(path + "501_RIG_BAR_roof_crush_platen5.key") + fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7.k") + fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7_nodes.k") + fns.append(path + "roof_welds.k") + fns.append(path + "weld7.k") + fns.append(path + "xtra_sw.k") + camry_solution.open_files(fns) + + # global setting + camry_solution.set_termination(10) + camry_solution.create_database_binary(dt=0.001) + + camry = DynaMech() + camry_solution.add(camry) + + camry.implicitanalysis.set_timestep( + control_flag=TimestepCtrol.AUTOMATICALLY_ADJUST_TIMESTEP_SIZE, + Optimum_equilibrium_iteration_count=511, + ) + camry.implicitanalysis.set_dynamic(gamma=0.6, beta=0.38) + camry.implicitanalysis.set_eigenvalue() + camry.implicitanalysis.set_solution( + stiffness_reformation_limit=55, absolute_convergence_tolerance=-100 + ) + + # create material + matnull = MatNull(mass_density=6e-11) + matrigid = MatRigid(mass_density=7.890e-09, young_modulus=2.100e05, poisson_ratio=0.3) + matplaten = MatRigid( + mass_density=7.80e-09, + young_modulus=2.00e05, + poisson_ratio=0.3, + center_of_mass_constraint=1, + rotational_constraint=7, + ) + spotweldharden2100 = MatSpotweld( + mass_density=7.850e-09, + young_modulus=2.100e05, + poisson_ratio=0.3, + yield_stress=510, + plastic_hardening_modulus=2100, + ) + spotweldharden2200 = MatSpotweld( + mass_density=7.850e-09, + young_modulus=2.100e05, + poisson_ratio=0.3, + yield_stress=510, + plastic_hardening_modulus=2200, + ) + windowshield = MatModifiedPiecewiseLinearPlasticity( + mass_density=2.355e-09, + young_modulus=7.000e04, + poisson_ratio=0.22, + yield_stress=30, + tangent_modulus=1400, + plastic_strain_to_failure=0.015, + integration_points_number=1, + ) + windowsrear = MatModifiedPiecewiseLinearPlasticity( + mass_density=2.425e-09, + young_modulus=7.000e04, + poisson_ratio=0.22, + yield_stress=30, + tangent_modulus=1400, + plastic_strain_to_failure=0.015, + integration_points_number=1, + ) + plastic300 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=300, tangent_modulus=5000 + ) + plastic250 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=250, tangent_modulus=5000 + ) + plastic360 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=360, tangent_modulus=5000 + ) + plastic180 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=180, tangent_modulus=5000 + ) + plastic450 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=450, tangent_modulus=5000 + ) + plastic1300 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=1300, tangent_modulus=5000 + ) + plastic400 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=400, tangent_modulus=5000 + ) + plastic500 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=500, tangent_modulus=5000 + ) + plastic675 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=675, tangent_modulus=5000 + ) + plastic310 = MatPiecewiseLinearPlasticity( + mass_density=2.255e-09, young_modulus=70000, yield_stress=310, tangent_modulus=5000 + ) + plastic220 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=5000 + ) + plastic220_410 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=410 + ) + + # set model + for bpart in beamparts: + part = BeamPart(bpart[0]) + if part.id in [50000002]: + part.set_material(spotweldharden2200) + else: + part.set_material(spotweldharden2100) + part.set_element_formulation(bpart[1]) + part.set_diameter(bpart[2]) + camry.parts.add(part) + + for spart in shellparts: + part = ShellPart(spart[0]) + if part.id in [1463, 1464]: + part.set_material(matnull) + elif part.id in [417, 419, 530, 532, 585, 586, 587, 588]: + part.set_material(matrigid) + elif part.id in [50000001]: + part.set_material(matplaten) + elif part.id in [290]: + part.set_material(windowshield) + elif part.id in [291]: + part.set_material(windowsrear) + elif part.id in partswithmat300: + part.set_material(plastic300) + elif part.id in partswithmat250: + part.set_material(plastic250) + elif part.id in partswithmat360: + part.set_material(plastic360) + elif part.id in partswithmat180: + part.set_material(plastic180) + elif part.id in partswithmat450: + part.set_material(plastic450) + elif part.id in partswithmat400: + part.set_material(plastic400) + elif part.id in partswithmat500: + part.set_material(plastic500) + elif part.id in [57]: + part.set_material(plastic1300) + elif part.id in [286]: + part.set_material(plastic675) + elif part.id in [5000000]: + part.set_material(plastic310) + elif part.id in [5000006]: + part.set_material(plastic220) + elif part.id in [5000007]: + part.set_material(plastic220_410) + else: + pass + part.set_element_formulation(spart[1]) + part.set_thickness(spart[2]) + camry.parts.add(part) + + # define constrained + for sw in spotweld: + camry.constraints.create_spotweld(nodeid1=sw[0], nodeid2=sw[1]) + + for cnrb in cnrbs: + camry.constraints.create_cnrb(nodeset=NodeSet(cnrb)) + + # define contact + selfcontact = Contact(type=ContactType.AUTOMATIC) + selfcontact.set_mortar() + selfcontact.set_friction_coefficient(static=0.2) + surf1 = ContactSurface(PartSet(vehicle)) + selfcontact.set_slave_surface(surf1) + camry.contacts.add(selfcontact) + + platebiw = Contact(type=ContactType.AUTOMATIC, category=ContactCategory.SURFACE_TO_SURFACE_CONTACT) + platebiw.set_mortar() + platebiw.set_friction_coefficient(static=0.2, dynamic=0.2) + surf1 = ContactSurface(PartSet(biw)) + surf2 = ContactSurface(PartSet(platen)) + platebiw.set_slave_surface(surf1) + platebiw.set_master_surface(surf2) + camry.contacts.add(platebiw) + + swcontact = Contact( + type=ContactType.TIED, + category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT, + offset=OffsetType.CONSTRAINED_OFFSET, + ) + spotweldbeam = ContactSurface(PartSet(spotweldbeams)) + spotweldbeam.set_contact_thickness(thickness=-0.9) + spotweldsurface = ContactSurface(PartSet(spotweldsurfaces)) + spotweldsurface.set_contact_thickness(thickness=-0.9) + swcontact.set_slave_surface(spotweldbeam) + swcontact.set_master_surface(spotweldsurface) + camry.contacts.add(swcontact) + + # define boundary + camry.boundaryconditions.create_spc(NodeSet(spc)) + + crv = Curve( + x=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9.77, 100], + y=[0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 127, 127], + ) + platen = PartSet([50000001]) + camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.X_TRANSLATIONAL, scalefactor=-0.0802216 + ) + camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.Y_TRANSLATIONAL, scalefactor=-0.0802216 + ) + camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.Z_TRANSLATIONAL, scalefactor=-0.0802216 + ) + + camry_solution.set_output_database( + elout=0.0001, + glstat=0.0001, + matsum=0.0001, + nodout=0.0001, + rbdout=0.0001, + rcforc=0.0001, + secforc=0.0001, + ) + + camry_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 17.233 seconds) + + +.. _sphx_glr_download_examples_Implicit_camry_rc.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: camry_rc.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: camry_rc.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/Implicit/index.rst.txt b/version/0.2/_sources/examples/Implicit/index.rst.txt new file mode 100644 index 000000000..26f3bf0bc --- /dev/null +++ b/version/0.2/_sources/examples/Implicit/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_Implicit: + +Implicit examples +~~~~~~~~~~~~~~~~~~ + +These examples show how to create implicit model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Implicit/images/thumb/sphx_glr_camry_rc_thumb.png + :alt: Crash example + + :ref:`sphx_glr_examples_Implicit_camry_rc.py` + +.. raw:: html + +
Crash example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/Implicit/camry_rc + diff --git a/version/0.2/_sources/examples/Implicit/sg_execution_times.rst.txt b/version/0.2/_sources/examples/Implicit/sg_execution_times.rst.txt new file mode 100644 index 000000000..01d7a23e3 --- /dev/null +++ b/version/0.2/_sources/examples/Implicit/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_Implicit_sg_execution_times: + +Computation times +================= +**00:17.233** total execution time for **examples_Implicit** files: + ++-----------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Implicit_camry_rc.py` (``camry_rc.py``) | 00:17.233 | 0.0 MB | ++-----------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/NVH/frf_plate_damping.rst.txt b/version/0.2/_sources/examples/NVH/frf_plate_damping.rst.txt new file mode 100644 index 000000000..5bf9f050c --- /dev/null +++ b/version/0.2/_sources/examples/NVH/frf_plate_damping.rst.txt @@ -0,0 +1,143 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/NVH/frf_plate_damping.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_NVH_frf_plate_damping.py: + + +FRF for a rectangular plate +=========================== + +This example shows how to setup the keywords for FRF computation. + +LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-75 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamaterial import MatElastic + from ansys.dyna.core.pre.dynanvh import ( + DynaNVH, + FrequencyDomain, + ExcitationDOF, + Curve, + NodeSet, + ShellPart, + ShellFormulation, + ResponseDOF, + ResponseType, + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + solution = DynaSolution(hostname) + fns = [] + path = examples.nvh_frf_plate_damping + os.sep + fns.append(path + "frf_plate_damping.k") + solution.open_files(fns) + + nvhobj = DynaNVH() + solution.add(nvhobj) + + nvhobj.implicitanalysis.set_initial_timestep_size(1.0) + nvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100) + nvhobj.implicitanalysis.set_solution(solution_method=1) + + fd = FrequencyDomain() + crv = Curve( + x=[1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 200], + y=[0, 0, 0.0045, 0.00713, 0.00386, 0.00328, 0.0034, 0.00624, 7.2e-4, 8.3e-4, 0, 0], + ) + fd.set_frequency_response_function( + excitation_input_set=NodeSet([131]), + excitation_input_dof=ExcitationDOF.Z, + max_natural_frequency=2000, + modal_damping_coefficient_curve_type=1, + modal_damping_coefficient_curve=crv, + response_output_set=NodeSet([131, 651]), + response_output_dof=ResponseDOF.Z, + response_output_type=ResponseType.BASE_ACCELERATION, + frf_output_min_frequency=1, + frf_output_max_frequency=400, + frf_output_num_frequency=400, + ) + nvhobj.add(fd) + + matelastic = MatElastic(mass_density=7870, young_modulus=2.07e11, poisson_ratio=0.292) + + boxshell = ShellPart(1) + boxshell.set_material(matelastic) + boxshell.set_element_formulation(ShellFormulation.SR_HUGHES_LIU) + boxshell.set_thickness(0.002) + boxshell.set_shear_factor(0.833) + boxshell.set_printout(3) + nvhobj.parts.add(boxshell) + + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.993 seconds) + + +.. _sphx_glr_download_examples_NVH_frf_plate_damping.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: frf_plate_damping.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: frf_plate_damping.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/NVH/index.rst.txt b/version/0.2/_sources/examples/NVH/index.rst.txt new file mode 100644 index 000000000..92356fb4c --- /dev/null +++ b/version/0.2/_sources/examples/NVH/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_NVH: + +NVH examples +~~~~~~~~~~~~~ + +These examples show how to create NVH model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/NVH/images/thumb/sphx_glr_frf_plate_damping_thumb.png + :alt: FRF for a rectangular plate + + :ref:`sphx_glr_examples_NVH_frf_plate_damping.py` + +.. raw:: html + +
FRF for a rectangular plate
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/NVH/frf_plate_damping + diff --git a/version/0.2/_sources/examples/NVH/sg_execution_times.rst.txt b/version/0.2/_sources/examples/NVH/sg_execution_times.rst.txt new file mode 100644 index 000000000..9b60722c2 --- /dev/null +++ b/version/0.2/_sources/examples/NVH/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_NVH_sg_execution_times: + +Computation times +================= +**00:00.993** total execution time for **examples_NVH** files: + ++------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_NVH_frf_plate_damping.py` (``frf_plate_damping.py``) | 00:00.993 | 0.0 MB | ++------------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/SALE/index.rst.txt b/version/0.2/_sources/examples/SALE/index.rst.txt new file mode 100644 index 000000000..175e006b7 --- /dev/null +++ b/version/0.2/_sources/examples/SALE/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_SALE: + +SALE examples +~~~~~~~~~~~~~~ + +These examples show how to create SALE model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/SALE/images/thumb/sphx_glr_sale_efp_thumb.png + :alt: EFP Concrete Target + + :ref:`sphx_glr_examples_SALE_sale_efp.py` + +.. raw:: html + +
EFP Concrete Target
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/SALE/sale_efp + diff --git a/version/0.2/_sources/examples/SALE/sale_efp.rst.txt b/version/0.2/_sources/examples/SALE/sale_efp.rst.txt new file mode 100644 index 000000000..d5ae64580 --- /dev/null +++ b/version/0.2/_sources/examples/SALE/sale_efp.rst.txt @@ -0,0 +1,168 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/SALE/sale_efp.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_SALE_sale_efp.py: + + +EFP Concrete Target +=================== + +This example demonstrates how to create a SALE input deck. + +LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-100 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynasale import ( + DynaSALE, + ControlPoint, + AdvectionMethod, + StructuredMesh, + FillDirection, + Point, + ) + from ansys.dyna.core.pre import dynamaterial as matDB + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + efp_solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.sale_efp + os.sep + fns.append(path + "efpcase.k") + efp_solution.open_files(fns) + + # set termination + efp_solution.set_termination(280) + + efp = DynaSALE() + efp_solution.add(efp) + + # set post result ouput interval + efp.set_output_interval(5.0) + + # set analysis type + efp.set_analysis_type(method=AdvectionMethod.VAN_LEER_WITH_HIS) + + # define mesh + control_points_x = [ + ControlPoint(number=1, position=0, ratio=1), + ControlPoint(number=11, position=-2.5, ratio=0.5), + ControlPoint(number=21, position=0, ratio=0.5), + ControlPoint(number=31, position=0, ratio=1), + ] + + control_points_y = [ + ControlPoint(number=1, position=0, ratio=1), + ControlPoint(number=11, position=-2.5, ratio=0.5), + ControlPoint(number=21, position=0, ratio=0.5), + ControlPoint(number=31, position=0, ratio=1), + ] + + control_points_z = [ + ControlPoint(number=1, position=0, ratio=0.5), + ControlPoint(number=269, position=11, ratio=0.25), + ControlPoint(number=309, position=21, ratio=0.25), + ControlPoint(number=339, position=0, ratio=5), + ] + + mesh = StructuredMesh(control_points_x, control_points_y, control_points_z) + efp.add(mesh) + + # fill material + vacuum = matDB.Vacuum() + mesh.fill(vacuum) + air = matDB.Air() + mesh.fill(air, geometry_type="ALL", reference_pressure=1.01325e-6) + he = matDB.HighExplosive() + mesh.fill( + he, + geometry_type="PART", + define_geometry_parameters=[23], + inout=FillDirection.OUTSIDE_THE_GEOMETRY, + ) + liner = matDB.Liner() + mesh.fill( + liner, + geometry_type="PART", + define_geometry_parameters=[22], + inout=FillDirection.OUTSIDE_THE_GEOMETRY, + ) + + # Set the initial conditions + mesh.initial_detonation(Point(0, 0, 19.33)) + + # set outut datebase + efp_solution.set_output_database(matsum=0.2, glstat=0.2) + + # save file on server end + efp_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.887 seconds) + + +.. _sphx_glr_download_examples_SALE_sale_efp.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: sale_efp.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: sale_efp.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/SALE/sg_execution_times.rst.txt b/version/0.2/_sources/examples/SALE/sg_execution_times.rst.txt new file mode 100644 index 000000000..76314d32e --- /dev/null +++ b/version/0.2/_sources/examples/SALE/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_SALE_sg_execution_times: + +Computation times +================= +**00:01.887** total execution time for **examples_SALE** files: + ++-------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_SALE_sale_efp.py` (``sale_efp.py``) | 00:01.887 | 0.0 MB | ++-------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/Thermal/index.rst.txt b/version/0.2/_sources/examples/Thermal/index.rst.txt new file mode 100644 index 000000000..4a4dacdcd --- /dev/null +++ b/version/0.2/_sources/examples/Thermal/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_Thermal: + +Thermal examples +~~~~~~~~~~~~~~~~ + +These examples show how to create thermal model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Thermal/images/thumb/sphx_glr_thermal_stress_thumb.png + :alt: Thermal stress example + + :ref:`sphx_glr_examples_Thermal_thermal_stress.py` + +.. raw:: html + +
Thermal stress example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/Thermal/thermal_stress + diff --git a/version/0.2/_sources/examples/Thermal/sg_execution_times.rst.txt b/version/0.2/_sources/examples/Thermal/sg_execution_times.rst.txt new file mode 100644 index 000000000..2914063d2 --- /dev/null +++ b/version/0.2/_sources/examples/Thermal/sg_execution_times.rst.txt @@ -0,0 +1,12 @@ + +:orphan: + +.. _sphx_glr_examples_Thermal_sg_execution_times: + +Computation times +================= +**00:01.692** total execution time for **examples_Thermal** files: + ++----------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Thermal_thermal_stress.py` (``thermal_stress.py``) | 00:01.692 | 0.0 MB | ++----------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.2/_sources/examples/Thermal/thermal_stress.rst.txt b/version/0.2/_sources/examples/Thermal/thermal_stress.rst.txt new file mode 100644 index 000000000..3459fd34e --- /dev/null +++ b/version/0.2/_sources/examples/Thermal/thermal_stress.rst.txt @@ -0,0 +1,136 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Thermal/thermal_stress.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + Click :ref:`here ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Thermal_thermal_stress.py: + + +Thermal stress example +====================== + +This example show how to create a thermal stress model with Pydyna-pre module. + +LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe + +.. GENERATED FROM PYTHON SOURCE LINES 8-68 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + length: 1 + + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + ThermalAnalysis, + ThermalAnalysisType, + SolidPart, + SolidFormulation, + NodeSet + ) + from ansys.dyna.core.pre.dynamaterial import MatElasticPlasticThermal + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + solution = DynaSolution(hostname) + fns = [] + path = examples.thermal_stress + os.sep + fns.append(path + "thermal_stress.k") + solution.open_files(fns) + + solution.set_termination(3.0) + + ts = DynaMech() + solution.add(ts) + + tanalysis = ThermalAnalysis() + tanalysis.set_timestep(initial_timestep=0.1) + tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) + ts.add(tanalysis) + + ts.set_timestep(timestep_size_for_mass_scaled=0.01) + + mat = MatElasticPlasticThermal( + mass_density=1.0, + temperatures=(0,10,20,30,40,50), + young_modulus=(1e10,1e10,1e10,1e10,1e10,1e10), + poisson_ratio=(0.3,0.3,0.3,0.3,0.3,0.3), + thermal_expansion=(0,2e-6,4e-6,6e-6,8e-6,1e-5), + yield_stress = (1e20,1e20,1e20,1e20,1e20,1e20) + ) + mat.set_thermal_isotropic(density=1,generation_rate_multiplier=10,specific_heat=1,conductivity=1) + + slab = SolidPart(1) + slab.set_material(mat) + slab.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + ts.parts.add(slab) + + # Define initial conddition + for i in range(1,9): + ts.initialconditions.create_temperature(NodeSet([i]),temperature=10) + + solution.set_output_database(glstat=0.03) + solution.create_database_binary(dt=0.01) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.692 seconds) + + +.. _sphx_glr_download_examples_Thermal_thermal_stress.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: thermal_stress.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: thermal_stress.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/examples/index.rst.txt b/version/0.2/_sources/examples/index.rst.txt new file mode 100644 index 000000000..886b993bb --- /dev/null +++ b/version/0.2/_sources/examples/index.rst.txt @@ -0,0 +1,612 @@ +:orphan: + +.. _ref_examples: + +======== +Examples +======== + + +Here are a series of examples using LS-DYNA with the ``ansys-dyna-core`` library. + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +Airbag examples +~~~~~~~~~~~~~~~~ + +These examples show how to create Airbag model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Airbag/images/thumb/sphx_glr_airbag_deploy_thumb.png + :alt: Airbag deploy example + + :ref:`sphx_glr_examples_Airbag_airbag_deploy.py` + +.. raw:: html + +
Airbag deploy example
+
+ + +.. raw:: html + +
+ +EM examples +~~~~~~~~~~~~ + +These examples show how to create electromagnetic model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_railgun_thumb.png + :alt: Railgun example + + :ref:`sphx_glr_examples_EM_em_railgun.py` + +.. raw:: html + +
Railgun example
+
+ + +.. raw:: html + +
+ +Explicit examples +~~~~~~~~~~~~~~~~~ + +These examples show how to create Explicit model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Explicit/images/thumb/sphx_glr_belted_dummy_thumb.png + :alt: Belted dummy example + + :ref:`sphx_glr_examples_Explicit_belted_dummy.py` + +.. raw:: html + +
Belted dummy example
+
+ + +.. raw:: html + +
+ +ICFD examples +~~~~~~~~~~~~~~ + +These examples show how to create ICFD model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_cylinderflow_thumb.png + :alt: Cylinder flow example + + :ref:`sphx_glr_examples_ICFD_icfd_cylinderflow.py` + +.. raw:: html + +
Cylinder flow example
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_dam_break_thumb.png + :alt: Dam break + + :ref:`sphx_glr_examples_ICFD_icfd_dam_break.py` + +.. raw:: html + +
Dam break
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_dem_coupling_thumb.png + :alt: DEM Coupling + + :ref:`sphx_glr_examples_ICFD_icfd_dem_coupling.py` + +.. raw:: html + +
DEM Coupling
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_driven_cavity_thumb.png + :alt: Driven cavity + + :ref:`sphx_glr_examples_ICFD_icfd_driven_cavity.py` + +.. raw:: html + +
Driven cavity
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_free_convection_flow_thumb.png + :alt: Thermal flow + + :ref:`sphx_glr_examples_ICFD_icfd_free_convection_flow.py` + +.. raw:: html + +
Thermal flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_imposed_move_thumb.png + :alt: Imposed move + + :ref:`sphx_glr_examples_ICFD_icfd_imposed_move.py` + +.. raw:: html + +
Imposed move
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_internal_3d_flow_thumb.png + :alt: Internal 3D flow + + :ref:`sphx_glr_examples_ICFD_icfd_internal_3d_flow.py` + +.. raw:: html + +
Internal 3D flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_adaptivity_thumb.png + :alt: Mesh Adaptivity + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_adaptivity.py` + +.. raw:: html + +
Mesh Adaptivity
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_morphing_thumb.png + :alt: Mesh Morphing + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_morphing.py` + +.. raw:: html + +
Mesh Morphing
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_size_thumb.png + :alt: Mesh size + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_size.py` + +.. raw:: html + +
Mesh size
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_plate_flow_thumb.png + :alt: Plate flow + + :ref:`sphx_glr_examples_ICFD_icfd_plate_flow.py` + +.. raw:: html + +
Plate flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_sloshing_thumb.png + :alt: Sloshing + + :ref:`sphx_glr_examples_ICFD_icfd_sloshing.py` + +.. raw:: html + +
Sloshing
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_strong_fsi_thumb.png + :alt: Strong FSI + + :ref:`sphx_glr_examples_ICFD_icfd_strong_fsi.py` + +.. raw:: html + +
Strong FSI
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_thermal_flow_thumb.png + :alt: Thermal flow + + :ref:`sphx_glr_examples_ICFD_icfd_thermal_flow.py` + +.. raw:: html + +
Thermal flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_weak_fsi_thumb.png + :alt: Weak FSI + + :ref:`sphx_glr_examples_ICFD_icfd_weak_fsi.py` + +.. raw:: html + +
Weak FSI
+
+ + +.. raw:: html + +
+ +IGA examples +~~~~~~~~~~~~~ + +These examples show how to create Isogeometric Analysis model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/IGA/images/thumb/sphx_glr_iga_sample_thumb.png + :alt: IGA example + + :ref:`sphx_glr_examples_IGA_iga_sample.py` + +.. raw:: html + +
IGA example
+
+ + +.. raw:: html + +
+ +ISPH examples +~~~~~~~~~~~~~ + +These examples show how to create ISPH model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ISPH/images/thumb/sphx_glr_rigidtest_thumb.png + :alt: Rigid test example + + :ref:`sphx_glr_examples_ISPH_rigidtest.py` + +.. raw:: html + +
Rigid test example
+
+ + +.. raw:: html + +
+ +Implicit examples +~~~~~~~~~~~~~~~~~~ + +These examples show how to create implicit model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Implicit/images/thumb/sphx_glr_camry_rc_thumb.png + :alt: Crash example + + :ref:`sphx_glr_examples_Implicit_camry_rc.py` + +.. raw:: html + +
Crash example
+
+ + +.. raw:: html + +
+ +NVH examples +~~~~~~~~~~~~~ + +These examples show how to create NVH model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/NVH/images/thumb/sphx_glr_frf_plate_damping_thumb.png + :alt: FRF for a rectangular plate + + :ref:`sphx_glr_examples_NVH_frf_plate_damping.py` + +.. raw:: html + +
FRF for a rectangular plate
+
+ + +.. raw:: html + +
+ +SALE examples +~~~~~~~~~~~~~~ + +These examples show how to create SALE model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/SALE/images/thumb/sphx_glr_sale_efp_thumb.png + :alt: EFP Concrete Target + + :ref:`sphx_glr_examples_SALE_sale_efp.py` + +.. raw:: html + +
EFP Concrete Target
+
+ + +.. raw:: html + +
+ +Thermal examples +~~~~~~~~~~~~~~~~ + +These examples show how to create thermal model. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Thermal/images/thumb/sphx_glr_thermal_stress_thumb.png + :alt: Thermal stress example + + :ref:`sphx_glr_examples_Thermal_thermal_stress.py` + +.. raw:: html + +
Thermal stress example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + :includehidden: + + /examples/Airbag/index.rst + /examples/EM/index.rst + /examples/Explicit/index.rst + /examples/ICFD/index.rst + /examples/IGA/index.rst + /examples/ISPH/index.rst + /examples/Implicit/index.rst + /examples/NVH/index.rst + /examples/SALE/index.rst + /examples/Thermal/index.rst + + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.2/_sources/index.rst.txt b/version/0.2/_sources/index.rst.txt new file mode 100644 index 000000000..b55d5d7e3 --- /dev/null +++ b/version/0.2/_sources/index.rst.txt @@ -0,0 +1,13 @@ +PyDyna documentation |version| +=============================== + +.. include:: ../../README.rst + +.. toctree:: + :hidden: + + Resources/Getting_Started + Resources/User_Guide + API/index + Resources/Contributing + examples/index diff --git a/version/0.2/_static/404.rst b/version/0.2/_static/404.rst new file mode 100644 index 000000000..c55991984 --- /dev/null +++ b/version/0.2/_static/404.rst @@ -0,0 +1,6 @@ +Oops! +===== + +This is unexpected. The page you are requesting does not exist. + +If this page should exist, please contact `{{ theme_contact_mail }} <{{ theme_contact_mail }}>`_. \ No newline at end of file diff --git a/version/0.2/_static/README.md b/version/0.2/_static/README.md new file mode 100644 index 000000000..d2c955ccc --- /dev/null +++ b/version/0.2/_static/README.md @@ -0,0 +1 @@ +Static files are found here (like images and other assets). diff --git a/version/0.2/_static/_sphinx_javascript_frameworks_compat.js b/version/0.2/_static/_sphinx_javascript_frameworks_compat.js new file mode 100644 index 000000000..8549469dc --- /dev/null +++ b/version/0.2/_static/_sphinx_javascript_frameworks_compat.js @@ -0,0 +1,134 @@ +/* + * _sphinx_javascript_frameworks_compat.js + * ~~~~~~~~~~ + * + * Compatability shim for jQuery and underscores.js. + * + * WILL BE REMOVED IN Sphinx 6.0 + * xref RemovedInSphinx60Warning + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + + +/** + * small helper function to urldecode strings + * + * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL + */ +jQuery.urldecode = function(x) { + if (!x) { + return x + } + return decodeURIComponent(x.replace(/\+/g, ' ')); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s === 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node, addItems) { + if (node.nodeType === 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && + !jQuery(node.parentNode).hasClass(className) && + !jQuery(node.parentNode).hasClass("nohighlight")) { + var span; + var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg"); + if (isInSVG) { + span = document.createElementNS("http://www.w3.org/2000/svg", "tspan"); + } else { + span = document.createElement("span"); + span.className = className; + } + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + if (isInSVG) { + var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect"); + var bbox = node.parentElement.getBBox(); + rect.x.baseVal.value = bbox.x; + rect.y.baseVal.value = bbox.y; + rect.width.baseVal.value = bbox.width; + rect.height.baseVal.value = bbox.height; + rect.setAttribute('class', className); + addItems.push({ + "parent": node.parentNode, + "target": rect}); + } + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this, addItems); + }); + } + } + var addItems = []; + var result = this.each(function() { + highlight(this, addItems); + }); + for (var i = 0; i < addItems.length; ++i) { + jQuery(addItems[i].parent).before(addItems[i].target); + } + return result; +}; + +/* + * backward compatibility for jQuery.browser + * This will be supported until firefox bug is fixed. + */ +if (!jQuery.browser) { + jQuery.uaMatch = function(ua) { + ua = ua.toLowerCase(); + + var match = /(chrome)[ \/]([\w.]+)/.exec(ua) || + /(webkit)[ \/]([\w.]+)/.exec(ua) || + /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) || + /(msie) ([\w.]+)/.exec(ua) || + ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) || + []; + + return { + browser: match[ 1 ] || "", + version: match[ 2 ] || "0" + }; + }; + jQuery.browser = {}; + jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true; +} diff --git a/version/0.2/_static/ansys-favicon.png b/version/0.2/_static/ansys-favicon.png new file mode 100644 index 000000000..cfb2e5356 Binary files /dev/null and b/version/0.2/_static/ansys-favicon.png differ diff --git a/version/0.2/_static/ansys_logo_black.jpg b/version/0.2/_static/ansys_logo_black.jpg new file mode 100644 index 000000000..7f7373351 Binary files /dev/null and b/version/0.2/_static/ansys_logo_black.jpg differ diff --git a/version/0.2/_static/ansys_logo_black_cropped.jpg b/version/0.2/_static/ansys_logo_black_cropped.jpg new file mode 100644 index 000000000..05d98e6ca Binary files /dev/null and b/version/0.2/_static/ansys_logo_black_cropped.jpg differ diff --git a/version/0.2/_static/ansys_logo_white.pdf b/version/0.2/_static/ansys_logo_white.pdf new file mode 100644 index 000000000..fceb89b30 Binary files /dev/null and b/version/0.2/_static/ansys_logo_white.pdf differ diff --git a/version/0.2/_static/ansys_logo_white_cropped.pdf b/version/0.2/_static/ansys_logo_white_cropped.pdf new file mode 100644 index 000000000..ad122b159 Binary files /dev/null and b/version/0.2/_static/ansys_logo_white_cropped.pdf differ diff --git a/version/0.2/_static/basic.css b/version/0.2/_static/basic.css new file mode 100644 index 000000000..18495ea08 --- /dev/null +++ b/version/0.2/_static/basic.css @@ -0,0 +1,900 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 270px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/version/0.2/_static/binder_badge_logo.svg b/version/0.2/_static/binder_badge_logo.svg new file mode 100644 index 000000000..327f6b639 --- /dev/null +++ b/version/0.2/_static/binder_badge_logo.svg @@ -0,0 +1 @@ + launchlaunchbinderbinder \ No newline at end of file diff --git a/version/0.2/_static/broken_example.png b/version/0.2/_static/broken_example.png new file mode 100644 index 000000000..4fea24e7d Binary files /dev/null and b/version/0.2/_static/broken_example.png differ diff --git a/version/0.2/_static/css/ansys_sphinx_theme.css b/version/0.2/_static/css/ansys_sphinx_theme.css new file mode 100644 index 000000000..7dbf74611 --- /dev/null +++ b/version/0.2/_static/css/ansys_sphinx_theme.css @@ -0,0 +1,940 @@ +/* Provided by the Sphinx base theme template at build time */ + +@import "../basic.css"; +@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap'); +@import "../sg_gallery.css"; +@import "../design-style.4045f2051d55cab465a707391d5b2007.min.css"; +@import "../styles/pydata-sphinx-theme.css"; + + +@font-face { + font-family: "Source Sans Pro Light"; + src: url(../fonts/SourceSansPro-Light.ttf); +} + +@font-face { + font-family: "Source Sans Pro"; + src: url(../fonts/SourceSansPro-Regular.ttf); +} + +:root { + /* Ansys specific changes to the theme */ + + /***************************************************************************** + * Ansys Font family + **/ + /* These are adapted from https://systemfontstack.com/ */ + --pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI, "Helvetica Neue", + Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; + --pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco, + Liberation Mono, Lucida Console, monospace; + + --pst-font-family-base: 'Source Sans Pro', sans-serif, var(--pst-font-family-base-system); + --pst-font-family-heading: 'Source Sans Pro', sans-serif, var(--pst-font-family-base-system); + --pst-font-family-monospace: monospace, Courier, var(--pst-font-family-monospace-system); + + /***************************************************************************** + * Ansys compatible colors + * + * Colors are defined in rgb string way, "red, green, blue" + **/ + --ansysGold: rgb(255, 183, 27); /* #FFB71B */ + --ansysBronze: rgb(200, 146, 17); /* #C89211 */ + --pythonBlue: rgb(57, 114, 161); /* #3972a1 */ + + --pst-color-active-navigation: var(--ansysBronze); /* --ansysBronze */ + --pst-color-navbar-link: rgb(255, 255, 255); + --pst-color-navbar-link-hover: var(--ansysBronze); /* --ansysBronze */ + --pst-color-navbar-link-active: var(--ansysGold); /* --ansysBronze */ + --pst-font-size-h1: 48px; + --pst-font-size-h2: 36px; + --pst-font-size-h3: 28px; + --pst-font-size-h4: 20px; + --pst-font-size-h5: 14px; + --pst-font-size-h6: 11px; +} + +html[data-theme="light"] { + /***************************************************************************** + * main colors + */ + --pst-color-primary: #fff; + --pst-color-secondary: rgb(200, 146, 17); + --pst-color-success: rgb(40, 167, 69); + --pst-color-text-base: rgb(0, 0, 0); + --pst-color-text-muted: rgb(26, 24, 24); + --pst-color-border: #c9c9c9; + --pst-color-shadow: rgb(216, 216, 216); + --pst-color-info: var(--pst-color-link); + + /***************************************************************************** + * depth colors + */ + --pst-color-on-background: rgb(0, 0, 0); + --pst-color-on-surface: #f2f2f2; + + /***************************************************************************** + * extensions + */ + + --pst-color-panel-background: var(--pst-color-on-background); + + /***************************************************************************** + * layout + */ + + --pst-color-link:#1E6DDC; + --pst-color-link-hover:#32cfea; + --pst-color-inline-code: #000; + --pst-color-target: rgb(255, 255, 255); + + /***************************************************************************** + * color for sphinx-gallery-code output + */ + --pst-color-codecell: #fafae2; + --pst-color-codeout: var(--pst-color-inline-code); + --pst-color-sig: #0965C8; + --pst-color-code-s1: #b35000; + --pst-color-code-c1: #095D0A; + /***************************************************************************** + * sphinx design primary color + */ + --sd-color-primary : var(--pst-color-text-base); + + /***************************************************************************** + * table hovering + */ + --pst-color-table-hover: var(--pst-color-border); +} + +html[data-theme="dark"] { + /***************************************************************************** + * main colors + */ + --pst-color-primary: #D09735; + --pst-color-secondary: #C58E30; + --pst-color-success: rgb(72, 135, 87); + --pst-color-text-base: rgb(201, 209, 217); + --pst-color-text-muted: rgb(192, 192, 192); + --pst-color-border: rgb(192, 192, 192); + --pst-color-shadow: rgb(104, 102, 102); + --pst-color-background: rgb(18, 18, 18); + --pst-color-on-background: rgb(0, 0, 0); + --pst-color-surface: rgb(41, 41, 41); + --pst-color-on-surface: rgb(55, 55, 55); + --pst-color-info: var(--pst-color-secondary); + + + /***************************************************************************** + * extensions + */ + + --pst-color-panel-background: var(--pst-color-on-background); + + /***************************************************************************** + * layout + */ + + --pst-color-link: #579CE5; + --pst-color-link-hover:#12B2E2; + --pst-color-inline-code: #fff; + --pst-color-target: rgb(71, 39, 0); + + /***************************************************************************** + * color for sphinx-gallery-code output + */ + --pst-color-codecell: #495057; + --pst-color-codeout: #f2f4f6; + --pst-color-sig:#d6ab1e; + --pst-color-code-s1: #D79A60; + --pst-color-code-c1: #8FB842; + + /***************************************************************************** + * table hovering + */ + --pst-color-table-hover: var(--pst-color-target); +} + +/* +################# +body and content +################# +*/ + +body { + font-family: 'Open Sans', sans-serif; +} + +h1, h2 { + color: var(--pst-color-text-base); +} + +/* +########## +Codecell +########## +*/ + +dt:target, span.highlighted { + background-color: var(--pst-color-codecell)!important; +} + +.docutils { + color: var(--pst-color-inline-code); + font-family:var(--pst-font-family-monospace); + font-weight: 500; + font-size: 87.5%; +} + +code.literal { + padding: .1rem .25rem; + padding-top: 0.1rem; + padding-right: 0.25rem; + padding-bottom: 0.1rem; + padding-left: 0.25rem; + background-color: var(--pst-color-on-surface); + border: 1px solid var(--pst-color-border); + border-radius: .25rem; +} + +.xref.std.std-ref { + color: var(--pst-color-inline-code); + font-family: 'Inconsolata'; + font-weight: normal; + font-style: italic; + padding: .1rem .25rem; + padding-top: 0.1rem; + padding-right: 0.25rem; + padding-bottom: 0.1rem; + padding-left: 0.25rem; + font-size: 90%; + background-color: var(--pst-color-on-surface); + border: 1px solid var(--pst-color-border); + border-radius: .25rem; +} + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name.descname { + color: var(--pst-color-inline-code); +} + +.sig-name { + color: var(--pst-color-sig); +} + +/* Increase empty-space around classes, methods, properties, etc. that are descendants + of other items */ +dl.class dl.py { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +/* Reduce empty-space around Notes and Examples headings */ +p.rubric { + margin-top: 0.75em; + margin-bottom: 0.75em; +} + +/* +######## +Table +######## +*/ + +table { + width:100%; + max-width: 100%; + border-spacing: 0; + border-collapse: collapse; + overflow: hidden; + vertical-align: middle; + + /* Disabling scroll bars */ + overflow-y: scroll; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* Internet Explorer 10+ */ +} + +tr { + background-color: var(--pst-color-background); +} + +th { + background-color: rgb(255, 183, 27, 0.55); +} + +tr:nth-child(odd), tr:nth-child(even){ + background-color: var(--pst-color-background); +} + +.table tr:hover td { + background-color: var(--pst-color-table-hover); +} + +/* +############### +Table-centered +################ +Same as table but with horizontally centered text. + +see examples. +*/ +table.table-centered { + width:100%; + max-width: 100%; + border-spacing: 0; + border-collapse: collapse; + overflow: hidden; + vertical-align: middle; + text-align: center; + + /* Disabling scroll bars */ + overflow-y: scroll; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* Internet Explorer 10+ */ + } + +.table-centered tr { + background-color: var(--pst-color-background); + text-align: center; +} + +.table-centered th { + background-color: rgb(255, 183, 27, 0.55); + text-align: center; +} + +.table-centered tr:nth-child(odd), .table-centered tr:nth-child(even){ + text-align: center; + background-color: var(--pst-color-background); +} + +.table-centered tr:hover td { + background-color: var(--pst-color-table-hover); + text-align: center; +} + +table.dataframe { + table-layout: auto !important; +} + +/* +################### +longtable-centered +#################### +*/ + +table.longtable-centered { + text-align: center; + } + +.longtable-centered tr { + text-align: center; +} + +.longtable-centered th { + text-align: center; +} + +.longtable-centered tr:nth-child(odd){ + text-align: center; +} + +.longtable-centered tr:nth-child(even){ + text-align: center; +} + +table.longtable-centered tr:hover td { + background-color: var(--pst-color-table-hover); + text-align: center; +} + +/* +######### +DataFrame +######### +*/ + +.dataframe tr{ + background-color: var(--pst-color-background); +} + +.dataframe tr:nth-child(odd), .dataframe tr:nth-child(even){ + background-color: var(--pst-color-background) !important; +} + +.dataframe tr:hover td { + background-color: var(--pst-color-table-hover); +} + +/* +################### +DataFrame-centered +################### +*/ + +.dataframe-centered tr{ + background-color: var(--pst-color-background); + text-align: center; + } + +.dataframe-centered tr:nth-child(odd){ + background-color: var(--pst-color-background) !important; + text-align: center; + } + +.dataframe-centered tr:nth-child(even){ + background-color: var(--pst-color-border); + text-align: center; +} + +.dataframe-centered tr:hover td { + background-color: var(--pst-color-border); + text-align: center; +} + +.dataframe thead th { + text-align: center; +} + +/* +############ +data table +############ +*/ + +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + color: var(--pst-color-text-base)!important; +} + +.dataTables_wrapper, .dataTables_wrapper .dataTables_filter, +.dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, +.dataTables_wrapper .dataTables_paginate { + color: var(--pst-color-text-base)!important; +} + +table.dataTable tbody th, table.dataTable tbody td { + background: var(--pst-color-background); +} + +label { + color: var(--pst-color-text-base); +} + +/* +########## +Scroll-bar +########## +*/ + +body::-webkit-scrollbar { + width: 1rem; + height: 1rem; +} + +body::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; +} + +body::-webkit-scrollbar-track { + background: var(--pst-color-background); +} + +.bd-sidebar::-webkit-scrollbar { + width: .5rem; + height: .5rem; +} + +.bd-sidebar::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; + visibility: hidden !important; +} + +.bd-sidebar::-webkit-scrollbar-track { + background: var(--pst-color-border); + visibility: hidden !important; +} + +.bd-toc::-webkit-scrollbar { + width: .5rem; + height: .5rem; +} + +.bd-toc::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; +} + +.bd-toc::-webkit-scrollbar-track { + background: var(--pst-color-border); +} + +/* +############ +Autosummary +############ +*/ + +.autosummary tr:nth-child(odd), .autosummary tr:nth-child(even){ + background-color: var(--pst-color-background); +} + +/* +##################### +ReST :download: links +##################### +*/ +a > code.download +{ + font-family: var(--pst-font-family-base); + color: var(--pst-color-link); + text-decoration: none; + font-weight: normal; +} + +/* +##################### +Sphinx gallery output +##################### +*/ +.sphx-glr-script-out .highlight pre{ + background-color: var(--pst-color-codecell) !important; + color: var(--pst-color-codeout); + } + +.prev-next-area a p.prev-next-title { + color: var(--pst-color-link); + font-weight: 600; + font-size: 1.1em; +} + +.highlight .s1, .s2, .kc { + color: var(--pst-color-code-s1)!important; +} + +html[data-theme="dark"] .highlight .kn { + color: #E18FFF; + font-weight: normal; +} + +.highlight .c1 { + color: var(--pst-color-code-c1); +} + +html[data-theme="dark"] .highlight .n { + color: #b3d7ff; +} + +html[data-theme="dark"] .highlight .nn { + color: #43D69D; + text-decoration: none; +} +/* +############### +Dropdown button +############### +*/ + +.navbar button.navbar-toggler { + margin-right: 1em; + border-color: rgb(255, 255, 255); + color: rgb(255, 255, 255); +} + +/* +#################################################### +Side column size (first and second column from left) +#################################################### +*/ + +.col-md-3 { + flex: 0 0 20%; + max-width: 20%; +} + +a.headerlink { + color: #222; +} + +@media (min-width:1200px) { + .container, + .container-lg, + .container-md, + .container-sm, + .container-xl { + max-width: 1200px + } +} + +@media (min-width:1600px) { + .container, + .container-lg, + .container-md, + .container-sm, + .container-xl { + max-width: 1600px + } +} + +/* +############################################ +Navigation column (according to side column) +############################################ +*/ +.col-lg-9 { + flex: 0 0 80%; + max-width: 80%; + padding-right: 5px; + padding-left: 20px; +} +.bd-main .bd-content { + display: flex; + height: 100%; + justify-content: end; +} + +.bd-main .bd-content .bd-article-container .bd-article { + padding-left: 1rem; + padding-top: 1rem; +} +.bd-header .navbar-nav li a.nav-link { + color: #ddd; +} +.bd-header .navbar-nav .dropdown button { + color: #ddd; + display: unset; +} + +/* +################################# +Syntax highlighting in code block +################################# +*/ + +html[data-theme="light"] .highlight .o { + color: #B35000; + font-weight: bold; +} + +/* +############################# +Bold font weight for **code** +############################# +*/ + +b, strong { + font-weight: 900; +} + +.bd-header .navbar-nav>.active>.nav-link { + border-bottom: 2px solid #fff; +} + +.navbar-nav li a:focus, .navbar-nav li a:hover, .navbar-nav li.current>a { + color: white !important; +} + +.navbar-nav .dropdown .dropdown-menu{ + min-width: 250px; +} + +/* +########################### +Left side toc-tree hovering +########################### +*/ + +nav.bd-links .active:hover>a { + font-weight: bold; + color: var(--pst-color-text-base); + border-left: 2px solid var(--pst-color-text-base); +} + +nav.bd-links .active>a { + font-weight: bold; + color: var(--pst-color-text-muted)!important; + border-left: 2px solid var(--pst-color-text-base); + border-bottom: none!important; + padding-left: 0.5rem; +} + +nav.bd-links li>a:hover { + font-weight: 900; + color: var(--pst-color-link)!important; +} + +/* +################## +icon, button, logo +################## +*/ + +button, input, optgroup, select, textarea,button:hover { + color: #ddd; +} + +.theme-switch-button { + border-color: #f8f9fa; +} + +button.version-switcher__button:hover { + color: #f8f8f2; +} + +button.version-switcher__button { + color: #f8f9fa; +} + +.search-button { + color: #ddd; +} + +kbd { + background-color: #f8f9fa; +} + +.theme-switch-button span { + color: #f8f9fa; +} + +html[data-theme=light] .theme-switch-button span:hover { + color: #0d0d0d; +} + +/* make the github logo white */ + +i.fa-github-square:before, i.fa-square-github:before { + color: white; + font-size: 2rem; +} + +.version-switcher__menu a.list-group-item:hover { + background-color: #D09735!important; + border-color: var(--pst-color-text-base)!important; + color: #000!important; +} + +.version-switcher__menu a.list-group-item { + background-color: #f8f9fa; + border-color: var(--pst-color-border); + color: #000; +} + +.fa-wrench:before { + content: "\f0ad"; + color: white; +} + +/* +############################## +image padding before and after +############################## +*/ + +img { + padding-top: 1em; + padding-bottom: 1em; +} + +html[data-theme=dark] .bd-content img:not(.only-dark):not(.dark-light) { + background: transparent; +} + +img.logo__image { + padding-top: 0rem; + padding-bottom: 0rem; +} + +/* +########################## +Nav-bar entity right side. +########################## +*/ + +nav.bd-links li>a { + color: var(--pst-color-link); + font-size: .98rem; +} + +html[data-theme="light"] .highlight pre { + line-height: 125%; + font-size: 0.9em; +} + +html[data-theme="dark"] .highlight pre { + line-height: 125%; + font-size: 0.9em; +} + +.bd-toc { + padding-top: 5em; +} + +#version_switcher_button { + background-color: var(--pst-color-background); +} + +.editthispage a { + color: var(--pst-color-text-base); +} + +.list-group-item.active { + z-index: 2; + color: var(--pst-color-text-base)!important; +} + + +/* +############## +Sphinx design +############## +*/ +.sd-sphinx-override, .sd-sphinx-override * { + background-color: transparent !important; + font-size: medium; + flex: auto; +} +/* +Sphinx-design tab +*/ + +.sd-tab-set>input:not(.focus-visible)+label { + outline: none; + font-size: large; + -webkit-tap-highlight-color: transparent; + color: var(--pst-color-text-base); +} + +.sd-tab-set>input:checked+label+.sd-tab-content { + display: block; + font-size: medium; +} + +.sd-tab-set>input:checked+label+.sd-tab-content { + display: block; + font-size: .9rem; +} + +.sd-tab-content { + font-family: var(--pst-font-family-base); +} + +.bd-content .sd-tab-set>input:checked+label, .bd-content .sd-tab-set>input:not(:checked)+label:hover { + color: var(--pst-color-text-base); + border-color: var(--pst-color-text-base); +} + +/* +Sphinx-design card +*/ + +.sd-card .sd-card-text { + font-family: var(--pst-font-family-base)!important; +} + +.sd-card .sd-card-header { +border: none; +background-color:white; +color: #150458 !important; +font-size: var(--pst-font-size-h5); +font-weight: bold; +font-family: var(--pst-font-family-base); +padding: .5rem 0rem 0.5rem 0rem; +} + +.sd-card .sd-card-footer .sd-card-text { +max-width: 220px; +margin-left: auto; +margin-right: auto; +font-family: var(--pst-font-family-base); +} + +html[data-theme=dark] .sd-shadow-sm { + box-shadow: 0 .1rem 1rem rgba(250, 250, 250, .6) !important +} + +html[data-theme=dark] .sd-card-img-top[src*='.png'] { + filter: invert(0.82) brightness(0.8) contrast(1.2); +} + +.sd-card { + border-radius: 0; + padding: 10px 10px 10px 10px; + font-family: var(--pst-font-family-base)!important; +} + +/* +Sphinx-design dropdown +*/ + +details.sd-dropdown .sd-summary-title { + border: 1px solid var(--pst-color-text-base) !important; + color: var(--sd-color-card-text) !important; + font-family: var(monospace)!important; + font-size: medium; + text-align: left; + padding-left: 1rem; +} + +/* +################################# +Right side toctree color and font +################################# +*/ +.toc-entry a.nav-link { + padding: .125rem 1.5rem; + color: var(--pst-color-link); +} + +.toc-entry a.nav-link.active { + font-weight: bold; + color: var(--pst-color-text-base); + background-color: transparent; + border-left: 2px solid var(--pst-color-text-muted); +} + +.toc-h2 { + font-size: 0.98rem; + padding: 0.05em; +} + +.toc-h3 { + font-size: .96rem; +} + +.toc-h4 { + font-size: .90rem; +} + +.toc-entry a.nav-link:hover { + color: var(--pst-color-link); + text-decoration: none; + font-weight: 600; +} + +/* +########### +Directives +########### +*/ + +div.deprecated { + border-color: var(--pst-color-danger); + background-color: #dc354514; +} + +div.versionadded { + border-color: var(--pst-color-success); + background: #88ca881f; +} + +.admonition, div.admonition{ + background-color: var( --pst-color-on-surface); +} \ No newline at end of file diff --git a/version/0.2/_static/css/breadcrumbs.css b/version/0.2/_static/css/breadcrumbs.css new file mode 100644 index 000000000..c10f0593d --- /dev/null +++ b/version/0.2/_static/css/breadcrumbs.css @@ -0,0 +1,68 @@ +/* Provided by the Sphinx base theme template at build time, +styles exclusively for the ansys-sphinx-theme classes. */ + +@import "ansys-sphinx-theme.css"; + +/* +############ +breadcrumbs +############ +*/ + +#breadcrumbs-spacer { + border-right: 10rem solid var(--pst-color-background); +} + +div.related > ul { + padding: 10px 0 20px 0; +} + +*, :after, :before { + box-sizing: border-box; +} + +/* +########################### +vesrion warning announcement +############################ +*/ + +#announcement_msg { + display: flex; + justify-content: center; + position: relative; + width: 100%; + padding: 0.5rem 12.5%; + text-align: center; +} + +#announcement_msg :after { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + background-color:rgb(223, 95, 114); + opacity: 0.2; + content: ""; + z-index: -1; +} + +#announcement_msg :empty { + display: none; +} + +#announcement_msg p { + font-weight: bold; + margin: auto; + color:black; +} + +html[data-theme="dark"] #announcement_msg :after{ + background-color:lightpink; + opacity: 0.5; +} + +#announcement_msg a { + color:#1E6DDC +} \ No newline at end of file diff --git a/version/0.2/_static/css/meilisearch.css b/version/0.2/_static/css/meilisearch.css new file mode 100644 index 000000000..98bd5a2ea --- /dev/null +++ b/version/0.2/_static/css/meilisearch.css @@ -0,0 +1,113 @@ +@import "https://cdn.jsdelivr.net/npm/docs-searchbar.js@latest/dist/cdn/docs-searchbar.min.css"; +@import "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"; + +div [data-ds-theme] .searchbox { + margin: auto; + display: block; + width: 600px; +} + +.dsb-suggestions { + width: 580px; +} + +.docs-searchbar-suggestion--category-header { + background-color: var(--pst-color-border); + border-radius: 7px; + text-align: center; +} + +.docs-searchbar-suggestion--subcategory-column-text { + color: (var(--pst-color-text-base)); +} + +div [data-ds-theme] .searchbox input { + height: 32px; + border-radius: 8px; + font-size: 18px; + font-family: "Open Sans", sans-serif; + box-shadow: 0px 0px 8px darkgrey; +} + +.docs-searchbar-footer { + display: none; +} + +[class*="docs-searchbar-suggestion"] { + text-decoration: none; +} + +.docs-searchbar-suggestion--highlight { + box-shadow: none !important; +} + +.container { + display: flex; + justify-content: center; + align-items: center; +} + +.meilisearch-autocomplete { + text-align: center; + color: var(--pst-color-text-base); +} + +#search-bar-input{ + width: 550px; + background-color: var(--pst-color-background); + border: 1px solid var(--pst-color-border); + border-radius: .25rem; + color: var(--pst-color-text-base); + font-size: var(--pst-font-size-icon); + position: relative; + padding-left: 3rem; +} + +.meilisearch-autocomplete::before { + content: "\f002"; + font-family: "Font Awesome 6 Free"; /* The Font Awesome font family */ + position: absolute; + left: 8px; + top: 50%; + transform: translateY(-50%); + font-size: 1rem; + color: var(--pst-color-border); +} + +.index-select { + color: var(--pst-color-text-base); + background: var(--pst-color-background); + height: 47px; + border: 1px solid var(--pst-color-border); + border-radius: .25rem; + font-size: 20px; + font-family: "Open Sans", sans-serif; + box-shadow: 0px 0px 20px var(--pst-color-border); + padding: 0 10px 0px 10px; + width: 250px; + margin-left: 5px; +} + +.meilisearch-autocomplete .dsb-dropdown-menu [class^=dsb-dataset-] { + position: relative; + border: 1px solid #d9d9d9; + background: #fff; + border-radius: 4px; + overflow: auto; + padding: 0 8px 8px; + width: 805px; +} + +.meilisearch-autocomplete .docs-searchbar-suggestion { + width: 735px; +} + +.meilisearch-autocomplete .docs-searchbar-suggestion--highlight { + color: var(--pst-color-info); + background: rgb(255 255 255 / 49%); + padding: 0 .05em; +} + +.meilisearch-autocomplete .docs-searchbar-suggestion--subcategory-column { + width: 30%; +} diff --git a/version/0.2/_static/doctools.js b/version/0.2/_static/doctools.js new file mode 100644 index 000000000..527b876ca --- /dev/null +++ b/version/0.2/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/version/0.2/_static/documentation_options.js b/version/0.2/_static/documentation_options.js new file mode 100644 index 000000000..2f2c2047b --- /dev/null +++ b/version/0.2/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: '0.2.1', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: true, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/version/0.2/_static/file.png b/version/0.2/_static/file.png new file mode 100644 index 000000000..a858a410e Binary files /dev/null and b/version/0.2/_static/file.png differ diff --git a/version/0.2/_static/fonts/SourceSansPro-Light.ttf b/version/0.2/_static/fonts/SourceSansPro-Light.ttf new file mode 100644 index 000000000..348871ac6 Binary files /dev/null and b/version/0.2/_static/fonts/SourceSansPro-Light.ttf differ diff --git a/version/0.2/_static/fonts/SourceSansPro-Regular.ttf b/version/0.2/_static/fonts/SourceSansPro-Regular.ttf new file mode 100644 index 000000000..b422bf432 Binary files /dev/null and b/version/0.2/_static/fonts/SourceSansPro-Regular.ttf differ diff --git a/version/0.2/_static/fonts/SourceSansPro-SemiBold.ttf b/version/0.2/_static/fonts/SourceSansPro-SemiBold.ttf new file mode 100644 index 000000000..2908e0d78 Binary files /dev/null and b/version/0.2/_static/fonts/SourceSansPro-SemiBold.ttf differ diff --git a/version/0.2/_static/graphviz.css b/version/0.2/_static/graphviz.css new file mode 100644 index 000000000..19e7afd38 --- /dev/null +++ b/version/0.2/_static/graphviz.css @@ -0,0 +1,19 @@ +/* + * graphviz.css + * ~~~~~~~~~~~~ + * + * Sphinx stylesheet -- graphviz extension. + * + * :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +img.graphviz { + border: 0; + max-width: 100%; +} + +object.graphviz { + max-width: 100%; +} diff --git a/version/0.2/_static/jquery-3.6.0.js b/version/0.2/_static/jquery-3.6.0.js new file mode 100644 index 000000000..fc6c299b7 --- /dev/null +++ b/version/0.2/_static/jquery-3.6.0.js @@ -0,0 +1,10881 @@ +/*! + * jQuery JavaScript Library v3.6.0 + * https://jquery.com/ + * + * Includes Sizzle.js + * https://sizzlejs.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2021-03-02T17:08Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket #14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var + version = "3.6.0", + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} +var Sizzle = +/*! + * Sizzle CSS Selector Engine v2.3.6 + * https://sizzlejs.com/ + * + * Copyright JS Foundation and other contributors + * Released under the MIT license + * https://js.foundation/ + * + * Date: 2021-02-16 + */ +( function( window ) { +var i, + support, + Expr, + getText, + isXML, + tokenize, + compile, + select, + outermostContext, + sortInput, + hasDuplicate, + + // Local document vars + setDocument, + document, + docElem, + documentIsHTML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + + // Instance-specific data + expando = "sizzle" + 1 * new Date(), + preferredDoc = window.document, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + // Instance methods + hasOwn = ( {} ).hasOwnProperty, + arr = [], + pop = arr.pop, + pushNative = arr.push, + push = arr.push, + slice = arr.slice, + + // Use a stripped-down indexOf as it's faster than native + // https://jsperf.com/thor-indexof-vs-for/5 + indexOf = function( list, elem ) { + var i = 0, + len = list.length; + for ( ; i < len; i++ ) { + if ( list[ i ] === elem ) { + return i; + } + } + return -1; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + + "ismap|loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] + // or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + identifier + ")" ), + "CLASS": new RegExp( "^\\.(" + identifier + ")" ), + "TAG": new RegExp( "^(" + identifier + "|[*])" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rhtml = /HTML$/i, + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rnative = /^[^{]+\{\s*\[native \w/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + return nonHex ? + + // Strip the backslash prefix from a non-hex escape sequence + nonHex : + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // CSS string/identifier serialization + // https://drafts.csswg.org/cssom/#common-serializing-idioms + rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, + fcssescape = function( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; + }, + + // Used for iframes + // See setDocument() + // Removing the function wrapper causes a "Permission Denied" + // error in IE + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; + }, + { dir: "parentNode", next: "legend" } + ); + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android<4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { apply: arr.length ? + + // Leverage slice if possible + function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + } : + + // Support: IE<9 + // Otherwise append directly + function( target, els ) { + var j = target.length, + i = 0; + + // Can't trust NodeList.length + while ( ( target[ j++ ] = els[ i++ ] ) ) {} + target.length = j - 1; + } + }; +} + +function Sizzle( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE, Opera, Webkit + // TODO: identify versions + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + contains( context, elem ) && + elem.id === m ) { + + results.push( elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && + context.getElementsByClassName ) { + + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( support.qsa && + !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && + + // Support: IE 8 only + // Exclude object elements + ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + if ( newContext !== context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = nid.replace( rcssescape, fcssescape ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Adds the same handler for all of the specified attrs + * @param {String} attrs Pipe-separated list of attributes + * @param {Function} handler The method that will be applied + */ +function addHandle( attrs, handler ) { + var arr = attrs.split( "|" ), + i = arr.length; + + while ( i-- ) { + Expr.attrHandle[ arr[ i ] ] = handler; + } +} + +/** + * Checks document order of two siblings + * @param {Element} a + * @param {Element} b + * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b + */ +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && a.nodeType === 1 && b.nodeType === 1 && + a.sourceIndex - b.sourceIndex; + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( ( cur = cur.nextSibling ) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return ( name === "input" || name === "button" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11 + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + /* jshint -W018 */ + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a Sizzle context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +// Expose support vars for convenience +support = Sizzle.support = {}; + +/** + * Detects XML nodes + * @param {Element|Object} elem An element or a document + * @returns {Boolean} True iff elem is a non-HTML XML node + */ +isXML = Sizzle.isXML = function( elem ) { + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; + + // Support: IE <=8 + // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes + // https://bugs.jquery.com/ticket/4833 + return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var hasCompare, subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + docElem = document.documentElement; + documentIsHTML = !isXML( document ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 11, Edge + if ( subWindow.addEventListener ) { + subWindow.addEventListener( "unload", unloadHandler, false ); + + // Support: IE 9 - 10 only + } else if ( subWindow.attachEvent ) { + subWindow.attachEvent( "onunload", unloadHandler ); + } + } + + // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, + // Safari 4 - 5 only, Opera <=11.6 - 12.x only + // IE/Edge & older browsers don't support the :scope pseudo-class. + // Support: Safari 6.0 only + // Safari 6.0 supports :scope but it's an alias of :root there. + support.scope = assert( function( el ) { + docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); + return typeof el.querySelectorAll !== "undefined" && + !el.querySelectorAll( ":scope fieldset div" ).length; + } ); + + /* Attributes + ---------------------------------------------------------------------- */ + + // Support: IE<8 + // Verify that getAttribute really returns attributes and not properties + // (excepting IE8 booleans) + support.attributes = assert( function( el ) { + el.className = "i"; + return !el.getAttribute( "className" ); + } ); + + /* getElement(s)By* + ---------------------------------------------------------------------- */ + + // Check if getElementsByTagName("*") returns only elements + support.getElementsByTagName = assert( function( el ) { + el.appendChild( document.createComment( "" ) ); + return !el.getElementsByTagName( "*" ).length; + } ); + + // Support: IE<9 + support.getElementsByClassName = rnative.test( document.getElementsByClassName ); + + // Support: IE<10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + docElem.appendChild( el ).id = expando; + return !document.getElementsByName || !document.getElementsByName( expando ).length; + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter[ "ID" ] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find[ "ID" ] = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find[ "TAG" ] = support.getElementsByTagName ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else if ( support.qsa ) { + return context.querySelectorAll( tag ); + } + } : + + function( tag, context ) { + var elem, + tmp = [], + i = 0, + + // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Class + Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21) + // We allow this because of a bug in IE8/9 that throws an error + // whenever `document.activeElement` is accessed on an iframe + // So, we allow :focus to pass through QSA all the time to avoid the IE error + // See https://bugs.jquery.com/ticket/13378 + rbuggyQSA = []; + + if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + // Select is set to empty string on purpose + // This is to test IE's treatment of not explicitly + // setting a boolean content attribute, + // since its presence should be enough + // https://bugs.jquery.com/ticket/12359 + docElem.appendChild( el ).innerHTML = "" + + ""; + + // Support: IE8, Opera 11-12.16 + // Nothing should be selected when empty strings follow ^= or $= or *= + // The test attribute must be unknown in Opera but "safe" for WinRT + // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section + if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); + } + + // Support: IE8 + // Boolean attributes and "value" are not treated correctly + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Safari 8+, iOS 8+ + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Firefox <=3.6 - 5 only + // Old Firefox doesn't throw on a badly-escaped identifier. + el.querySelectorAll( "\\\f" ); + rbuggyQSA.push( "[\\r\\n\\f]" ); + } ); + + assert( function( el ) { + el.innerHTML = "" + + ""; + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + var input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE8 + // Enforce case-sensitivity of name attribute + if ( el.querySelectorAll( "[name=d]" ).length ) { + rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE9-11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + docElem.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: Opera 10 - 11 only + // Opera 10-11 does not throw on post-comma invalid pseudos + el.querySelectorAll( "*,:x" ); + rbuggyQSA.push( ",.*:" ); + } ); + } + + if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || + docElem.webkitMatchesSelector || + docElem.mozMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector ) ) ) ) { + + assert( function( el ) { + + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( el, "*" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( el, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + } ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); + + /* Contains + ---------------------------------------------------------------------- */ + hasCompare = rnative.test( docElem.compareDocumentPosition ); + + // Element contains another + // Purposefully self-exclusive + // As in, an element does not contain itself + contains = hasCompare || rnative.test( docElem.contains ) ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); + } : + function( a, b ) { + if ( b ) { + while ( ( b = b.parentNode ) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = hasCompare ? + function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a == document || a.ownerDocument == preferredDoc && + contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b == document || b.ownerDocument == preferredDoc && + contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + } : + function( a, b ) { + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Parentless nodes are either documents or disconnected + if ( !aup || !bup ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + return a == document ? -1 : + b == document ? 1 : + /* eslint-enable eqeqeq */ + aup ? -1 : + bup ? 1 : + sortInput ? + ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( ( cur = cur.parentNode ) ) { + ap.unshift( cur ); + } + cur = b; + while ( ( cur = cur.parentNode ) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[ i ] === bp[ i ] ) { + i++; + } + + return i ? + + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[ i ], bp[ i ] ) : + + // Otherwise nodes in our document sort first + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + /* eslint-disable eqeqeq */ + ap[ i ] == preferredDoc ? -1 : + bp[ i ] == preferredDoc ? 1 : + /* eslint-enable eqeqeq */ + 0; + }; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( support.matchesSelector && documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return Sizzle( expr, document, null, [ elem ] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (jQuery #13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + return val !== undefined ? + val : + support.attributes || !documentIsHTML ? + elem.getAttribute( name ) : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; +}; + +Sizzle.escape = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + sortInput = !support.sortStable && results.slice( 0 ); + results.sort( sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + + // Use textContent for elements + // innerText usage removed for consistency of new lines (jQuery #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || + match[ 5 ] || "" ).replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + Sizzle.error( match[ 0 ] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeNameSelector ) { + var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + + ")" + className + "(" + whitespace + "|$)" ) ) && classCache( + className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + /* eslint-disable max-len */ + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + /* eslint-enable max-len */ + + }; + }, + + "CHILD": function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, uniqueCache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + + // ...in a gzip-friendly way + node = parent; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + + // ...in a gzip-friendly way + node = elem; + outerCache = node[ expando ] || ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + cache = uniqueCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + node.nodeName.toLowerCase() === name : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ node.uniqueID ] || + ( outerCache[ node.uniqueID ] = {} ); + + uniqueCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + "not": markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element (issue #299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + "has": markFunction( function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + } ), + + "contains": markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && + ( !document.hasFocus || document.hasFocus() ) && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + "enabled": createDisabledPseudo( false ), + "disabled": createDisabledPseudo( true ), + + "checked": function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return ( nodeName === "input" && !!elem.checked ) || + ( nodeName === "option" && !!elem.selected ); + }, + + "selected": function( elem ) { + + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos[ "empty" ]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + + // Support: IE<8 + // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + "first": createPositionalPseudo( function() { + return [ 0 ]; + } ), + + "last": createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + "even": createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "odd": createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? + argument + length : + argument > length ? + length : + argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +tokenize = Sizzle.tokenize = function( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rcombinators.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +}; + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, uniqueCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + // Support: IE <9 only + // Defend against cloned attroperties (jQuery gh-1709) + uniqueCache = outerCache[ elem.uniqueID ] || + ( outerCache[ elem.uniqueID ] = {} ); + + if ( skip && skip === elem.nodeName.toLowerCase() ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = uniqueCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + uniqueCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( + selector || "*", + context.nodeType ? [ context ] : context, + [] + ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element (issue #299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens + .slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: IE<9, Safari + // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( + selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) + ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +}; + +/** + * A low-level selection function that works with Sizzle's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with Sizzle.compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +select = Sizzle.select = function( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find[ "ID" ]( token.matches[ 0 ] + .replace( runescape, funescape ), context ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || + context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +}; + +// One-time assignments + +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Support: Chrome 14-35+ +// Always assume duplicates if they aren't passed to the comparison function +support.detectDuplicates = !!hasDuplicate; + +// Initialize against the default document +setDocument(); + +// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +// Support: IE<8 +// Prevent attribute/property "interpolation" +// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !assert( function( el ) { + el.innerHTML = ""; + return el.firstChild.getAttribute( "href" ) === "#"; +} ) ) { + addHandle( "type|href|height|width", function( elem, name, isXML ) { + if ( !isXML ) { + return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); + } + } ); +} + +// Support: IE<9 +// Use defaultValue in place of getAttribute("value") +if ( !support.attributes || !assert( function( el ) { + el.innerHTML = ""; + el.firstChild.setAttribute( "value", "" ); + return el.firstChild.getAttribute( "value" ) === ""; +} ) ) { + addHandle( "value", function( elem, _name, isXML ) { + if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { + return elem.defaultValue; + } + } ); +} + +// Support: IE<9 +// Use getAttributeNode to fetch booleans when getAttribute lies +if ( !assert( function( el ) { + return el.getAttribute( "disabled" ) == null; +} ) ) { + addHandle( booleans, function( elem, name, isXML ) { + var val; + if ( !isXML ) { + return elem[ name ] === true ? name.toLowerCase() : + ( val = elem.getAttributeNode( name ) ) && val.specified ? + val.value : + null; + } + } ); +} + +return Sizzle; + +} )( window ); + + + +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; +jQuery.escapeSelector = Sizzle.escape; + + + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +} +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to Sizzle + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.stackTrace ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the stack, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getStackHook ) { + process.stackTrace = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the primary Deferred + primary = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + primary.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( primary.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return primary.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); + } + + return primary.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +jQuery.Deferred.exceptionHook = function( error, stack ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (#9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see #8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (#14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (#11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (#14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (#13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
" ], + col: [ 2, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (#15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (#12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +// Support: IE <=9 - 11+ +// focus() and blur() are asynchronous, except when they are no-op. +// So expect focus to be synchronous when the element is already active, +// and blur to be synchronous when the element is not already active. +// (focus and blur are always synchronous in other supported browsers, +// this just defines when we can count on it). +function expectSync( elem, type ) { + return ( elem === safeActiveElement() ) === ( type === "focus" ); +} + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", returnTrue ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, expectSync ) { + + // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add + if ( !expectSync ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var notAsync, result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + // Saved data should be false in such cases, but might be a leftover capture object + // from an async native handler (gh-4350) + if ( !saved.length ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + // Support: IE <=9 - 11+ + // focus() and blur() are asynchronous + notAsync = expectSync( this, type ); + this[ type ](); + result = dataPriv.get( this, type ); + if ( saved !== result || notAsync ) { + dataPriv.set( this, type, false ); + } else { + result = {}; + } + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + + // Support: Chrome 86+ + // In Chrome, if an element having a focusout handler is blurred by + // clicking outside of it, it invokes the handler synchronously. If + // that handler calls `.remove()` on the element, the data is cleared, + // leaving `result` undefined. We need to guard against this. + return result && result.value; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering the + // native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved.length ) { + + // ...and capture the result + dataPriv.set( this, type, { + value: jQuery.event.trigger( + + // Support: IE <=9 - 11+ + // Extend with the prototype to reset the above stopImmediatePropagation() + jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), + saved.slice( 1 ), + this + ) + } ); + + // Abort handling of the native event + event.stopImmediatePropagation(); + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (#504, #13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + which: true +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, expectSync ); + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + // Suppress native focus or blur as it's already being fired + // in leverageNative. + _default: function() { + return true; + }, + + delegateType: delegateType + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (#15098, #14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (#8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. + tr.style.height = "1px"; + trChild.style.height = "9px"; + + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is display: block + // gets around this issue. + trChild.style.display = "block"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, #12537) + // .css('--customProperty) (#3144) + if ( computed ) { + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rcustomProp = /^--/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + if ( box === "margin" ) { + delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + "animationIterationCount": true, + "columnCount": true, + "fillOpacity": true, + "flexGrow": true, + "flexShrink": true, + "fontWeight": true, + "gridArea": true, + "gridColumn": true, + "gridColumnEnd": true, + "gridColumnStart": true, + "gridRow": true, + "gridRowEnd": true, + "gridRowStart": true, + "lineHeight": true, + "opacity": true, + "order": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (#7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug #9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (#7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + // Use proper attribute retrieval(#12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, curValue, clazz, j, finalValue, + i = 0; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classes = classesToArray( value ); + + if ( classes.length ) { + while ( ( elem = this[ i++ ] ) ) { + curValue = getClass( elem ); + + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + j = 0; + while ( ( clazz = classes[ j++ ] ) ) { + + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) > -1 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + elem.setAttribute( "class", finalValue ); + } + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + return this.each( function() { + var className, i, self, classNames; + + if ( isValidValue ) { + + // Toggle individual class names + i = 0; + self = jQuery( this ); + classNames = classesToArray( value ); + + while ( ( className = classNames[ i++ ] ) ) { + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (#14686, #14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion + + +support.focusin = "onfocusin" in window; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +// Support: Firefox <=44 +// Firefox doesn't have focus(in | out) events +// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 +// +// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 +// focus(in | out) events fire after focus & blur events, +// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order +// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 +if ( !support.focusin ) { + jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler on the document while someone wants focusin/focusout + var handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ); + + if ( !attaches ) { + doc.addEventListener( orig, handler, true ); + } + dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + attaches = dataPriv.access( doc, fix ) - 1; + + if ( !attaches ) { + doc.removeEventListener( orig, handler, true ); + dataPriv.remove( doc, fix ); + + } else { + dataPriv.access( doc, fix, attaches ); + } + } + }; + } ); +} +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml, parserErrorElem; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) {} + + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); + } + return xml; +}; + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ).filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ).map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // #7653, #8125, #8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + +originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes #9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (#10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket #12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // #9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (#11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // #1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see #8605, #14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // #14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( " + +{% endmacro %} \ No newline at end of file diff --git a/version/0.2/_templates/autosummary/base.html b/version/0.2/_templates/autosummary/base.html new file mode 100644 index 000000000..edd05914a --- /dev/null +++ b/version/0.2/_templates/autosummary/base.html @@ -0,0 +1,519 @@ + + + + + + + + + <no title> — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +

{{ name | escape | underline}}

+ + +
+ + + +
+ + + +
+ +
+ +
+ On this page +
+ +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/_templates/autosummary/class.html b/version/0.2/_templates/autosummary/class.html new file mode 100644 index 000000000..a6cf17dbd --- /dev/null +++ b/version/0.2/_templates/autosummary/class.html @@ -0,0 +1,519 @@ + + + + + + + + + <no title> — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +

{{ fullname | escape | underline}}

+ + +
+ + + +
+ + + +
+ +
+ +
+ On this page +
+ +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/_templates/custom-class-template.html b/version/0.2/_templates/custom-class-template.html new file mode 100644 index 000000000..5923b8160 --- /dev/null +++ b/version/0.2/_templates/custom-class-template.html @@ -0,0 +1,519 @@ + + + + + + + + + <no title> — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +

{{ fullname | escape | underline}}

+ + +
+ + + +
+ + + +
+ +
+ +
+ On this page +
+ +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/_templates/custom-module-template.html b/version/0.2/_templates/custom-module-template.html new file mode 100644 index 000000000..792e1bfe7 --- /dev/null +++ b/version/0.2/_templates/custom-module-template.html @@ -0,0 +1,533 @@ + + + + + + + + + <no title> — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +

{{ fullname | escape | underline}}

+

{% block modules %} +{% if modules %} +.. rubric:: Modules

+ + + +
+
+
{% for item in modules %}

{{ item }}

+
+
+

{%- endfor %} +{% endif %} +{% endblock %}

+ + +
+ + + +
+ + + +
+ +
+ +
+ On this page +
+ +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/announcement.html b/version/0.2/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/Airbag/airbag_deploy.html b/version/0.2/examples/Airbag/airbag_deploy.html new file mode 100644 index 000000000..9d08fb8b1 --- /dev/null +++ b/version/0.2/examples/Airbag/airbag_deploy.html @@ -0,0 +1,684 @@ + + + + + + + + + Airbag deploy example — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Airbag deploy example#

+

This example show how to create an Airbag deploy model with Pydyna-pre module.

+

LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe

+
2023-03-07 08:40:50 :  Connected to kwServer...
+2023-03-07 08:40:50 :  /opt/hostedtoolcache/Python/3.9.16/x64/lib/python3.9/site-packages/ansys/dyna/core/pre/examples/airbag/airbag_deploy/airbag_deploy.k uploaded to server...
+2023-03-07 08:40:50 :  Setting termination time ...
+2023-03-07 08:40:50 :  Curve 1 defined...
+2023-03-07 08:40:50 :  Material RIGID Created...
+2023-03-07 08:40:50 :  Material RIGID Created...
+2023-03-07 08:40:51 :  Material Fabric Created...
+2023-03-07 08:40:51 :  Output Setting...
+2023-03-07 08:40:51 :  DB Binary Created...
+2023-03-07 08:40:51 :  Control Accuracy Created...
+2023-03-07 08:40:51 :  Control Bulk Viscosity Created...
+2023-03-07 08:40:51 :  Control Energy Created...
+2023-03-07 08:40:51 :  Control Hourglass Created...
+2023-03-07 08:40:51 :  Control Shell Created...
+2023-03-07 08:40:51 :  Control Contact Created...
+2023-03-07 08:40:51 :  Contact  Created...
+2023-03-07 08:40:51 :  Airbag Model Created...
+2023-03-07 08:40:51 :  Rigidwall Planar Created...
+2023-03-07 08:40:51 :  airbag_deploy.k is outputed...
+
+length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynamech import (
+    DynaMech,
+    Airbag,
+    PartSet,
+    Curve,
+    Point,
+    RigidwallPlanar,
+    Contact,
+    ContactSurface,
+    ContactCategory,
+    ShellPart,
+    ShellFormulation,
+)
+from ansys.dyna.core.pre.dynamaterial import MatRigid, MatFabric
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+airbag_solution = DynaSolution(hostname)
+fns = []
+# path = sys.path[0] + os.sep + "input" + os.sep + "airbag_deploy" + os.sep
+path = examples.airbag_deploy + os.sep
+fns.append(path + "airbag_deploy.k")
+airbag_solution.open_files(fns)
+
+airbag_solution.set_termination(0.03)
+
+airbagdeploy = DynaMech()
+airbag_solution.add(airbagdeploy)
+
+airbag = Airbag(
+    set=PartSet([3]),
+    heat_capacity_at_constant_volume=1.736e3,
+    heat_capacity_at_constant_pressure=2.43e3,
+    input_gas_temperature=1.2e3,
+    input_mass_flow_rate=Curve(x=[0, 0.032, 0.045, 0.08], y=[0, 26, 0.6, 0.1]),
+    shape_factor_for_exit_hole=0.7,
+    ambient_pressure=14.7,
+    ambient_density=3.821e-6,
+)
+airbagdeploy.add(airbag)
+
+rigidwall = RigidwallPlanar(Point(0, 0, 0), Point(0, 1, 0), coulomb_friction_coefficient=0.5)
+airbagdeploy.add(rigidwall)
+
+contact = Contact(category=ContactCategory.NODES_TO_SURFACE)
+contact.set_friction_coefficient(static=0.5, dynamic=0.5)
+surf1 = ContactSurface(PartSet([3]))
+surf2 = ContactSurface(PartSet([2]))
+surf2.set_penalty_stiffness_scale_factor(0.06667)
+contact.set_slave_surface(surf1)
+contact.set_master_surface(surf2)
+airbagdeploy.contacts.add(contact)
+
+platemat = MatRigid(
+    mass_density=7.84e-4,
+    young_modulus=30e6,
+    center_of_mass_constraint=1,
+    translational_constraint=7,
+    rotational_constraint=7,
+)
+cylindermat = MatRigid(mass_density=1.96e-4, young_modulus=30e6)
+airbagmat = MatFabric(
+    mass_density=1e-4,
+    young_modulus_longitudinal_direction=2e6,
+    young_modulus_transverse_direction=2e6,
+    shear_modulus=1.53e6,
+)
+
+plate = ShellPart(1)
+plate.set_material(platemat)
+plate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)
+plate.set_thickness(0.5)
+airbagdeploy.parts.add(plate)
+
+cylinder = ShellPart(2)
+cylinder.set_material(cylindermat)
+cylinder.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)
+cylinder.set_thickness(0.5)
+airbagdeploy.parts.add(cylinder)
+
+airbagpart = ShellPart(3)
+airbagpart.set_material(airbagmat)
+airbagpart.set_element_formulation(ShellFormulation.FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE)
+airbagpart.set_thickness(0.015)
+airbagpart.set_integration_points(4)
+airbagdeploy.parts.add(airbagpart)
+
+airbag_solution.set_output_database(
+    abstat=2.0e-4, glstat=2.0e-4, matsum=2.0e-4, rcforc=2.0e-4, rbdout=2.0e-4, rwforc=2.0e-4
+)
+airbag_solution.create_database_binary(dt=5e-4, ieverp=1)
+airbag_solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Airbag/announcement.html b/version/0.2/examples/Airbag/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/Airbag/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/Airbag/index.html b/version/0.2/examples/Airbag/index.html new file mode 100644 index 000000000..913c076cc --- /dev/null +++ b/version/0.2/examples/Airbag/index.html @@ -0,0 +1,545 @@ + + + + + + + + + Airbag examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Airbag examples#

+

These examples show how to create Airbag model.

+
Airbag deploy example +

Airbag deploy example

+
Airbag deploy example
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Airbag/sg_execution_times.html b/version/0.2/examples/Airbag/sg_execution_times.html new file mode 100644 index 000000000..eb9285738 --- /dev/null +++ b/version/0.2/examples/Airbag/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:00.254 total execution time for examples_Airbag files:

+ + + + + + + +

Airbag deploy example (airbag_deploy.py)

00:00.254

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/EM/announcement.html b/version/0.2/examples/EM/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/EM/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/EM/em_railgun.html b/version/0.2/examples/EM/em_railgun.html new file mode 100644 index 000000000..ea6a2acc0 --- /dev/null +++ b/version/0.2/examples/EM/em_railgun.html @@ -0,0 +1,650 @@ + + + + + + + + + Railgun example — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Railgun example#

+

This example demonstrates how to create an EM Railgun input deck.

+

LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaem import (
+    DynaEM,
+    Circuit,
+    CircuitType,
+    SegmentSet,
+    NodeSet,
+    Curve,
+    SolidPart,
+    SolidFormulation,
+    EMContact,
+    BEMSOLVER,
+    FEMSOLVER,
+)
+from ansys.dyna.core.pre.dynamaterial import MatElastic, MatRigid, EMMATTYPE
+from em_railgun_data import *
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+em_solution = DynaSolution(hostname)
+fns = []
+path = examples.em_railgun + os.sep
+fns.append(path + "em_railgun.k")
+em_solution.open_files(fns)
+em_solution.set_termination(termination_time=3e-4)
+em_solution.create_database_binary(dt=5e-6)
+
+railgun = DynaEM()
+em_solution.add(railgun)
+
+railgun.analysis.set_timestep(timestep=5e-6)
+railgun.analysis.set_solver_bem(solver=BEMSOLVER.PCG)
+railgun.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3)
+
+circuit = Circuit(
+    circuit_type=CircuitType.IMPOSED_CURRENT_VS_TIME,
+    loadcurve=Curve(x=[0, 8e-5, 2e-4, 4e-4, 6e-4, 1e-3], y=[0, 350, 450, 310, 230, 125], sfo=2e6),
+)
+circuit.set_current(
+    current=SegmentSet(cur), current_inlet=SegmentSet(inlet), current_outlet=SegmentSet(outlet)
+)
+railgun.add(circuit)
+
+matelastic = MatElastic(mass_density=2.64e-3, young_modulus=9.7e10, poisson_ratio=0.31)
+matelastic.set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=25)
+matrigid = MatRigid(
+    mass_density=2.64e-3,
+    young_modulus=9.7e10,
+    poisson_ratio=0.31,
+    center_of_mass_constraint=1,
+    translational_constraint=7,
+    rotational_constraint=7,
+)
+matrigid.set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=25)
+
+coil = SolidPart(1)
+coil.set_material(matelastic)
+coil.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)
+railgun.parts.add(coil)
+
+workpiece1 = SolidPart(2)
+workpiece1.set_material(matrigid)
+workpiece1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)
+railgun.parts.add(workpiece1)
+
+workpiece2 = SolidPart(3)
+workpiece2.set_material(matrigid)
+workpiece2.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)
+railgun.parts.add(workpiece2)
+
+railgun.boundaryconditions.create_spc(NodeSet(spc1), tx=False, ty=False, rz=False, death=0)
+railgun.boundaryconditions.create_spc(NodeSet(spc2), tx=False, ty=False, rz=False, death=0)
+
+contact = EMContact()
+railgun.contacts.add(contact)
+
+railgun.set_rogowsky_coil_to_output_current(SegmentSet(cur))
+
+em_solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/EM/index.html b/version/0.2/examples/EM/index.html new file mode 100644 index 000000000..4c5018238 --- /dev/null +++ b/version/0.2/examples/EM/index.html @@ -0,0 +1,545 @@ + + + + + + + + + EM examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

EM examples#

+

These examples show how to create electromagnetic model.

+
Railgun example +

Railgun example

+
Railgun example
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/EM/sg_execution_times.html b/version/0.2/examples/EM/sg_execution_times.html new file mode 100644 index 000000000..b6fc980c2 --- /dev/null +++ b/version/0.2/examples/EM/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:01.759 total execution time for examples_EM files:

+ + + + + + + +

Railgun example (em_railgun.py)

00:01.759

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Explicit/announcement.html b/version/0.2/examples/Explicit/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/Explicit/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/Explicit/belted_dummy.html b/version/0.2/examples/Explicit/belted_dummy.html new file mode 100644 index 000000000..fc217967e --- /dev/null +++ b/version/0.2/examples/Explicit/belted_dummy.html @@ -0,0 +1,693 @@ + + + + + + + + + Belted dummy example — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Belted dummy example#

+

This example show how to create an Belted dummy model with Pydyna-pre module.

+

LS-DYNA version : LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynamech import (
+    DynaMech,
+    Velocity,
+    Curve,
+    ShellPart,
+    DiscretePart,
+    NodeSet,
+    SegmentSet,
+    DRO,
+    Contact,
+    ContactSurface,
+    ContactCategory,
+    Motion,
+    Gravity,
+    GravityOption,
+)
+from ansys.dyna.core.pre.dynamaterial import (
+    MatRigid,
+    MatElastic,
+    MatSpringNonlinearElastic,
+    MatDamperViscous,
+    MatDamperNonlinearViscous,
+)
+from belted_dummy_data import *
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+dummy_solution = DynaSolution(hostname)
+fns = []
+path = examples.belted_dummy + os.sep
+fns.append(path + "belted_dummy.k")
+dummy_solution.open_files(fns)
+dummy_solution.set_termination(termination_time=0.12)
+dummy_solution.create_database_binary(dt=2.5e-3)
+
+dummy = DynaMech()
+dummy_solution.add(dummy)
+
+dummy.set_timestep(tssfac=0.8)
+dummy.set_init_velocity(Velocity(14.8, 0, 0))
+
+# Define material
+shellmatlist = []
+for i in range(15):
+    matrigid = MatRigid(
+        mass_density=rigidmats[i][0], young_modulus=rigidmats[i][1], poisson_ratio=0.3
+    )
+    shellmatlist.append(matrigid)
+
+for i in range(16, 23):
+    index = i - 16
+    matelastic = MatElastic(
+        mass_density=elasticmats[index][0], young_modulus=elasticmats[index][1], poisson_ratio=0.3
+    )
+    shellmatlist.append(matelastic)
+
+discmatlist = []
+for i in range(101, 143):
+    index = i - 101
+    mat = MatSpringNonlinearElastic(curve=Curve(x=curvedata[index][0], y=curvedata[index][1]))
+    discmatlist.append(mat)
+
+for i in range(143, 185):
+    index = i - 143
+    mat = MatDamperViscous(damping_constant=dampingconst[index])
+    discmatlist.append(mat)
+
+for i in range(185, 209):
+    index = i - 185
+    mat = MatDamperNonlinearViscous(
+        curve=Curve(x=curvedata[lcidlist[index]][0], y=curvedata[lcidlist[index]][1])
+    )
+    discmatlist.append(mat)
+
+# Set part properties
+for i in range(1, 23):
+    part = ShellPart(i)
+    part.set_material(shellmatlist[i - 1])
+    part.set_thickness(shellsec[i - 1][0])
+    part.set_integration_points(shellsec[i - 1][1])
+    if i in range(1, 16):
+        part.set_extra_nodes(NodeSet(extra_nodes[i - 1]))
+    dummy.parts.add(part)
+
+for i in range(101, 209):
+    index = i - 101
+    part = DiscretePart(i)
+    part.set_material(discmatlist[index])
+    part.set_displacement_option(displacement_option=DRO.DESCRIBES_TORSIONAL_SPRING)
+    dummy.parts.add(part)
+
+# Contact
+fslist = [0.62, 0.62, 0.62, 0.8, 1, 0.8, 0.88, 0.88, 0.16, 0.88, 0]
+for i in range(11):
+    contact = Contact(category=ContactCategory.SURFACE_TO_SURFACE_CONTACT)
+    contact.set_friction_coefficient(static=fslist[i])
+    surf1 = ContactSurface(SegmentSet(segments[2 * i]))
+    surf2 = ContactSurface(SegmentSet(segments[2 * i + 1]))
+    contact.set_slave_surface(surf1)
+    contact.set_master_surface(surf2)
+    dummy.contacts.add(contact)
+
+# Constraint
+for i in range(14):
+    dummy.constraints.create_joint_spherical(nodes=jointlist[i])
+
+# Boundary condition
+dummy.boundaryconditions.create_imposed_motion(
+    NodeSet(motion_nodes),
+    Curve(x=motion_curve_x, y=motion_curve_y),
+    motion=Motion.ACCELERATION,
+    scalefactor=-1,
+)
+
+# Load
+g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0.152], y=[9.81, 9.81]))
+dummy.add(g)
+
+dummy_solution.create_database_binary(dt=2.5e-3)
+dummy_solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Explicit/index.html b/version/0.2/examples/Explicit/index.html new file mode 100644 index 000000000..0b2a50379 --- /dev/null +++ b/version/0.2/examples/Explicit/index.html @@ -0,0 +1,545 @@ + + + + + + + + + Explicit examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Explicit examples#

+

These examples show how to create Explicit model.

+
Belted dummy example +

Belted dummy example

+
Belted dummy example
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Explicit/sg_execution_times.html b/version/0.2/examples/Explicit/sg_execution_times.html new file mode 100644 index 000000000..8f20ce70a --- /dev/null +++ b/version/0.2/examples/Explicit/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:01.917 total execution time for examples_Explicit files:

+ + + + + + + +

Belted dummy example (belted_dummy.py)

00:01.917

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/announcement.html b/version/0.2/examples/ICFD/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/ICFD/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/ICFD/icfd_cylinderflow.html b/version/0.2/examples/ICFD/icfd_cylinderflow.html new file mode 100644 index 000000000..29ea81bdf --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_cylinderflow.html @@ -0,0 +1,652 @@ + + + + + + + + + Cylinder flow example — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Cylinder flow example#

+

This example demonstrates how to create a simple ICFD cylinder flow input deck.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    ICFDAnalysis,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+icfd_solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.cylinder_flow + os.sep
+fns.append(path + "cylinder_flow.k")
+icfd_solution.open_files(fns)
+# Set total time of simulation
+icfd_solution.set_termination(termination_time=100)
+
+icfd = DynaICFD()
+icfd_solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep()
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=3)
+icfd.parts.add(part_wall)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3, 4])
+icfd.add(meshvol)
+
+icfd_solution.create_database_binary(dt=1)
+icfd_solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_dam_break.html b/version/0.2/examples/ICFD/icfd_dam_break.html new file mode 100644 index 000000000..1db8ccd43 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_dam_break.html @@ -0,0 +1,652 @@ + + + + + + + + + Dam break — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Dam break#

+

This example shows a simple free surface example using the ICFD solver. A column of water collapses under the load of gravity.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    Gravity,
+    GravityOption,
+    Compressible
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.dam_break + os.sep
+fns.append(path + "dam_break.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=50)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep()
+icfd.add(icfdanalysis)
+
+# define model
+mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001)
+mat2 = MatICFD(flag=Compressible.VACUUM)
+
+part1 = ICFDPart(1)
+part1.set_material(mat1)
+part1.set_free_slip()
+icfd.parts.add(part1)
+
+part2 = ICFDPart(2)
+part2.set_material(mat2)
+part2.set_free_slip()
+icfd.parts.add(part2)
+
+part3 = ICFDPart(3)
+part3.set_material(mat1)
+icfd.parts.add(part3)
+
+g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[9.81, 9.81]))
+icfd.add(g)
+
+partvol1 = ICFDVolumePart(surfaces=[1, 3])
+partvol1.set_material(mat1)
+icfd.parts.add(partvol1)
+
+partvol2 = ICFDVolumePart(surfaces=[2, 3])
+partvol2.set_material(mat2)
+icfd.parts.add(partvol2)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2])
+meshvol.set_fluid_interfaces([3])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=0.2)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_dem_coupling.html b/version/0.2/examples/ICFD/icfd_dem_coupling.html new file mode 100644 index 000000000..a1a591e70 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_dem_coupling.html @@ -0,0 +1,668 @@ + + + + + + + + + DEM Coupling — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

DEM Coupling#

+

This example shows how to couple the ICFD fluid solver with DEM particles.

+

LS-DYNA version : ls-dyna_smp_d_R101_winx64_ifort131.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    SolidPart,
+    SolidFormulation,
+    Curve,
+    Velocity,
+    Point,
+    ICFD_CouplingForm
+)
+from ansys.dyna.core.pre.dynadem import DEMAnalysis
+from ansys.dyna.core.pre.dynamaterial import MatRigidDiscrete
+from ansys.dyna.core.pre import examples
+
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.dem_coupling + os.sep
+fns.append(path + "dem_coupling.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=100)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfd.set_timestep(tssfac=0.8)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep(0.05)
+icfdanalysis.set_coupling_dem(formulation=ICFD_CouplingForm.FORCE_USING_FLUID_PRESSURE_GRADIENT)
+icfd.add(icfdanalysis)
+
+demanalysis = DEMAnalysis()
+demanalysis.set_des(normal_damping_coeff=0.9, tangential_damping_coeff=0.9, static_friction_coeff=0.3, rolling_friction_coeff=0.001)
+icfd.add(demanalysis)
+
+# define model
+mat = MatICFD(flow_density=2.0, dynamic_viscosity=0.01)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+icfd.set_initial(velocity=Velocity(1, 0, 0))
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3])
+meshvol.meshsize_box(size=0.05,min_point=Point(-1, -1, -1),max_point=Point(1, 1, 1))
+icfd.add(meshvol)
+
+#define rigid cylinder
+matrigid = MatRigidDiscrete(mass_density=1000,young_modulus=1e4)
+disc = SolidPart(101)
+disc.set_material(matrigid)
+disc.set_element_formulation(SolidFormulation.ONE_POINT_COROTATIONAL)
+icfd.parts.add(disc)
+
+solution.create_database_binary(dt=1.0)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_driven_cavity.html b/version/0.2/examples/ICFD/icfd_driven_cavity.html new file mode 100644 index 000000000..75879d932 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_driven_cavity.html @@ -0,0 +1,640 @@ + + + + + + + + + Driven cavity — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Driven cavity#

+

This example shows the universally famous driven cavity case tested with the second order steady solver and for Re=1000.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    ICFD_AnalysisType,
+    ICFD_MessageLevel,
+    ICFDDOF
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.driven_cavity + os.sep
+fns.append(path + "driven_cavity.k")
+solution.open_files(fns)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_type(analysis_type=ICFD_AnalysisType.STEADY_STATE_ANALYSIS)
+icfdanalysis.set_output(messagelevel=ICFD_MessageLevel.FULL_OUTPUT_INFORMATION,iteration_interval=250)
+icfdanalysis.set_steady_state(max_iteration=2500,momentum_tol_limit=1e-8,pressure_tol_limit=1e-8,velocity_relax_param=1,pressure_relax_param=1)
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1, dynamic_viscosity=0.001)
+
+part1 = ICFDPart(1)
+part1.set_material(mat)
+part1.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))
+icfd.parts.add(part1)
+
+part2 = ICFDPart(2)
+part2.set_material(mat)
+part2.set_non_slip()
+icfd.parts.add(part2)
+
+partvol = ICFDVolumePart(surfaces=[1, 2])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=250)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_free_convection_flow.html b/version/0.2/examples/ICFD/icfd_free_convection_flow.html new file mode 100644 index 000000000..61db742b8 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_free_convection_flow.html @@ -0,0 +1,658 @@ + + + + + + + + + Thermal flow — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Thermal flow#

+

This example shows a simple ICFD forced convection input deck with a coarse mesh.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    Gravity,
+    GravityOption
+
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.free_convection_flow + os.sep
+fns.append(path + "free_convection_flow.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=30)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep(0.01)
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=37.799999, dynamic_viscosity=1,heat_capacity = 0.7,thermal_conductivity=1.0,thermal_expansion_coefficient=1)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_non_slip()
+part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[1, 1]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_non_slip()
+part_outflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_non_slip()
+part_symmetric.compute_temperature()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.compute_temperature()
+icfd.parts.add(part_wall)
+
+icfd.set_initial()
+
+g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[1, 1]))
+icfd.add(g)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3,4])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=1)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_imposed_move.html b/version/0.2/examples/ICFD/icfd_imposed_move.html new file mode 100644 index 000000000..50f8c43ab --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_imposed_move.html @@ -0,0 +1,652 @@ + + + + + + + + + Imposed move — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Imposed move#

+

This example shows how to impose the displacements on the fluid nodes through the use of the ICFD_CONTROL_IMPOSED_MOVE keyword.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    Curve
+    )
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.imposed_move + os.sep
+fns.append(path + "imposed_move.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=40)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep(0.05)
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=3)
+part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"))
+icfd.parts.add(part_wall)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3, 4])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=0.5)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_internal_3d_flow.html b/version/0.2/examples/ICFD/icfd_internal_3d_flow.html new file mode 100644 index 000000000..b860512a5 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_internal_3d_flow.html @@ -0,0 +1,649 @@ + + + + + + + + + Internal 3D flow — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Internal 3D flow#

+

This example shows a simple 3D ICFD problem.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    ICFD_SurfRemeshMethod
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.internal_3d_flow + os.sep
+fns.append(path + "internal_3d_flow.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=10)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep(timestep=0.05)
+icfdanalysis.set_volume_mesh(mesh_growth_scale_factor=1.1)
+icfdanalysis.set_surface_mesh(remesh_method = ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING)
+icfd.add(icfdanalysis)
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+part_inflow.set_boundary_layer_symmetry_condition()
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+part_outflow.set_boundary_layer_symmetry_condition()
+part_outflow.compute_flux()
+icfd.parts.add(part_outflow)
+
+part_wall = ICFDPart(3)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.set_boundary_layer(2)
+icfd.parts.add(part_wall)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=1)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_mesh_adaptivity.html b/version/0.2/examples/ICFD/icfd_mesh_adaptivity.html new file mode 100644 index 000000000..a4829a9d2 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_mesh_adaptivity.html @@ -0,0 +1,655 @@ + + + + + + + + + Mesh Adaptivity — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Mesh Adaptivity#

+

This example shows a simple ICFD problem with adaptivity.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.mesh_adaptivity + os.sep
+fns.append(path + "mesh_adaptivity.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=40)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep()
+icfdanalysis.set_mesh_adaptivity(min_mesh_size=0.02,max_mesh_size=0.2,max_perceptual_error=2,num_iteration=10)
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=2)
+icfd.parts.add(part_wall)
+
+part_meshsize = ICFDPart(5)
+part_meshsize.set_material(mat)
+icfd.parts.add(part_meshsize)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3, 4])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=0.5)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_mesh_morphing.html b/version/0.2/examples/ICFD/icfd_mesh_morphing.html new file mode 100644 index 000000000..595e816b2 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_mesh_morphing.html @@ -0,0 +1,660 @@ + + + + + + + + + Mesh Morphing — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Mesh Morphing#

+

This example shows a simple ICFD problem with mesh morphing.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.mesh_morphing + os.sep
+fns.append(path + "mesh_morphing.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=40)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep(0.05)
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=2)
+part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"))
+icfd.parts.add(part_wall)
+
+part_meshmorph = ICFDPart(5)
+part_meshmorph.set_material(mat)
+icfd.parts.add(part_meshmorph)
+
+partvol1 = ICFDVolumePart(surfaces=[1, 2, 3, 5])
+partvol1.set_material(mat)
+icfd.parts.add(partvol1)
+partvol2 = ICFDVolumePart(surfaces=[5, 4])
+partvol2.set_material(mat)
+partvol2.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"))
+icfd.parts.add(partvol2)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3, 4])
+meshvol.set_fluid_interfaces([5])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=0.5)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_mesh_size.html b/version/0.2/examples/ICFD/icfd_mesh_size.html new file mode 100644 index 000000000..0760425e4 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_mesh_size.html @@ -0,0 +1,655 @@ + + + + + + + + + Mesh size — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Mesh size#

+

This example shows a simple ICFD input deck with a coarse mesh.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.mesh_size + os.sep
+fns.append(path + "mesh_size.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=50)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep()
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=2)
+icfd.parts.add(part_wall)
+
+part_meshsize = ICFDPart(5)
+part_meshsize.set_material(mat)
+icfd.parts.add(part_meshsize)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3, 4])
+meshvol.set_meshsize([5])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=1)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_plate_flow.html b/version/0.2/examples/ICFD/icfd_plate_flow.html new file mode 100644 index 000000000..616e77210 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_plate_flow.html @@ -0,0 +1,651 @@ + + + + + + + + + Plate flow — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Plate flow#

+

This example shows a simple ICFD input deck with a coarse mesh.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.plate_flow + os.sep
+fns.append(path + "plate_flow.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=100)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep()
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=2)
+icfd.parts.add(part_wall)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3])
+meshvol.embed_shell([4])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=1)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_sloshing.html b/version/0.2/examples/ICFD/icfd_sloshing.html new file mode 100644 index 000000000..c158a2293 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_sloshing.html @@ -0,0 +1,656 @@ + + + + + + + + + Sloshing — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Sloshing#

+

This example shows how to directly impose a displacement of the entire volume mesh through the use of the keyword ICFD_CONTROL_IMPOSED_MOVE.

+

LS-DYNA version : ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    Curve,
+    Gravity,
+    GravityOption,
+    Compressible
+    )
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.sloshing + os.sep
+fns.append(path + "sloshing.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=1)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep(0.02)
+icfd.add(icfdanalysis)
+
+# define model
+mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001)
+mat2 = MatICFD(flag=Compressible.VACUUM)
+
+part_bottom = ICFDPart(1)
+part_bottom.set_material(mat1)
+part_bottom.set_non_slip()
+icfd.parts.add(part_bottom)
+
+part_top = ICFDPart(2)
+part_top.set_material(mat2)
+part_top.set_non_slip()
+icfd.parts.add(part_top)
+
+part_mid = ICFDPart(3)
+part_mid.set_material(mat1)
+icfd.parts.add(part_mid)
+
+g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 10000], y=[9.81, 9.81]))
+icfd.add(g)
+
+icfd.set_imposed_move(vx=Curve(x=[0, 0.5, 0.52, 0.8, 0.82, 2.0], y=[1, 1, -1, -1, 0, 0]))
+
+partvol_bottom = ICFDVolumePart(surfaces=[1, 3])
+partvol_bottom.set_material(mat1)
+icfd.parts.add(partvol_bottom)
+
+partvol_top = ICFDVolumePart(surfaces=[2, 3])
+partvol_top.set_material(mat2)
+icfd.parts.add(partvol_top)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2])
+meshvol.set_fluid_interfaces([3])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=0.02)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_strong_fsi.html b/version/0.2/examples/ICFD/icfd_strong_fsi.html new file mode 100644 index 000000000..e784d0c44 --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_strong_fsi.html @@ -0,0 +1,676 @@ + + + + + + + + + Strong FSI — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Strong FSI#

+

This example shows a simple FSI coupling problem using strong FSI.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    ShellPart,
+    ShellFormulation,
+    PartSet,
+    Curve,
+    DOF,
+    Motion
+)
+from ansys.dyna.core.pre.dynamaterial import MatRigid
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.strong_fsi + os.sep
+fns.append(path + "strong_fsi.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=40)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep(0.05)
+icfdanalysis.set_fsi()
+icfd.add(icfdanalysis)
+
+icfd.implicitanalysis.set_initial_timestep_size(
+    size=10
+)
+icfd.implicitanalysis.set_dynamic(gamma=0.6, beta=0.4)
+icfd.implicitanalysis.set_solution(
+    iteration_limit=100, stiffness_reformation_limit=150
+)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.set_fsi()
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=3)
+icfd.parts.add(part_wall)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3, 4])
+icfd.add(meshvol)
+
+#define rigid cylinder
+matrigid = MatRigid(mass_density=1.2,young_modulus=2e11,poisson_ratio=0.3)
+cylinder = ShellPart(1)
+cylinder.set_material(matrigid)
+cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS)
+icfd.parts.add(cylinder)
+# Define boundary conddition
+icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY)
+
+solution.create_database_binary(dt=0.1)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_thermal_flow.html b/version/0.2/examples/ICFD/icfd_thermal_flow.html new file mode 100644 index 000000000..4daee3ade --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_thermal_flow.html @@ -0,0 +1,654 @@ + + + + + + + + + Thermal flow — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Thermal flow#

+

This example shows a simple ICFD forced convection input deck with a coarse mesh.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.thermal_flow + os.sep
+fns.append(path + "thermal_flow.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=100)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep()
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005,heat_capacity = 1000,thermal_conductivity=200)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[20, 20]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[80, 80]))
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=3)
+icfd.parts.add(part_wall)
+
+icfd.set_initial(temperature=10)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3,4])
+icfd.add(meshvol)
+
+solution.create_database_binary(dt=1)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/icfd_weak_fsi.html b/version/0.2/examples/ICFD/icfd_weak_fsi.html new file mode 100644 index 000000000..91450beeb --- /dev/null +++ b/version/0.2/examples/ICFD/icfd_weak_fsi.html @@ -0,0 +1,670 @@ + + + + + + + + + Weak FSI — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Weak FSI#

+

This example shows a simple FSI coupling problem using weak/loose/explicit FSI.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaicfd import (
+    DynaICFD,
+    MatICFD,
+    ICFDPart,
+    ICFDDOF,
+    Curve,
+    ICFDVolumePart,
+    MeshedVolume,
+    ICFDAnalysis,
+    ShellPart,
+    ShellFormulation,
+    PartSet,
+    Curve,
+    DOF,
+    Motion
+)
+from ansys.dyna.core.pre.dynamaterial import MatRigid
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.weak_fsi + os.sep
+fns.append(path + "weak_fsi.k")
+solution.open_files(fns)
+solution.set_termination(termination_time=40)
+icfd = DynaICFD()
+solution.add(icfd)
+
+icfd.set_timestep(tssfac=0.9,max_timestep=Curve(x=[0,10000],y=[0.05,0.05]))
+
+icfdanalysis = ICFDAnalysis()
+icfdanalysis.set_timestep(0.05)
+icfdanalysis.set_fsi()
+icfd.add(icfdanalysis)
+
+# define model
+mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)
+
+part_inflow = ICFDPart(1)
+part_inflow.set_material(mat)
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))
+part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_inflow)
+
+part_outflow = ICFDPart(2)
+part_outflow.set_material(mat)
+part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))
+icfd.parts.add(part_outflow)
+
+part_symmetric = ICFDPart(3)
+part_symmetric.set_material(mat)
+part_symmetric.set_free_slip()
+icfd.parts.add(part_symmetric)
+
+part_wall = ICFDPart(4)
+part_wall.set_material(mat)
+part_wall.set_non_slip()
+part_wall.set_fsi()
+part_wall.compute_drag_force()
+part_wall.set_boundary_layer(number=3)
+icfd.parts.add(part_wall)
+
+partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])
+partvol.set_material(mat)
+icfd.parts.add(partvol)
+# define the volume space that will be meshed,The boundaries
+# of the volume are the surfaces "spids"
+meshvol = MeshedVolume(surfaces=[1, 2, 3, 4])
+icfd.add(meshvol)
+
+#define rigid cylinder
+matrigid = MatRigid(mass_density=1000,young_modulus=2e11,poisson_ratio=0.3)
+cylinder = ShellPart(1)
+cylinder.set_material(matrigid)
+cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS)
+icfd.parts.add(cylinder)
+# Define boundary conddition
+icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY)
+
+solution.create_database_binary(dt=0.2)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/index.html b/version/0.2/examples/ICFD/index.html new file mode 100644 index 000000000..33f346de0 --- /dev/null +++ b/version/0.2/examples/ICFD/index.html @@ -0,0 +1,601 @@ + + + + + + + + + ICFD examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

ICFD examples#

+

These examples show how to create ICFD model.

+
Cylinder flow example +

Cylinder flow example

+
Cylinder flow example
+
Dam break +

Dam break

+
Dam break
+
DEM Coupling +

DEM Coupling

+
DEM Coupling
+
Driven cavity +

Driven cavity

+
Driven cavity
+
Thermal flow +

Thermal flow

+
Thermal flow
+
Imposed move +

Imposed move

+
Imposed move
+
Internal 3D flow +

Internal 3D flow

+
Internal 3D flow
+
Mesh Adaptivity +

Mesh Adaptivity

+
Mesh Adaptivity
+
Mesh Morphing +

Mesh Morphing

+
Mesh Morphing
+
Mesh size +

Mesh size

+
Mesh size
+
Plate flow +

Plate flow

+
Plate flow
+
Sloshing +

Sloshing

+
Sloshing
+
Strong FSI +

Strong FSI

+
Strong FSI
+
Thermal flow +

Thermal flow

+
Thermal flow
+
Weak FSI +

Weak FSI

+
Weak FSI
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ICFD/sg_execution_times.html b/version/0.2/examples/ICFD/sg_execution_times.html new file mode 100644 index 000000000..3673398cc --- /dev/null +++ b/version/0.2/examples/ICFD/sg_execution_times.html @@ -0,0 +1,574 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:26.288 total execution time for examples_ICFD files:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Sloshing (icfd_sloshing.py)

00:01.856

0.0 MB

Dam break (icfd_dam_break.py)

00:01.779

0.0 MB

Thermal flow (icfd_thermal_flow.py)

00:01.777

0.0 MB

Thermal flow (icfd_free_convection_flow.py)

00:01.773

0.0 MB

Weak FSI (icfd_weak_fsi.py)

00:01.773

0.0 MB

Mesh Adaptivity (icfd_mesh_adaptivity.py)

00:01.772

0.0 MB

DEM Coupling (icfd_dem_coupling.py)

00:01.770

0.0 MB

Driven cavity (icfd_driven_cavity.py)

00:01.768

0.0 MB

Internal 3D flow (icfd_internal_3d_flow.py)

00:01.762

0.0 MB

Plate flow (icfd_plate_flow.py)

00:01.762

0.0 MB

Mesh Morphing (icfd_mesh_morphing.py)

00:01.759

0.0 MB

Imposed move (icfd_imposed_move.py)

00:01.755

0.0 MB

Mesh size (icfd_mesh_size.py)

00:01.754

0.0 MB

Strong FSI (icfd_strong_fsi.py)

00:01.681

0.0 MB

Cylinder flow example (icfd_cylinderflow.py)

00:01.546

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/IGA/announcement.html b/version/0.2/examples/IGA/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/IGA/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/IGA/iga_sample.html b/version/0.2/examples/IGA/iga_sample.html new file mode 100644 index 000000000..ad330f072 --- /dev/null +++ b/version/0.2/examples/IGA/iga_sample.html @@ -0,0 +1,677 @@ + + + + + + + + + IGA example — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

IGA example#

+

This example demonstrates how to create an IGA input deck.

+

LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynaiga import (
+    DynaIGA,
+    IGAPart,
+    PartSet,
+    IGAFormulation,
+    SolidPart,
+    HourglassType,
+    SolidFormulation,
+    RigidwallCylinder,
+    Point,
+    Curve,
+    Direction,
+    ContactType,
+    ContactCategory,
+    OffsetType,
+)
+from ansys.dyna.core.pre.dynamech import *
+from ansys.dyna.core.pre.dynamaterial import MatPiecewiseLinearPlasticity, MatSpotweld
+from iga_sample_data import *
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+iga_solution = DynaSolution(hostname)
+fns = []
+path = examples.iga_sample + os.sep
+fns.append(path + "maino.k")
+fns.append(path + "rkrwelds.key")
+fns.append(path + "27parts.key")
+iga_solution.open_files(fns)
+
+iga_solution.set_termination(20)
+iga_solution.create_database_binary(dt=0.1)
+
+iga = DynaIGA()
+iga_solution.add(iga)
+
+iga.set_timestep(timestep_size_for_mass_scaled=-0.0004)
+
+# define material
+plastic = MatPiecewiseLinearPlasticity(
+    mass_density=7.830e-06, young_modulus=200, yield_stress=1.5, tangent_modulus=0.5
+)
+swmatlist = []
+for mat in materialdata:
+    spotweld = MatSpotweld(
+        mass_density=mat[0],
+        young_modulus=mat[1],
+        poisson_ratio=mat[2],
+        yield_stress=mat[3],
+        plastic_hardening_modulus=mat[4],
+        axial_force_resultant_at_failure=mat[5],
+        force_resultant_nrs_at_failure=mat[6],
+        force_resultant_nrt_at_failure=mat[7],
+    )
+    swmatlist.append(spotweld)
+
+for id in igaparts:
+    part = IGAPart(id)
+    part.set_material(plastic)
+    part.set_element_formulation(IGAFormulation.REISSNER_MINDLIN_FIBERS_AT_CONTROL_POINTS)
+    part.set_thickness(1.0)
+    iga.parts.add(part)
+
+for index in range(len(spotwelds)):
+    part = SolidPart(spotwelds[index])
+    if index != 1:
+        part.set_hourglass(type=HourglassType.BELYTSCHKO_BINDEMAN)
+    part.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)
+    part.set_material(swmatlist[index])
+    iga.parts.add(part)
+
+cylinder1 = RigidwallCylinder(
+    Point(2472.37, -600.000, 1270.98), Point(2472.37, -600.000, 2668.53), 100, 1000
+)
+iga.add(cylinder1)
+cylinder2 = RigidwallCylinder(
+    Point(3580.25, -600.000, 1261.37), Point(3580.25, -600.000, 3130.49), 100, 1000
+)
+iga.add(cylinder2)
+cylinder3 = RigidwallCylinder(
+    Point(3090.59, -955.35, 1299.42), Point(3090.59, -955.35, 2958.43), 100, 1000
+)
+cylinder3.set_motion(Curve(x=[0, 100], y=[20, 20]), dir=Direction(0, 1, 0))
+iga.add(cylinder3)
+
+# define contact
+selfcontact = Contact(type=ContactType.AUTOMATIC)
+selfcontact.set_friction_coefficient(static=0.2)
+surf1 = ContactSurface(PartSet(igaparts))
+selfcontact.set_slave_surface(surf1)
+iga.add(selfcontact)
+
+swcontact = Contact(
+    type=ContactType.TIED,
+    category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT,
+    offset=OffsetType.OFFSET,
+)
+spotweldsolid = ContactSurface(PartSet(spotwelds))
+spotweldsurface = ContactSurface(PartSet(igaparts))
+swcontact.set_slave_surface(spotweldsolid)
+swcontact.set_master_surface(spotweldsurface)
+iga.add(swcontact)
+
+iga_solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/IGA/index.html b/version/0.2/examples/IGA/index.html new file mode 100644 index 000000000..31072b2aa --- /dev/null +++ b/version/0.2/examples/IGA/index.html @@ -0,0 +1,545 @@ + + + + + + + + + IGA examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

IGA examples#

+

These examples show how to create Isogeometric Analysis model.

+
IGA example +

IGA example

+
IGA example
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/IGA/sg_execution_times.html b/version/0.2/examples/IGA/sg_execution_times.html new file mode 100644 index 000000000..5c0ecaa6a --- /dev/null +++ b/version/0.2/examples/IGA/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:03.085 total execution time for examples_IGA files:

+ + + + + + + +

IGA example (iga_sample.py)

00:03.085

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ISPH/announcement.html b/version/0.2/examples/ISPH/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/ISPH/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/ISPH/index.html b/version/0.2/examples/ISPH/index.html new file mode 100644 index 000000000..13870627e --- /dev/null +++ b/version/0.2/examples/ISPH/index.html @@ -0,0 +1,545 @@ + + + + + + + + + ISPH examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

ISPH examples#

+

These examples show how to create ISPH model.

+
Rigid test example +

Rigid test example

+
Rigid test example
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ISPH/rigidtest.html b/version/0.2/examples/ISPH/rigidtest.html new file mode 100644 index 000000000..3bc0f9466 --- /dev/null +++ b/version/0.2/examples/ISPH/rigidtest.html @@ -0,0 +1,691 @@ + + + + + + + + + Rigid test example — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Rigid test example#

+

This example show how to create an ISPH model with Pydyna-pre module.

+

LS-DYNA version : ls-dyna_mpp_d_R13.0_365-gf8a97bda2a_winx64_ifort190_msmpi.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynamaterial import (
+    MatRigid,
+    MatSPHIncompressibleFluid,
+    MatSPHIncompressibleStructure,
+)
+from ansys.dyna.core.pre.dynaisph import (
+    DynaISPH,
+    Box,
+    Point,
+    Curve,
+    PartSet,
+    ShellPart,
+    ShellFormulation,
+    ISPHStructPart,
+    ISPHFluidPart,
+    DOF,
+    Motion,
+    Gravity,
+    GravityOption,
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+isphsolution = DynaSolution(hostname)
+fns = []
+path = examples.isph_rigidtest + os.sep
+fns.append(path + "rigidtest.k")
+isphsolution.open_files(fns)
+
+isphsolution.set_termination(0.5)
+
+isphobj = DynaISPH()
+isphsolution.add(isphobj)
+
+isphobj.set_timestep(
+    tssfac=1, max_timestep=Curve(x=[0, 0.04, 0.05, 0.1, 100], y=[0.5, 0.5, 1, 1, 1])
+)
+isphobj.isphanalysis.set_box(Box(-750, 800, -800, 800, -100, 3000))
+
+platemat1 = MatRigid(
+    mass_density=1e-9,
+    young_modulus=10,
+    center_of_mass_constraint=1,
+    translational_constraint=5,
+    rotational_constraint=4,
+)
+platemat2 = MatRigid(
+    mass_density=1e-9,
+    young_modulus=10,
+    center_of_mass_constraint=1,
+    translational_constraint=7,
+    rotational_constraint=7,
+)
+# platemat3 = MatRigid(mass_density=1e-9,young_modulus=10)
+# matelastic = MatElastic(mass_density=1e-9,young_modulus=1)
+matsphfluid = MatSPHIncompressibleFluid(
+    mass_density=1e-9, dynamic_viscosity=1e-9, tension_coefficient1=1e6, tension_coefficient2=1000
+)
+matsphstruct = MatSPHIncompressibleStructure(mass_density=1e-9)
+
+sensorplane = ShellPart(1)
+sensorplane.set_material(platemat2)
+sensorplane.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)
+sensorplane.set_thickness(0.1)
+isphobj.parts.add(sensorplane)
+
+movingcube = ShellPart(7)
+movingcube.set_material(platemat1)
+movingcube.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)
+movingcube.set_thickness(0.1)
+isphobj.parts.add(movingcube)
+
+wallsmesh = ShellPart(8)
+wallsmesh.set_material(platemat2)
+wallsmesh.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)
+wallsmesh.set_thickness(0.1)
+isphobj.parts.add(wallsmesh)
+
+sphwall = ISPHStructPart(4, PartSet([8]), 12)
+sphwall.set_material(matsphstruct)
+sphwall.set_smoothing_length(1, 1, 1, 12)
+isphobj.parts.add(sphwall)
+
+sphcube = ISPHStructPart(5, PartSet([7]), 12)
+sphcube.set_material(matsphstruct)
+sphcube.set_smoothing_length(1, 1, 1, 12)
+isphobj.parts.add(sphcube)
+
+sphwater = ISPHFluidPart(6, Point(-588, -588, 9), Point(1176, 1176, 204), 98, 98, 17)
+sphwater.set_material(matsphfluid)
+sphwater.set_smoothing_length(1, 1, 1, 12)
+sphwater.create_massflow_plane(PartSet([1]))
+isphobj.parts.add(sphwater)
+
+# Constraint
+isphobj.constraints.merge_two_rigid_bodies(7, 1)
+
+# Define boundary conddition
+isphobj.boundaryconditions.create_imposed_motion(
+    PartSet([7]),
+    Curve(x=[0, 0.1, 0.11, 20], y=[3000, 3000, 0, 0]),
+    dof=DOF.X_TRANSLATIONAL,
+    motion=Motion.VELOCITY,
+)
+isphobj.boundaryconditions.create_imposed_motion(
+    PartSet([7]),
+    Curve(x=[0, 0.1, 0.11, 20], y=[500, 500, 500, 500]),
+    dof=DOF.Z_ROTATIONAL,
+    motion=Motion.VELOCITY,
+    scalefactor=0.01,
+)
+
+# Load
+g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 100], y=[9810, 9810]))
+isphobj.add(g)
+
+isphsolution.set_output_database(glstat=0.001, sphmassflow=0.001)
+isphsolution.create_database_binary(dt=0.01)
+isphsolution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/ISPH/sg_execution_times.html b/version/0.2/examples/ISPH/sg_execution_times.html new file mode 100644 index 000000000..d36d0ee09 --- /dev/null +++ b/version/0.2/examples/ISPH/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:01.734 total execution time for examples_ISPH files:

+ + + + + + + +

Rigid test example (rigidtest.py)

00:01.734

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Implicit/announcement.html b/version/0.2/examples/Implicit/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/Implicit/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/Implicit/camry_rc.html b/version/0.2/examples/Implicit/camry_rc.html new file mode 100644 index 000000000..fbea76b62 --- /dev/null +++ b/version/0.2/examples/Implicit/camry_rc.html @@ -0,0 +1,826 @@ + + + + + + + + + Crash example — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Crash example#

+

This example demonstrates how to create a simple crash input deck.

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynamech import (
+    DynaMech,
+    Curve,
+    BeamPart,
+    ShellPart,
+    NodeSet,
+    PartSet,
+    TimestepCtrol,
+    Contact,
+    ContactType,
+    ContactCategory,
+    ContactSurface,
+    DOF,
+    OffsetType,
+)
+from ansys.dyna.core.pre.dynamaterial import (
+    MatNull,
+    MatRigid,
+    MatSpotweld,
+    MatModifiedPiecewiseLinearPlasticity,
+    MatPiecewiseLinearPlasticity,
+)
+from camry_rc_data import *
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+camry_solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.camry_rc + os.sep
+fns.append(path + "Camry_RC_main.k")
+fns.append(path + "501_RIG_BAR_roof_crush_platen5.key")
+fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7.k")
+fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7_nodes.k")
+fns.append(path + "roof_welds.k")
+fns.append(path + "weld7.k")
+fns.append(path + "xtra_sw.k")
+camry_solution.open_files(fns)
+
+# global setting
+camry_solution.set_termination(10)
+camry_solution.create_database_binary(dt=0.001)
+
+camry = DynaMech()
+camry_solution.add(camry)
+
+camry.implicitanalysis.set_timestep(
+    control_flag=TimestepCtrol.AUTOMATICALLY_ADJUST_TIMESTEP_SIZE,
+    Optimum_equilibrium_iteration_count=511,
+)
+camry.implicitanalysis.set_dynamic(gamma=0.6, beta=0.38)
+camry.implicitanalysis.set_eigenvalue()
+camry.implicitanalysis.set_solution(
+    stiffness_reformation_limit=55, absolute_convergence_tolerance=-100
+)
+
+# create material
+matnull = MatNull(mass_density=6e-11)
+matrigid = MatRigid(mass_density=7.890e-09, young_modulus=2.100e05, poisson_ratio=0.3)
+matplaten = MatRigid(
+    mass_density=7.80e-09,
+    young_modulus=2.00e05,
+    poisson_ratio=0.3,
+    center_of_mass_constraint=1,
+    rotational_constraint=7,
+)
+spotweldharden2100 = MatSpotweld(
+    mass_density=7.850e-09,
+    young_modulus=2.100e05,
+    poisson_ratio=0.3,
+    yield_stress=510,
+    plastic_hardening_modulus=2100,
+)
+spotweldharden2200 = MatSpotweld(
+    mass_density=7.850e-09,
+    young_modulus=2.100e05,
+    poisson_ratio=0.3,
+    yield_stress=510,
+    plastic_hardening_modulus=2200,
+)
+windowshield = MatModifiedPiecewiseLinearPlasticity(
+    mass_density=2.355e-09,
+    young_modulus=7.000e04,
+    poisson_ratio=0.22,
+    yield_stress=30,
+    tangent_modulus=1400,
+    plastic_strain_to_failure=0.015,
+    integration_points_number=1,
+)
+windowsrear = MatModifiedPiecewiseLinearPlasticity(
+    mass_density=2.425e-09,
+    young_modulus=7.000e04,
+    poisson_ratio=0.22,
+    yield_stress=30,
+    tangent_modulus=1400,
+    plastic_strain_to_failure=0.015,
+    integration_points_number=1,
+)
+plastic300 = MatPiecewiseLinearPlasticity(
+    mass_density=7.890e-09, young_modulus=210000, yield_stress=300, tangent_modulus=5000
+)
+plastic250 = MatPiecewiseLinearPlasticity(
+    mass_density=7.890e-09, young_modulus=210000, yield_stress=250, tangent_modulus=5000
+)
+plastic360 = MatPiecewiseLinearPlasticity(
+    mass_density=7.890e-09, young_modulus=210000, yield_stress=360, tangent_modulus=5000
+)
+plastic180 = MatPiecewiseLinearPlasticity(
+    mass_density=7.850e-09, young_modulus=210000, yield_stress=180, tangent_modulus=5000
+)
+plastic450 = MatPiecewiseLinearPlasticity(
+    mass_density=7.850e-09, young_modulus=210000, yield_stress=450, tangent_modulus=5000
+)
+plastic1300 = MatPiecewiseLinearPlasticity(
+    mass_density=7.850e-09, young_modulus=210000, yield_stress=1300, tangent_modulus=5000
+)
+plastic400 = MatPiecewiseLinearPlasticity(
+    mass_density=7.890e-09, young_modulus=210000, yield_stress=400, tangent_modulus=5000
+)
+plastic500 = MatPiecewiseLinearPlasticity(
+    mass_density=7.890e-09, young_modulus=210000, yield_stress=500, tangent_modulus=5000
+)
+plastic675 = MatPiecewiseLinearPlasticity(
+    mass_density=7.850e-09, young_modulus=210000, yield_stress=675, tangent_modulus=5000
+)
+plastic310 = MatPiecewiseLinearPlasticity(
+    mass_density=2.255e-09, young_modulus=70000, yield_stress=310, tangent_modulus=5000
+)
+plastic220 = MatPiecewiseLinearPlasticity(
+    mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=5000
+)
+plastic220_410 = MatPiecewiseLinearPlasticity(
+    mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=410
+)
+
+# set model
+for bpart in beamparts:
+    part = BeamPart(bpart[0])
+    if part.id in [50000002]:
+        part.set_material(spotweldharden2200)
+    else:
+        part.set_material(spotweldharden2100)
+    part.set_element_formulation(bpart[1])
+    part.set_diameter(bpart[2])
+    camry.parts.add(part)
+
+for spart in shellparts:
+    part = ShellPart(spart[0])
+    if part.id in [1463, 1464]:
+        part.set_material(matnull)
+    elif part.id in [417, 419, 530, 532, 585, 586, 587, 588]:
+        part.set_material(matrigid)
+    elif part.id in [50000001]:
+        part.set_material(matplaten)
+    elif part.id in [290]:
+        part.set_material(windowshield)
+    elif part.id in [291]:
+        part.set_material(windowsrear)
+    elif part.id in partswithmat300:
+        part.set_material(plastic300)
+    elif part.id in partswithmat250:
+        part.set_material(plastic250)
+    elif part.id in partswithmat360:
+        part.set_material(plastic360)
+    elif part.id in partswithmat180:
+        part.set_material(plastic180)
+    elif part.id in partswithmat450:
+        part.set_material(plastic450)
+    elif part.id in partswithmat400:
+        part.set_material(plastic400)
+    elif part.id in partswithmat500:
+        part.set_material(plastic500)
+    elif part.id in [57]:
+        part.set_material(plastic1300)
+    elif part.id in [286]:
+        part.set_material(plastic675)
+    elif part.id in [5000000]:
+        part.set_material(plastic310)
+    elif part.id in [5000006]:
+        part.set_material(plastic220)
+    elif part.id in [5000007]:
+        part.set_material(plastic220_410)
+    else:
+        pass
+    part.set_element_formulation(spart[1])
+    part.set_thickness(spart[2])
+    camry.parts.add(part)
+
+# define constrained
+for sw in spotweld:
+    camry.constraints.create_spotweld(nodeid1=sw[0], nodeid2=sw[1])
+
+for cnrb in cnrbs:
+    camry.constraints.create_cnrb(nodeset=NodeSet(cnrb))
+
+# define contact
+selfcontact = Contact(type=ContactType.AUTOMATIC)
+selfcontact.set_mortar()
+selfcontact.set_friction_coefficient(static=0.2)
+surf1 = ContactSurface(PartSet(vehicle))
+selfcontact.set_slave_surface(surf1)
+camry.contacts.add(selfcontact)
+
+platebiw = Contact(type=ContactType.AUTOMATIC, category=ContactCategory.SURFACE_TO_SURFACE_CONTACT)
+platebiw.set_mortar()
+platebiw.set_friction_coefficient(static=0.2, dynamic=0.2)
+surf1 = ContactSurface(PartSet(biw))
+surf2 = ContactSurface(PartSet(platen))
+platebiw.set_slave_surface(surf1)
+platebiw.set_master_surface(surf2)
+camry.contacts.add(platebiw)
+
+swcontact = Contact(
+    type=ContactType.TIED,
+    category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT,
+    offset=OffsetType.CONSTRAINED_OFFSET,
+)
+spotweldbeam = ContactSurface(PartSet(spotweldbeams))
+spotweldbeam.set_contact_thickness(thickness=-0.9)
+spotweldsurface = ContactSurface(PartSet(spotweldsurfaces))
+spotweldsurface.set_contact_thickness(thickness=-0.9)
+swcontact.set_slave_surface(spotweldbeam)
+swcontact.set_master_surface(spotweldsurface)
+camry.contacts.add(swcontact)
+
+# define boundary
+camry.boundaryconditions.create_spc(NodeSet(spc))
+
+crv = Curve(
+    x=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9.77, 100],
+    y=[0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 127, 127],
+)
+platen = PartSet([50000001])
+camry.boundaryconditions.create_imposed_motion(
+    platen, crv, dof=DOF.X_TRANSLATIONAL, scalefactor=-0.0802216
+)
+camry.boundaryconditions.create_imposed_motion(
+    platen, crv, dof=DOF.Y_TRANSLATIONAL, scalefactor=-0.0802216
+)
+camry.boundaryconditions.create_imposed_motion(
+    platen, crv, dof=DOF.Z_TRANSLATIONAL, scalefactor=-0.0802216
+)
+
+camry_solution.set_output_database(
+    elout=0.0001,
+    glstat=0.0001,
+    matsum=0.0001,
+    nodout=0.0001,
+    rbdout=0.0001,
+    rcforc=0.0001,
+    secforc=0.0001,
+)
+
+camry_solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Implicit/index.html b/version/0.2/examples/Implicit/index.html new file mode 100644 index 000000000..1f299b454 --- /dev/null +++ b/version/0.2/examples/Implicit/index.html @@ -0,0 +1,545 @@ + + + + + + + + + Implicit examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Implicit examples#

+

These examples show how to create implicit model.

+
Crash example +

Crash example

+
Crash example
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Implicit/sg_execution_times.html b/version/0.2/examples/Implicit/sg_execution_times.html new file mode 100644 index 000000000..a97015ce9 --- /dev/null +++ b/version/0.2/examples/Implicit/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:17.233 total execution time for examples_Implicit files:

+ + + + + + + +

Crash example (camry_rc.py)

00:17.233

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/NVH/announcement.html b/version/0.2/examples/NVH/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/NVH/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/NVH/frf_plate_damping.html b/version/0.2/examples/NVH/frf_plate_damping.html new file mode 100644 index 000000000..97416a6fb --- /dev/null +++ b/version/0.2/examples/NVH/frf_plate_damping.html @@ -0,0 +1,631 @@ + + + + + + + + + FRF for a rectangular plate — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

FRF for a rectangular plate#

+

This example shows how to setup the keywords for FRF computation.

+

LS-DYNA version : ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynamaterial import MatElastic
+from ansys.dyna.core.pre.dynanvh import (
+    DynaNVH,
+    FrequencyDomain,
+    ExcitationDOF,
+    Curve,
+    NodeSet,
+    ShellPart,
+    ShellFormulation,
+    ResponseDOF,
+    ResponseType,
+)
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+solution = DynaSolution(hostname)
+fns = []
+path = examples.nvh_frf_plate_damping + os.sep
+fns.append(path + "frf_plate_damping.k")
+solution.open_files(fns)
+
+nvhobj = DynaNVH()
+solution.add(nvhobj)
+
+nvhobj.implicitanalysis.set_initial_timestep_size(1.0)
+nvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100)
+nvhobj.implicitanalysis.set_solution(solution_method=1)
+
+fd = FrequencyDomain()
+crv = Curve(
+    x=[1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 200],
+    y=[0, 0, 0.0045, 0.00713, 0.00386, 0.00328, 0.0034, 0.00624, 7.2e-4, 8.3e-4, 0, 0],
+)
+fd.set_frequency_response_function(
+    excitation_input_set=NodeSet([131]),
+    excitation_input_dof=ExcitationDOF.Z,
+    max_natural_frequency=2000,
+    modal_damping_coefficient_curve_type=1,
+    modal_damping_coefficient_curve=crv,
+    response_output_set=NodeSet([131, 651]),
+    response_output_dof=ResponseDOF.Z,
+    response_output_type=ResponseType.BASE_ACCELERATION,
+    frf_output_min_frequency=1,
+    frf_output_max_frequency=400,
+    frf_output_num_frequency=400,
+)
+nvhobj.add(fd)
+
+matelastic = MatElastic(mass_density=7870, young_modulus=2.07e11, poisson_ratio=0.292)
+
+boxshell = ShellPart(1)
+boxshell.set_material(matelastic)
+boxshell.set_element_formulation(ShellFormulation.SR_HUGHES_LIU)
+boxshell.set_thickness(0.002)
+boxshell.set_shear_factor(0.833)
+boxshell.set_printout(3)
+nvhobj.parts.add(boxshell)
+
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/NVH/index.html b/version/0.2/examples/NVH/index.html new file mode 100644 index 000000000..d78d66209 --- /dev/null +++ b/version/0.2/examples/NVH/index.html @@ -0,0 +1,545 @@ + + + + + + + + + NVH examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + + + + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/NVH/sg_execution_times.html b/version/0.2/examples/NVH/sg_execution_times.html new file mode 100644 index 000000000..baaa9633e --- /dev/null +++ b/version/0.2/examples/NVH/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:00.993 total execution time for examples_NVH files:

+ + + + + + + +

FRF for a rectangular plate (frf_plate_damping.py)

00:00.993

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/SALE/announcement.html b/version/0.2/examples/SALE/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/SALE/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/SALE/index.html b/version/0.2/examples/SALE/index.html new file mode 100644 index 000000000..ae046ba06 --- /dev/null +++ b/version/0.2/examples/SALE/index.html @@ -0,0 +1,545 @@ + + + + + + + + + SALE examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

SALE examples#

+

These examples show how to create SALE model.

+
EFP Concrete Target +

EFP Concrete Target

+
EFP Concrete Target
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/SALE/sale_efp.html b/version/0.2/examples/SALE/sale_efp.html new file mode 100644 index 000000000..e3a00eb41 --- /dev/null +++ b/version/0.2/examples/SALE/sale_efp.html @@ -0,0 +1,656 @@ + + + + + + + + + EFP Concrete Target — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

EFP Concrete Target#

+

This example demonstrates how to create a SALE input deck.

+

LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynasale import (
+    DynaSALE,
+    ControlPoint,
+    AdvectionMethod,
+    StructuredMesh,
+    FillDirection,
+    Point,
+)
+from ansys.dyna.core.pre import dynamaterial as matDB
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+
+efp_solution = DynaSolution(hostname)
+# Import the initial mesh data(nodes and elements)
+fns = []
+path = examples.sale_efp + os.sep
+fns.append(path + "efpcase.k")
+efp_solution.open_files(fns)
+
+# set termination
+efp_solution.set_termination(280)
+
+efp = DynaSALE()
+efp_solution.add(efp)
+
+# set post result ouput interval
+efp.set_output_interval(5.0)
+
+# set analysis type
+efp.set_analysis_type(method=AdvectionMethod.VAN_LEER_WITH_HIS)
+
+# define mesh
+control_points_x = [
+    ControlPoint(number=1, position=0, ratio=1),
+    ControlPoint(number=11, position=-2.5, ratio=0.5),
+    ControlPoint(number=21, position=0, ratio=0.5),
+    ControlPoint(number=31, position=0, ratio=1),
+]
+
+control_points_y = [
+    ControlPoint(number=1, position=0, ratio=1),
+    ControlPoint(number=11, position=-2.5, ratio=0.5),
+    ControlPoint(number=21, position=0, ratio=0.5),
+    ControlPoint(number=31, position=0, ratio=1),
+]
+
+control_points_z = [
+    ControlPoint(number=1, position=0, ratio=0.5),
+    ControlPoint(number=269, position=11, ratio=0.25),
+    ControlPoint(number=309, position=21, ratio=0.25),
+    ControlPoint(number=339, position=0, ratio=5),
+]
+
+mesh = StructuredMesh(control_points_x, control_points_y, control_points_z)
+efp.add(mesh)
+
+# fill material
+vacuum = matDB.Vacuum()
+mesh.fill(vacuum)
+air = matDB.Air()
+mesh.fill(air, geometry_type="ALL", reference_pressure=1.01325e-6)
+he = matDB.HighExplosive()
+mesh.fill(
+    he,
+    geometry_type="PART",
+    define_geometry_parameters=[23],
+    inout=FillDirection.OUTSIDE_THE_GEOMETRY,
+)
+liner = matDB.Liner()
+mesh.fill(
+    liner,
+    geometry_type="PART",
+    define_geometry_parameters=[22],
+    inout=FillDirection.OUTSIDE_THE_GEOMETRY,
+)
+
+# Set the initial conditions
+mesh.initial_detonation(Point(0, 0, 19.33))
+
+# set outut datebase
+efp_solution.set_output_database(matsum=0.2, glstat=0.2)
+
+# save file on server end
+efp_solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/SALE/sg_execution_times.html b/version/0.2/examples/SALE/sg_execution_times.html new file mode 100644 index 000000000..84d444b51 --- /dev/null +++ b/version/0.2/examples/SALE/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:01.887 total execution time for examples_SALE files:

+ + + + + + + +

EFP Concrete Target (sale_efp.py)

00:01.887

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Thermal/announcement.html b/version/0.2/examples/Thermal/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/Thermal/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/Thermal/index.html b/version/0.2/examples/Thermal/index.html new file mode 100644 index 000000000..8a4e91cfd --- /dev/null +++ b/version/0.2/examples/Thermal/index.html @@ -0,0 +1,545 @@ + + + + + + + + + Thermal examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Thermal examples#

+

These examples show how to create thermal model.

+
Thermal stress example +

Thermal stress example

+
Thermal stress example
+
+
+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Thermal/sg_execution_times.html b/version/0.2/examples/Thermal/sg_execution_times.html new file mode 100644 index 000000000..384bb9251 --- /dev/null +++ b/version/0.2/examples/Thermal/sg_execution_times.html @@ -0,0 +1,518 @@ + + + + + + + + + Computation times — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Computation times#

+

00:01.692 total execution time for examples_Thermal files:

+ + + + + + + +

Thermal stress example (thermal_stress.py)

00:01.692

0.0 MB

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/Thermal/thermal_stress.html b/version/0.2/examples/Thermal/thermal_stress.html new file mode 100644 index 000000000..b81578263 --- /dev/null +++ b/version/0.2/examples/Thermal/thermal_stress.html @@ -0,0 +1,623 @@ + + + + + + + + + Thermal stress example — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +
+

Thermal stress example#

+

This example show how to create a thermal stress model with Pydyna-pre module.

+

LS-DYNA version : ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe

+
length: 1
+
+
+
+

+
+
import os
+import sys
+
+
+from ansys.dyna.core.pre.dynasolution import DynaSolution
+from ansys.dyna.core.pre.dynamech import (
+    DynaMech,
+    ThermalAnalysis,
+    ThermalAnalysisType,
+    SolidPart,
+    SolidFormulation,
+    NodeSet
+)
+from ansys.dyna.core.pre.dynamaterial import MatElasticPlasticThermal
+from ansys.dyna.core.pre import examples
+
+hostname = "localhost"
+if len(sys.argv) > 1:
+    hostname = sys.argv[1]
+solution = DynaSolution(hostname)
+fns = []
+path = examples.thermal_stress + os.sep
+fns.append(path + "thermal_stress.k")
+solution.open_files(fns)
+
+solution.set_termination(3.0)
+
+ts = DynaMech()
+solution.add(ts)
+
+tanalysis = ThermalAnalysis()
+tanalysis.set_timestep(initial_timestep=0.1)
+tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT)
+ts.add(tanalysis)
+
+ts.set_timestep(timestep_size_for_mass_scaled=0.01)
+
+mat = MatElasticPlasticThermal(
+    mass_density=1.0,
+    temperatures=(0,10,20,30,40,50),
+    young_modulus=(1e10,1e10,1e10,1e10,1e10,1e10),
+    poisson_ratio=(0.3,0.3,0.3,0.3,0.3,0.3),
+    thermal_expansion=(0,2e-6,4e-6,6e-6,8e-6,1e-5),
+    yield_stress = (1e20,1e20,1e20,1e20,1e20,1e20)
+)
+mat.set_thermal_isotropic(density=1,generation_rate_multiplier=10,specific_heat=1,conductivity=1)
+
+slab = SolidPart(1)
+slab.set_material(mat)
+slab.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)
+ts.parts.add(slab)
+
+# Define initial conddition
+for i in range(1,9):
+    ts.initialconditions.create_temperature(NodeSet([i]),temperature=10)
+
+solution.set_output_database(glstat=0.03)
+solution.create_database_binary(dt=0.01)
+solution.save_file()
+
+
+

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

+ +

Gallery generated by Sphinx-Gallery

+
+ + +
+ + + +
+ + + +
+ +
+ + +
+ + + + + +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/examples/announcement.html b/version/0.2/examples/announcement.html new file mode 100644 index 000000000..28fdf7038 --- /dev/null +++ b/version/0.2/examples/announcement.html @@ -0,0 +1,4 @@ +

+ You are not viewing the most recent version of this documentation. + The latest stable release is 0.4 +

diff --git a/version/0.2/examples/index.html b/version/0.2/examples/index.html new file mode 100644 index 000000000..20e3a5c52 --- /dev/null +++ b/version/0.2/examples/index.html @@ -0,0 +1,713 @@ + + + + + + + + + Examples — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

Examples#

+

Here are a series of examples using LS-DYNA with the ansys-dyna-core library.

+
+

Airbag examples#

+

These examples show how to create Airbag model.

+
Airbag deploy example +

Airbag deploy example

+
Airbag deploy example
+
+
+

EM examples#

+

These examples show how to create electromagnetic model.

+
Railgun example +

Railgun example

+
Railgun example
+
+
+

Explicit examples#

+

These examples show how to create Explicit model.

+
Belted dummy example +

Belted dummy example

+
Belted dummy example
+
+
+

ICFD examples#

+

These examples show how to create ICFD model.

+
Cylinder flow example +

Cylinder flow example

+
Cylinder flow example
+
Dam break +

Dam break

+
Dam break
+
DEM Coupling +

DEM Coupling

+
DEM Coupling
+
Driven cavity +

Driven cavity

+
Driven cavity
+
Thermal flow +

Thermal flow

+
Thermal flow
+
Imposed move +

Imposed move

+
Imposed move
+
Internal 3D flow +

Internal 3D flow

+
Internal 3D flow
+
Mesh Adaptivity +

Mesh Adaptivity

+
Mesh Adaptivity
+
Mesh Morphing +

Mesh Morphing

+
Mesh Morphing
+
Mesh size +

Mesh size

+
Mesh size
+
Plate flow +

Plate flow

+
Plate flow
+
Sloshing +

Sloshing

+
Sloshing
+
Strong FSI +

Strong FSI

+
Strong FSI
+
Thermal flow +

Thermal flow

+
Thermal flow
+
Weak FSI +

Weak FSI

+
Weak FSI
+
+
+

IGA examples#

+

These examples show how to create Isogeometric Analysis model.

+
IGA example +

IGA example

+
IGA example
+
+
+

ISPH examples#

+

These examples show how to create ISPH model.

+
Rigid test example +

Rigid test example

+
Rigid test example
+
+
+

Implicit examples#

+

These examples show how to create implicit model.

+
Crash example +

Crash example

+
Crash example
+
+
+

NVH examples#

+

These examples show how to create NVH model.

+
FRF for a rectangular plate +

FRF for a rectangular plate

+
FRF for a rectangular plate
+
+
+

SALE examples#

+

These examples show how to create SALE model.

+
EFP Concrete Target +

EFP Concrete Target

+
EFP Concrete Target
+
+
+

Thermal examples#

+

These examples show how to create thermal model.

+
Thermal stress example +

Thermal stress example

+
Thermal stress example
+
+
+

Gallery generated by Sphinx-Gallery

+
+
+ + +
+ + + +
+ + + + + + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/genindex.html b/version/0.2/genindex.html new file mode 100644 index 000000000..e2f0944b2 --- /dev/null +++ b/version/0.2/genindex.html @@ -0,0 +1,498 @@ + + + + + + + + Index — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ + +

Index

+ +
+ +
+ + +
+ + + +
+ + + +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/index.html b/version/0.2/index.html new file mode 100644 index 000000000..fc93fc929 --- /dev/null +++ b/version/0.2/index.html @@ -0,0 +1,726 @@ + + + + + + + + + PyDyna documentation 0.2.1 — PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+ +
+

PyDyna documentation 0.2.1#

+
+

PyDyna#

+

PyDyna is a pythonic dyna package that aims to provide user a more convenient and complete way to +build up ansys-dyna input deck, submit to solver and finally post processing their results.

+
+

Project Overview#

+

There are 3 related packages here, pre and solver are all under the ansys/dyna/ directory, +while pyDPF is used for post-processing.

+

pre contains highly abstracted APIs for setting up a LS-DYNA input deck, so far, +it includes DynaMech, DynaIGA, DynaICFD, DynaSALE, DynaEM, DynaAirbag and so on.

+

solver contains code for interfacing with the LS-DYNA solver directly. +As LS-DYNA is primarily a batch solver with very limited interactive +capabilities, the code here is similarly limited. The target +use case is that LS-DYNA will be running in a container environment +such as Docker or Kubernetes. The code here then allows for pushing +input files to the container, starting LS-DYNA and monitoring its +progress, and retrieving results files.

+

The Data Processing Framework (DPF) is designed to provide numerical +simulation users/engineers with a toolbox for accessing and +transforming simulation data. DPF can access data from solver result +files as well as several neutral formats (csv, hdf5, vtk, +etc.). Various operators are available allowing the manipulation and +the transformation of this data.

+

The Python ansys-dpf-post package provides a simplified Python +interface to DPF, thus enabling rapid postprocessing without ever +leaving a Python environment.

+

Visit the DPF-Post Documentation for a +detailed description of the package.

+
+
+

Installation#

+

PyDyna has three installation modes: user, developer, and offline.

+
+

Install in user mode#

+

Before installing PyDyna in user mode, make sure you have the latest version of +pip with:

+
python -m pip install -U pip
+
+
+

Then, install PyDyna with:

+
python -m pip install ansys-dyna-core
+
+
+
+

Caution

+

PyDyna is currently hosted in a private PyPI repository. You must provide the index +URL to the private PyPI repository:

+
    +
  • Index URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/

  • +
+

If access to this package registry is needed, email pyansys.support@ansys.com +to request access. The PyAnsys team can provide you a read-only token to be inserted in ${PRIVATE_PYPI_ACCESS_TOKEN}. +Once you have it, run the following command:

+
pip install ansys-dyna-core --index-url=https://${PRIVATE_PYPI_ACCESS_TOKEN}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/
+
+
+
+
+
+

Install in developer mode#

+

Installing PyDyna in developer mode allows you to modify the source and enhance it.

+
+

Note

+

Before contributing to the project, ensure that you are thoroughly familiar +with the PyAnsys Developer’s Guide.

+
+

Start by cloning the repository

+
git clone https://github.com/pyansys/pyDyna
+
+
+

and copy the required files.

+
+
+

Install in offline mode#

+

If you lack an internet connection on your installation machine (or you do not have access to the +private Ansys PyPI packages repository), you should install PyDyna by downloading the wheelhouse +archive from the Releases Page for your +corresponding machine architecture.

+

Each wheelhouse archive contains all the Python wheels necessary to install PyDyna from scratch on Windows +and Linux, from Python 3.7 to 3.10. You can install this on an isolated system with a fresh Python +installation or on a virtual environment.

+

For example, on Linux with Python 3.7, unzip the wheelhouse archive and install it with:

+
unzip ansys-dyna-core-v0.2.1-wheelhouse-Linux-3.7.zip wheelhouse
+pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed
+
+
+

If you are on Windows with Python 3.9, unzip the corresponding wheelhouse to a wheelhouse directory +and install using the preceding command.

+

Consider installing using a virtual environment.

+
+
+
+

Documentation#

+

For comprehesive information on PyDyna, see the latest release +documentation.

+

On the PyDyna Issues page, you can create +issues to submit questions, report bugs, and request new features. To reach +the PyAnsys support team, email pyansys.support@ansys.com.

+
+
+

Usage#

+

Here is a basic pre-processing example:

+
from ansys.dyna.core.pre.dynasolution import *
+from ansys.dyna.core.pre.dynaiga import *
+from ansys.dyna.core.pre.dynamaterial import *
+hostname = "localhost"
+iga_solution = DynaSolution(hostname)
+fns = []
+path = os.getcwd() + os.sep + "input" + os.sep + "iga_sample" + os.sep
+fns.append(path + "maino.k")
+fns.append(path + "rkrwelds.key")
+fns.append(path + "27parts.key")
+iga_solution.open_files(fns)
+iga_solution.set_termination(20)
+iga_solution.create_database_binary(dt=0.1)
+iga = DynaIGA()
+iga_solution.add(iga)
+iga.set_timestep(timestep_size_for_mass_scaled=-0.0004)
+...
+selfcontact = Contact(type=ContactType.AUTOMATIC)
+selfcontact.set_friction_coefficient(static=0.2)
+surf1=ContactSurface(PartSet(igaparts))
+selfcontact.set_slave_surface(surf1)
+iga_solution.save_file()
+
+
+

Here is a basic solving example:

+
>>> import ansys.dyna.core.solver as solver
+>>> dyna=solver.DynaSovler(hostname,port)           # connect to the container
+>>> dyna.push("input.k")                            # push an input file
+>>> dyna.start(4)                                   # start 4 ranks of mppdyna
+>>> dyna.run("i=input.k memory=10m ncycle=20000")   # begin execution
+
+
+

Here is a basic post-processing example:

+

lsdyna::d3plot::stress_von_mises

+
from ansys.dpf import core as dpf
+
+ds = dpf.DataSources()
+ds.set_result_file_path(r'./d3plot', 'd3plot')
+
+resultOp = dpf.Operator("lsdyna::d3plot::stress_von_mises")
+resultOp.inputs.data_sources(ds)
+# set the time
+resultOp.inputs.time_scoping.connect([3])
+result = resultOp.outputs.stress_von_mises()
+
+
+
+
+

License#

+

Distributed under the MIT license. See LICENSE in the root directory +of the repository for details.

+
+
+
+
+
+ + +
+ + + +
+ + + + + + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/objects.inv b/version/0.2/objects.inv new file mode 100644 index 000000000..903d0a50f Binary files /dev/null and b/version/0.2/objects.inv differ diff --git a/version/0.2/search.html b/version/0.2/search.html new file mode 100644 index 000000000..ae33f4c16 --- /dev/null +++ b/version/0.2/search.html @@ -0,0 +1,522 @@ + + + + + + + Search - PyDyna + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + + + +
+
+ + + + + + + +
+ + + + +
+
+ + +
+
+ + + +
+
+ +
+ + + + + + + + + + + + +
+
+ + +
+
+ +
+ +
+ + +
+

Search

+ + + + + + + + +
+
+ + + + + +
+ + + +
+ +
+ + +
+ +
+ +
+ +
+ +
+ +
+ + +
+
+ +
+ +
+
+
+ + + + + + + +
+
+ + \ No newline at end of file diff --git a/version/0.2/searchindex.js b/version/0.2/searchindex.js new file mode 100644 index 000000000..0905dbecf --- /dev/null +++ b/version/0.2/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"docnames": ["API/_autosummary/ansys.dyna.core.pre.dynabase", "API/_autosummary/ansys.dyna.core.pre.dynadem", "API/_autosummary/ansys.dyna.core.pre.dynaem", "API/_autosummary/ansys.dyna.core.pre.dynaicfd", "API/_autosummary/ansys.dyna.core.pre.dynaiga", "API/_autosummary/ansys.dyna.core.pre.dynaisph", "API/_autosummary/ansys.dyna.core.pre.dynamaterial", "API/_autosummary/ansys.dyna.core.pre.dynamech", "API/_autosummary/ansys.dyna.core.pre.dynanvh", "API/_autosummary/ansys.dyna.core.pre.dynasale", "API/_autosummary/ansys.dyna.core.pre.dynasolution", "API/_autosummary/ansys.dyna.core.solver.dynasolver", "API/index", "API/pre", "API/solver", "Resources/Contributing", "Resources/Getting_Started", "Resources/User_Guide", "Resources/pydyna_post", "Resources/pydyna_pre", "Resources/pydyna_solver", "_templates/autosummary/base", "_templates/autosummary/class", "_templates/custom-class-template", "_templates/custom-module-template", "examples/Airbag/airbag_deploy", "examples/Airbag/index", "examples/Airbag/sg_execution_times", "examples/EM/em_railgun", "examples/EM/index", "examples/EM/sg_execution_times", "examples/Explicit/belted_dummy", "examples/Explicit/index", "examples/Explicit/sg_execution_times", "examples/ICFD/icfd_cylinderflow", "examples/ICFD/icfd_dam_break", "examples/ICFD/icfd_dem_coupling", "examples/ICFD/icfd_driven_cavity", "examples/ICFD/icfd_free_convection_flow", "examples/ICFD/icfd_imposed_move", "examples/ICFD/icfd_internal_3d_flow", "examples/ICFD/icfd_mesh_adaptivity", "examples/ICFD/icfd_mesh_morphing", "examples/ICFD/icfd_mesh_size", "examples/ICFD/icfd_plate_flow", "examples/ICFD/icfd_sloshing", "examples/ICFD/icfd_strong_fsi", "examples/ICFD/icfd_thermal_flow", "examples/ICFD/icfd_weak_fsi", "examples/ICFD/index", "examples/ICFD/sg_execution_times", "examples/IGA/iga_sample", "examples/IGA/index", "examples/IGA/sg_execution_times", "examples/ISPH/index", "examples/ISPH/rigidtest", "examples/ISPH/sg_execution_times", "examples/Implicit/camry_rc", "examples/Implicit/index", "examples/Implicit/sg_execution_times", "examples/NVH/frf_plate_damping", "examples/NVH/index", "examples/NVH/sg_execution_times", "examples/SALE/index", "examples/SALE/sale_efp", "examples/SALE/sg_execution_times", "examples/Thermal/index", "examples/Thermal/sg_execution_times", "examples/Thermal/thermal_stress", "examples/index", "index"], "filenames": ["API/_autosummary/ansys.dyna.core.pre.dynabase.rst", "API/_autosummary/ansys.dyna.core.pre.dynadem.rst", "API/_autosummary/ansys.dyna.core.pre.dynaem.rst", "API/_autosummary/ansys.dyna.core.pre.dynaicfd.rst", "API/_autosummary/ansys.dyna.core.pre.dynaiga.rst", "API/_autosummary/ansys.dyna.core.pre.dynaisph.rst", "API/_autosummary/ansys.dyna.core.pre.dynamaterial.rst", "API/_autosummary/ansys.dyna.core.pre.dynamech.rst", "API/_autosummary/ansys.dyna.core.pre.dynanvh.rst", "API/_autosummary/ansys.dyna.core.pre.dynasale.rst", "API/_autosummary/ansys.dyna.core.pre.dynasolution.rst", "API/_autosummary/ansys.dyna.core.solver.dynasolver.rst", "API/index.rst", "API/pre.rst", "API/solver.rst", "Resources/Contributing.rst", "Resources/Getting_Started.rst", "Resources/User_Guide.rst", "Resources/pydyna_post.rst", "Resources/pydyna_pre.rst", "Resources/pydyna_solver.rst", "_templates/autosummary/base.rst", "_templates/autosummary/class.rst", "_templates/custom-class-template.rst", "_templates/custom-module-template.rst", "examples/Airbag/airbag_deploy.rst", "examples/Airbag/index.rst", "examples/Airbag/sg_execution_times.rst", "examples/EM/em_railgun.rst", "examples/EM/index.rst", "examples/EM/sg_execution_times.rst", "examples/Explicit/belted_dummy.rst", "examples/Explicit/index.rst", "examples/Explicit/sg_execution_times.rst", "examples/ICFD/icfd_cylinderflow.rst", "examples/ICFD/icfd_dam_break.rst", "examples/ICFD/icfd_dem_coupling.rst", "examples/ICFD/icfd_driven_cavity.rst", "examples/ICFD/icfd_free_convection_flow.rst", "examples/ICFD/icfd_imposed_move.rst", "examples/ICFD/icfd_internal_3d_flow.rst", "examples/ICFD/icfd_mesh_adaptivity.rst", "examples/ICFD/icfd_mesh_morphing.rst", "examples/ICFD/icfd_mesh_size.rst", "examples/ICFD/icfd_plate_flow.rst", "examples/ICFD/icfd_sloshing.rst", "examples/ICFD/icfd_strong_fsi.rst", "examples/ICFD/icfd_thermal_flow.rst", "examples/ICFD/icfd_weak_fsi.rst", "examples/ICFD/index.rst", "examples/ICFD/sg_execution_times.rst", "examples/IGA/iga_sample.rst", "examples/IGA/index.rst", "examples/IGA/sg_execution_times.rst", "examples/ISPH/index.rst", "examples/ISPH/rigidtest.rst", "examples/ISPH/sg_execution_times.rst", "examples/Implicit/camry_rc.rst", "examples/Implicit/index.rst", "examples/Implicit/sg_execution_times.rst", "examples/NVH/frf_plate_damping.rst", "examples/NVH/index.rst", "examples/NVH/sg_execution_times.rst", "examples/SALE/index.rst", "examples/SALE/sale_efp.rst", "examples/SALE/sg_execution_times.rst", "examples/Thermal/index.rst", "examples/Thermal/sg_execution_times.rst", "examples/Thermal/thermal_stress.rst", "examples/index.rst", "index.rst"], "titles": ["dynabase", "dynadem", "dynaem", "dynaicfd", "dynaiga", "dynaisph", "dynamaterial", "dynamech", "dynanvh", "dynasale", "dynasolution", "dynasolver", "API reference", "PyDyna-pre APIs", "PyDyna-solver APIs", "Contributing", "Getting started", "User guide", "Using PyDPF-post for LS-DYNA", "PyDyna-pre", "PyDyna-solver", "<no title>", "<no title>", "<no title>", "<no title>", "Airbag deploy example", "Airbag examples", "Computation times", "Railgun example", "EM examples", "Computation times", "Belted dummy example", "Explicit examples", "Computation times", "Cylinder flow example", "Dam break", "DEM Coupling", "Driven cavity", "Thermal flow", "Imposed move", "Internal 3D flow", "Mesh Adaptivity", "Mesh Morphing", "Mesh size", "Plate flow", "Sloshing", "Strong FSI", "Thermal flow", "Weak FSI", "ICFD examples", "Computation times", "IGA example", "IGA examples", "Computation times", "ISPH examples", "Rigid test example", "Computation times", "Crash example", "Implicit examples", "Computation times", "FRF for a rectangular plate", "NVH examples", "Computation times", "SALE examples", "EFP Concrete Target", "Computation times", "Thermal examples", "Computation times", "Thermal stress example", "Examples", "PyDyna documentation 0.2.1"], "terms": {"thi": [12, 16, 17, 19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "section": 12, "describ": 12, "pydyna": [12, 15, 16, 17, 25, 31, 55, 68], "core": [12, 16, 18, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 69, 70], "class": [12, 13, 14, 20], "method": [12, 20, 64], "function": [12, 20], "l": [12, 17, 19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 60, 64, 68, 69, 70], "dyna": [12, 16, 17, 19, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 69, 70], "app": [12, 13, 14], "modul": [12, 13, 14, 24, 25, 31, 55, 68], "us": [12, 16, 17, 19, 20, 35, 39, 45, 46, 48, 69, 70], "search": 12, "featur": [12, 70], "click": [12, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "link": [12, 20], "view": 12, "document": [12, 17, 20], "pre": [12, 17, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "dynabas": 12, "dynasolut": [12, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "dynamech": [12, 25, 31, 51, 57, 68, 70], "dynaem": [12, 28, 70], "dynaicfd": [12, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70], "dynaiga": [12, 51, 70], "dynaisph": [12, 55], "dynamateri": [12, 25, 28, 31, 36, 46, 48, 51, 55, 57, 60, 64, 68, 70], "dynanvh": [12, 60], "dynasal": [12, 64, 70], "dynadem": [12, 36], "solver": [12, 17, 28, 35, 36, 37, 70], "dynasolv": [12, 20], "The": [13, 14, 16, 17, 19, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 70], "includ": [13, 14, 70], "overal": 15, "guidanc": 15, "pyansi": [15, 16, 20, 70], "repositori": [15, 16, 70], "appear": 15, "topic": 15, "develop": [15, 16], "": [15, 18, 70], "guid": [15, 70], "ensur": [15, 70], "you": [15, 16, 70], "ar": [15, 16, 17, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 69, 70], "thoroughli": [15, 70], "familiar": [15, 70], "all": [15, 17, 64, 70], "guidelin": 15, "best": 15, "practic": 15, "befor": [15, 70], "attempt": 15, "packag": [16, 17, 25, 70], "i": [16, 17, 20, 25, 31, 68, 70], "yet": 16, "avail": [16, 17, 70], "public": 16, "pypi": [16, 70], "can": [16, 17, 70], "still": 16, "pip": [16, 19, 70], "from": [16, 17, 18, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "our": 16, "privat": [16, 70], "follow": [16, 70], "window": [16, 70], "set": [16, 18, 19, 25, 31, 34, 57, 64, 70], "pyansys_pypi_private_pat": 16, "redact": 16, "index_url": 16, "http": [16, 70], "pkg": [16, 70], "dev": [16, 70], "azur": [16, 70], "com": [16, 70], "_packag": [16, 70], "simpl": [16, 34, 35, 38, 40, 41, 42, 43, 44, 46, 47, 48, 57, 70], "python": [16, 17, 19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "m": [16, 70], "ansi": [16, 17, 18, 19, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 69, 70], "index": [16, 31, 51, 70], "url": [16, 70], "And": 16, "run": [16, 17, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "linux": [16, 70], "export": 16, "email": [16, 70], "your": [16, 19, 70], "friendli": 16, "team": [16, 70], "member": 16, "send": 16, "u": [16, 18, 70], "messag": 16, "via": 16, "git": [16, 70], "If": [16, 70], "have": [16, 70], "want": 16, "bleed": 16, "edg": 16, "version": [16, 19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 60, 64, 68, 70], "github": [16, 70], "main": 16, "need": [16, 19, 70], "log": 16, "local": 16, "organ": 16, "altern": 16, "modifi": [16, 70], "do": [16, 70], "clone": [16, 70], "mode": [16, 19], "cd": [16, 19], "e": 16, "note": 16, "flag": [16, 35, 45], "which": 16, "denot": 16, "make": [16, 19, 70], "chang": 16, "them": 16, "reflect": 16, "There": [17, 70], "3": [17, 18, 19, 20, 25, 28, 31, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 57, 60, 68, 70], "relat": [17, 70], "here": [17, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 69, 70], "under": [17, 35, 70], "directori": [17, 19, 70], "provid": [17, 19, 70], "interfac": [17, 70], "creat": [17, 19, 25, 26, 28, 29, 31, 32, 34, 49, 51, 52, 54, 55, 57, 58, 61, 63, 64, 66, 68, 69, 70], "input": [17, 18, 19, 20, 25, 28, 34, 38, 43, 44, 47, 51, 57, 64, 70], "deck": [17, 28, 34, 38, 43, 44, 47, 51, 57, 64, 70], "contain": [17, 20, 70], "code": [17, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "directli": [17, 45, 70], "As": [17, 70], "primarili": [17, 70], "batch": [17, 70], "veri": [17, 70], "limit": [17, 70], "interact": [17, 70], "capabl": [17, 70], "similarli": [17, 70], "target": [17, 63, 65, 69, 70], "case": [17, 37, 70], "environ": [17, 19, 70], "docker": [17, 70], "kubernet": [17, 70], "allow": [17, 70], "push": [17, 20, 70], "file": [17, 19, 20, 27, 30, 33, 50, 53, 56, 59, 62, 64, 65, 67, 70], "start": [17, 20, 70], "monitor": [17, 70], "its": [17, 70], "progress": [17, 70], "retriev": [17, 70], "result": [17, 18, 19, 64, 70], "data": [17, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 57, 64, 70], "process": [17, 70], "framework": [17, 19, 70], "dpf": [17, 18, 70], "design": [17, 70], "numer": [17, 70], "simul": [17, 19, 34, 70], "engin": [17, 70], "toolbox": [17, 70], "access": [17, 70], "transform": [17, 70], "well": [17, 70], "sever": [17, 70], "neutral": [17, 70], "format": [17, 70], "csv": [17, 70], "hdf5": [17, 70], "vtk": [17, 70], "etc": [17, 70], "variou": [17, 70], "oper": [17, 70], "manipul": [17, 70], "post": [17, 64, 70], "simplifi": [17, 70], "thu": [17, 70], "enabl": [17, 70], "rapid": [17, 70], "postprocess": [17, 70], "without": [17, 70], "ever": [17, 70], "leav": [17, 70], "visit": [17, 70], "detail": [17, 70], "descript": [17, 70], "d3plot": [18, 70], "lsdyna": [18, 70], "meshes_provid": 18, "import": [18, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "d": [18, 70], "datasourc": [18, 70], "set_result_file_path": [18, 70], "r": [18, 19, 70], "regular": 18, "mesh": [18, 19, 34, 35, 36, 37, 38, 39, 40, 44, 45, 46, 47, 48, 49, 50, 57, 64, 69], "meshop": 18, "data_sourc": [18, 70], "connect": [18, 19, 20, 25, 70], "output": [18, 19, 25, 70], "get_mesh": 18, "adapt": [18, 49, 50, 69], "timescop": 18, "scope": 18, "id": [18, 51, 57], "list": 18, "rang": [18, 31, 51, 68], "1": [18, 19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "21": [18, 64], "time_scop": [18, 70], "time": [18, 19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "coord": 18, "field": 18, "displac": [18, 39, 45], "timefreqsupportprovid": 18, "result_time_freq_support": 18, "time_freq_support": 18, "result_info_provid": 18, "resultinfoop": 18, "result_info": 18, "eng_k": 18, "resultop": [18, 70], "global_kinetic_energi": 18, "global_internal_energi": 18, "global_total_energi": 18, "global_veloc": 18, "node_initial_coordin": 18, "node_coordin": 18, "v": 18, "node_veloc": 18, "A": [18, 35], "node_acceler": 18, "node_temperatur": 18, "node_heat_flux": 18, "node_mass_sc": 18, "node_temperature_divide_tim": 18, "node_residual_forc": 18, "node_residual_mo": 18, "node_penetr": 18, "node_relative_penetr": 18, "node_contact_energy_dens": 18, "stress": [18, 66, 67, 69], "stress_von_mis": [18, 70], "effective_plastic_strain": 18, "epel": 18, "strain": 18, "strain_von_mis": 18, "history_var": 18, "thick": [18, 57], "element_dependent_var_1": 18, "element_dependent_var_2": 18, "mx": 18, "my": 18, "mxy": 18, "qx": 18, "qy": 18, "nx": 18, "ny": 18, "nxy": 18, "axial_forc": 18, "s_shear_result": 18, "t_shear_result": 18, "s_bending_mo": 18, "t_bending_mo": 18, "torsional_result": 18, "axial_stress": 18, "rs_shear_stress": 18, "tr_shear_stress": 18, "axial_plastic_strain": 18, "axial_strain": 18, "binout": 18, "op": 18, "glstat": [18, 25, 55, 57, 64, 68], "llsdyna": 18, "matsum": [18, 25, 57, 64], "rcforc": [18, 25, 57], "stressop": 18, "glstat_op": 18, "get": 18, "correpond": 18, "compon": 18, "field0": 18, "get_field": 18, "0": [18, 25, 27, 28, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 53, 55, 56, 57, 59, 60, 62, 64, 65, 67, 68], "field1": 18, "nvh": 18, "d3ssd": 18, "d3spcm": 18, "d3psd": 18, "d3rm": 18, "d3zcf": 18, "same": [18, 19], "moddynout": 18, "f": [18, 70], "2": [18, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 57, 60, 64], "4": [18, 20, 25, 28, 34, 38, 39, 41, 42, 43, 44, 46, 47, 48, 51, 55, 57, 60, 70], "5": [18, 19, 25, 28, 39, 41, 42, 43, 45, 46, 48, 51, 55, 57, 64, 68], "6": [18, 25, 28, 39, 42, 46, 48, 51, 55, 57, 60, 64, 68], "7": [18, 19, 25, 28, 38, 51, 55, 57, 60, 70], "8": [18, 19, 31, 36, 37, 45, 55, 57, 60], "9": [18, 19, 25, 28, 31, 35, 36, 45, 48, 55, 57, 60, 68, 70], "10": [18, 19, 39, 40, 41, 42, 46, 47, 48, 55, 57, 60, 68, 70], "disop": 18, "moddynout_forc": 18, "moddynout_acceler": 18, "moddynout_veloc": 18, "moddynout_disp": 18, "abil": 19, "keyword": [19, 39, 45, 60], "inputdeck": 19, "through": [19, 39, 45], "grpc": 19, "cli": 19, "tool": 19, "interpret": 19, "virtual": [19, 70], "subdirectori": 19, "activ": 19, "command": [19, 70], "script": [19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "sourc": [19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "bin": 19, "doc": 19, "exampl": [19, 20, 27, 30, 33, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 53, 56, 59, 60, 64, 67, 70], "flake8": 19, "licens": 19, "go": 19, "pythonxx": 19, "accord": 19, "Then": [19, 70], "txt": 19, "so": [19, 70], "far": [19, 70], "sure": [19, 70], "like": 19, "below": 19, "c": 19, "python38": 19, "ex": [19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 60, 64, 68], "kwserver": [19, 25], "py": [19, 25, 27, 28, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 53, 55, 56, 57, 59, 60, 62, 64, 65, 67, 68], "kwprocess_pb2": 19, "kwprocess_pb2_grpc": 19, "lib": [19, 25], "keywordread": 19, "cp38": 19, "pyd": 19, "cp39": 19, "shell": [19, 25], "kwgrpc": 19, "listen": 19, "localhost": [19, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "50051": 19, "see": [19, 20, 70], "some": 19, "basic": [19, 20, 70], "more": [19, 20, 70], "ad": 19, "later": 19, "sale_efp": [19, 64, 65], "2022": 19, "07": [19, 25], "05": [19, 36, 39, 40, 42, 46, 48, 55], "08": [19, 25], "19": [19, 64], "42": [19, 51], "sale": [19, 64], "efpcas": [19, 64], "k": [19, 20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "upload": [19, 25], "43": [19, 51], "setup": [19, 60], "analysi": [19, 28, 52, 64, 69], "materi": [19, 25, 31, 51, 57, 64], "air": [19, 64], "he": [19, 64], "liner": [19, 64], "vacuum": [19, 35, 45, 64], "fill": [19, 64], "locat": 19, "high": 19, "explos": 19, "deton": 19, "defin": [19, 25, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 64, 68], "At": 19, "correspond": [19, 70], "inform": [19, 70], "print": 19, "side": 19, "load": [19, 31, 35, 38, 45, 55], "model": [19, 25, 26, 29, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 52, 54, 55, 57, 58, 61, 63, 66, 68, 69], "database_sal": 19, "termin": [19, 25, 64], "db": [19, 25], "binari": [19, 25], "control_al": 19, "eos_linear_polynomi": 19, "mat_nul": 19, "ale_structured_multi": 19, "material_group": 19, "mat_high_explosive_burn": 19, "eos_jwl": 19, "mat_johnson_cook": 19, "eos_gruneisen": 19, "mat_vacuum": 19, "ale_structured_mesh_control_point": 19, "ale_structured_mesh": 19, "ale_structured_mesh_volume_fil": 19, "initial_deton": [19, 64], "databas": 19, "matsumcr": 19, "glstatcreat": 19, "save": [19, 64], "successfulli": 19, "after": 19, "lastwritetim": 19, "length": [19, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "name": [19, 21], "2436058": 19, "submit": [19, 70], "quick": 20, "preview": 20, "how": [20, 25, 26, 28, 29, 31, 32, 34, 36, 39, 45, 49, 51, 52, 54, 55, 57, 58, 60, 61, 63, 64, 66, 68, 69], "look": 20, "For": [20, 70], "top": 20, "page": [20, 70], "hostnam": [20, 25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "port": [20, 70], "5000": [20, 57], "dynasovl": [20, 70], "an": [20, 25, 28, 31, 51, 55, 70], "rank": [20, 70], "mppdyna": [20, 70], "memori": [20, 70], "10m": [20, 70], "ncycl": [20, 70], "20000": [20, 70], "begin": [20, 70], "execut": [20, 27, 30, 33, 50, 53, 56, 59, 62, 65, 67, 70], "escap": [21, 22, 23, 24], "underlin": [21, 22, 23, 24], "fullnam": [22, 23, 24], "block": 24, "rubric": 24, "item": 24, "endfor": 24, "endif": 24, "endblock": 24, "download": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "full": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "show": [25, 26, 29, 31, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 52, 54, 55, 58, 60, 61, 63, 66, 68, 69], "dyna_smp_d_r13": [25, 28, 31, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 60], "0_365": [25, 28, 31, 45, 51, 55, 64, 68], "gf8a97bda2a_winx64_ifort190": [25, 28, 31, 45, 51, 64, 68], "2023": 25, "03": [25, 53, 68], "40": [25, 39, 41, 42, 46, 48, 68], "50": [25, 35, 43, 68], "opt": 25, "hostedtoolcach": 25, "16": [25, 31], "x64": 25, "python3": 25, "site": 25, "airbag_deploi": [25, 27], "server": [25, 64], "curv": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60], "rigid": [25, 36, 46, 48, 54, 56, 69], "51": 25, "fabric": 25, "control": 25, "accuraci": 25, "bulk": 25, "viscos": 25, "energi": 25, "hourglass": 25, "contact": [25, 28, 31, 51, 57, 70], "rigidwal": 25, "planar": 25, "o": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "sy": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "partset": [25, 46, 48, 51, 55, 57, 70], "point": [25, 36, 51, 55, 64], "rigidwallplanar": 25, "contactsurfac": [25, 31, 51, 57, 70], "contactcategori": [25, 31, 51, 57], "shellpart": [25, 31, 46, 48, 55, 57, 60], "shellformul": [25, 46, 48, 55, 60], "matrigid": [25, 28, 31, 36, 46, 48, 55, 57], "matfabr": 25, "len": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "argv": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "airbag_solut": 25, "fn": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "path": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "sep": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "append": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "open_fil": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "set_termin": [25, 28, 31, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 64, 68, 70], "airbagdeploi": 25, "add": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "heat_capacity_at_constant_volum": 25, "736e3": 25, "heat_capacity_at_constant_pressur": 25, "43e3": 25, "input_gas_temperatur": 25, "2e3": 25, "input_mass_flow_r": 25, "x": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60], "032": 25, "045": 25, "y": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60], "26": [25, 50, 57], "shape_factor_for_exit_hol": 25, "ambient_pressur": 25, "14": [25, 31, 39, 42, 46, 48, 60], "ambient_dens": 25, "821e": 25, "coulomb_friction_coeffici": 25, "categori": [25, 31, 51, 57], "nodes_to_surfac": 25, "set_friction_coeffici": [25, 31, 51, 57, 70], "static": [25, 31, 51, 57, 70], "dynam": [25, 57], "surf1": [25, 31, 51, 57, 70], "surf2": [25, 31, 57], "set_penalty_stiffness_scale_factor": 25, "06667": 25, "set_slave_surfac": [25, 31, 51, 57, 70], "set_master_surfac": [25, 31, 51, 57], "platemat": 25, "mass_dens": [25, 28, 31, 36, 46, 48, 51, 55, 57, 60, 68], "84e": 25, "young_modulu": [25, 28, 31, 36, 46, 48, 51, 55, 57, 60, 68], "30e6": 25, "center_of_mass_constraint": [25, 28, 55, 57], "translational_constraint": [25, 28, 55], "rotational_constraint": [25, 28, 55, 57], "cylindermat": 25, "96e": 25, "airbagmat": 25, "1e": [25, 28, 37, 55, 68], "young_modulus_longitudinal_direct": 25, "2e6": [25, 28], "young_modulus_transverse_direct": 25, "shear_modulu": 25, "53e6": 25, "plate": [25, 49, 50, 61, 62, 69], "set_materi": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 68], "set_element_formul": [25, 28, 36, 46, 48, 51, 55, 57, 60, 68], "belytschko_tsai": [25, 55], "set_thick": [25, 31, 51, 55, 57, 60], "part": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "cylind": [25, 36, 46, 48, 49, 50, 69], "airbagpart": 25, "fully_integrated_belytschko_tsay_membran": 25, "015": [25, 57], "set_integration_point": [25, 31], "set_output_databas": [25, 55, 57, 64, 68], "abstat": 25, "0e": 25, "rbdout": [25, 57], "rwforc": 25, "create_database_binari": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 68, 70], "dt": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 68, 70], "5e": [25, 28, 31], "ieverp": 25, "save_fil": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 70], "total": [25, 27, 28, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 53, 55, 56, 57, 59, 60, 62, 64, 65, 67, 68], "minut": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "254": [25, 27], "second": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "jupyt": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "notebook": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "ipynb": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68], "galleri": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 69], "gener": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 69], "sphinx": [25, 28, 31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 60, 64, 68, 69], "These": [26, 29, 32, 49, 52, 54, 58, 61, 63, 66, 69], "deploi": [26, 27, 69], "00": [27, 30, 33, 50, 53, 56, 59, 62, 65, 67], "examples_airbag": 27, "airbag": 27, "mb": [27, 30, 33, 50, 53, 56, 59, 62, 65, 67], "demonstr": [28, 34, 51, 57, 64], "em": 28, "circuit": 28, "circuittyp": 28, "segmentset": [28, 31], "nodeset": [28, 31, 57, 60, 68], "solidpart": [28, 36, 51, 68], "solidformul": [28, 36, 51, 68], "emcontact": 28, "bemsolv": 28, "femsolv": 28, "matelast": [28, 31, 55, 60], "emmattyp": 28, "em_railgun_data": 28, "em_solut": 28, "em_railgun": [28, 30], "termination_tim": [28, 31, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "3e": [28, 60], "set_timestep": [28, 31, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 51, 55, 57, 68, 70], "timestep": [28, 40], "set_solver_bem": 28, "pcg": 28, "set_solver_fem": 28, "direct_solv": 28, "relative_tol": 28, "circuit_typ": 28, "imposed_current_vs_tim": 28, "loadcurv": 28, "8e": [28, 68], "2e": [28, 60, 68], "4e": [28, 68], "6e": [28, 57, 68], "350": 28, "450": [28, 57], "310": [28, 57], "230": 28, "125": 28, "sfo": 28, "set_curr": 28, "current": [28, 70], "cur": 28, "current_inlet": 28, "inlet": 28, "current_outlet": 28, "outlet": 28, "64e": 28, "7e10": 28, "poisson_ratio": [28, 31, 46, 48, 51, 57, 60, 68], "31": [28, 64], "set_electromagnetic_properti": 28, "material_typ": 28, "conductor": 28, "initial_conduct": 28, "25": [28, 51, 64], "coil": 28, "constant_stress_solid_el": [28, 51, 68], "workpiece1": 28, "workpiece2": 28, "boundarycondit": [28, 31, 46, 48, 55, 57], "create_spc": [28, 57], "spc1": 28, "tx": 28, "fals": 28, "ty": 28, "rz": 28, "death": 28, "spc2": 28, "set_rogowsky_coil_to_output_curr": 28, "759": [28, 30, 42, 50], "electromagnet": [29, 69], "railgun": [29, 30, 69], "01": [30, 33, 36, 38, 50, 55, 56, 65, 67, 68], "examples_em": 30, "veloc": [31, 36, 46, 48, 55], "discretepart": 31, "dro": 31, "motion": [31, 34, 36, 37, 39, 40, 41, 42, 43, 44, 46, 47, 48, 55], "graviti": [31, 35, 38, 45, 55], "gravityopt": [31, 35, 38, 45, 55], "matspringnonlinearelast": 31, "matdampervisc": 31, "matdampernonlinearvisc": 31, "belted_dummy_data": 31, "dummy_solut": 31, "belted_dummi": [31, 33], "12": [31, 55, 60], "tssfac": [31, 36, 48, 55], "set_init_veloc": 31, "shellmatlist": 31, "15": [31, 60], "rigidmat": 31, "23": [31, 64], "elasticmat": 31, "discmatlist": 31, "101": [31, 36], "143": 31, "mat": [31, 34, 36, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 51, 68], "curvedata": 31, "185": 31, "damping_const": 31, "dampingconst": 31, "209": 31, "lcidlist": 31, "properti": 31, "shellsec": 31, "set_extra_nod": 31, "extra_nod": 31, "set_displacement_opt": 31, "displacement_opt": 31, "describes_torsional_spr": 31, "fslist": 31, "62": 31, "88": 31, "11": [31, 55, 57, 60, 64], "surface_to_surface_contact": [31, 57], "segment": 31, "constraint": [31, 55, 57], "create_joint_spher": 31, "node": [31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 57, 64], "jointlist": 31, "boundari": [31, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 55, 57], "condit": [31, 64], "create_imposed_mot": [31, 46, 48, 55, 57], "motion_nod": 31, "motion_curve_x": 31, "motion_curve_i": 31, "acceler": 31, "scalefactor": [31, 55, 57], "g": [31, 35, 38, 45, 55], "dir": [31, 35, 38, 45, 51, 55], "dir_z": [31, 45, 55], "152": 31, "81": [31, 35, 45], "917": [31, 33], "belt": [32, 33, 69], "dummi": [32, 33, 69], "examples_explicit": 33, "icfd": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "1_138": [34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 60], "g8429c8a10f_winx64_ifort190": [34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 60], "icfdanalysi": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "maticfd": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "icfdpart": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "icfddof": [34, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "icfdvolumepart": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "meshedvolum": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "icfd_solut": 34, "initi": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 57, 64, 68], "element": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 57, 64], "cylinder_flow": 34, "100": [34, 36, 44, 46, 47, 51, 55, 57, 60], "flow_dens": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "dynamic_viscos": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 55], "005": [34, 39, 40, 41, 42, 43, 44, 46, 47, 48], "part_inflow": [34, 36, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48], "set_prescribed_veloc": [34, 36, 37, 39, 40, 41, 42, 43, 44, 46, 47, 48], "dof": [34, 36, 37, 39, 40, 41, 42, 43, 44, 46, 47, 48, 55, 57], "10000": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "part_outflow": [34, 36, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48], "set_prescribed_pressur": [34, 36, 39, 40, 41, 42, 43, 44, 46, 47, 48], "pressur": [34, 36, 39, 40, 41, 42, 43, 44, 46, 47, 48], "part_symmetr": [34, 36, 38, 39, 41, 42, 43, 44, 46, 47, 48], "set_free_slip": [34, 35, 36, 39, 41, 42, 43, 44, 46, 47, 48], "part_wal": [34, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48], "set_non_slip": [34, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "compute_drag_forc": [34, 39, 41, 42, 43, 44, 46, 47, 48], "set_boundary_lay": [34, 39, 40, 41, 42, 43, 44, 46, 47, 48], "number": [34, 39, 41, 42, 43, 44, 46, 47, 48, 64], "partvol": [34, 36, 37, 38, 39, 40, 41, 43, 44, 46, 47, 48], "surfac": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "volum": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "space": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "spid": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "meshvol": [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48], "546": [34, 50], "icfd_cylinderflow": [34, 50], "free": 35, "column": 35, "water": 35, "collaps": 35, "compress": [35, 45], "solut": [35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 60, 68], "dam_break": 35, "mat1": [35, 45], "1000": [35, 36, 37, 45, 47, 48, 51, 55], "001": [35, 36, 37, 45, 55, 57], "mat2": [35, 45], "part1": [35, 37], "part2": [35, 37], "part3": 35, "dir_i": [35, 38], "partvol1": [35, 42], "partvol2": [35, 42], "set_fluid_interfac": [35, 42, 45], "779": [35, 50], "icfd_dam_break": [35, 50], "fluid": [36, 39], "particl": 36, "dyna_smp_d_r101_winx64_ifort131": 36, "icfd_couplingform": 36, "demanalysi": 36, "matrigiddiscret": 36, "dem_coupl": 36, "set_coupling_dem": 36, "formul": 36, "force_using_fluid_pressure_gradi": 36, "set_d": 36, "normal_damping_coeff": 36, "tangential_damping_coeff": 36, "static_friction_coeff": 36, "rolling_friction_coeff": 36, "set_initi": [36, 38, 47], "meshsize_box": 36, "size": [36, 46, 49, 50, 69], "min_point": 36, "max_point": 36, "1e4": 36, "disc": 36, "one_point_corot": 36, "770": [36, 50], "icfd_dem_coupl": [36, 50], "univers": 37, "famou": 37, "test": [37, 54, 56, 69], "order": 37, "steadi": 37, "re": 37, "icfd_analysistyp": 37, "icfd_messagelevel": 37, "driven_cav": 37, "set_typ": 37, "analysis_typ": [37, 68], "steady_state_analysi": 37, "set_output": 37, "messagelevel": 37, "full_output_inform": 37, "iteration_interv": 37, "250": [37, 57], "set_steady_st": 37, "max_iter": 37, "2500": 37, "momentum_tol_limit": 37, "pressure_tol_limit": 37, "velocity_relax_param": 37, "pressure_relax_param": 37, "768": [37, 50], "icfd_driven_cav": [37, 50], "forc": [38, 47], "convect": [38, 47], "coars": [38, 43, 44, 47], "free_convection_flow": 38, "30": [38, 57, 68], "37": [38, 51], "799999": 38, "heat_capac": [38, 47], "thermal_conduct": [38, 47], "thermal_expansion_coeffici": 38, "set_prescribed_temperatur": [38, 47], "temperatur": [38, 47, 68], "compute_temperatur": 38, "773": [38, 48, 50], "icfd_free_convection_flow": [38, 50], "icfd_control_imposed_mov": [39, 45], "imposed_mov": 39, "set_imposed_mov": [39, 42, 45], "vy": [39, 42], "func": [39, 42, 46, 48], "sin": [39, 42, 46, 48], "755": [39, 50], "icfd_imposed_mov": [39, 50], "problem": [40, 41, 42, 46, 48], "icfd_surfremeshmethod": 40, "internal_3d_flow": 40, "set_volume_mesh": 40, "mesh_growth_scale_factor": 40, "set_surface_mesh": 40, "remesh_method": 40, "laplacian_smooth": 40, "set_boundary_layer_symmetry_condit": 40, "compute_flux": 40, "762": [40, 44, 50], "icfd_internal_3d_flow": [40, 50], "mesh_adapt": 41, "set_mesh_adapt": 41, "min_mesh_s": 41, "02": [41, 45], "max_mesh_s": 41, "max_perceptual_error": 41, "num_iter": 41, "part_meshs": [41, 43], "772": [41, 50], "icfd_mesh_adapt": [41, 50], "mesh_morph": 42, "part_meshmorph": 42, "icfd_mesh_morph": [42, 50], "mesh_siz": 43, "set_meshs": 43, "754": [43, 50], "icfd_mesh_s": [43, 50], "plate_flow": 44, "embed_shel": 44, "icfd_plate_flow": [44, 50], "impos": [45, 49, 50, 69], "entir": 45, "part_bottom": 45, "part_top": 45, "part_mid": 45, "vx": 45, "52": [45, 57], "82": 45, "partvol_bottom": 45, "partvol_top": 45, "856": [45, 50], "icfd_slosh": [45, 50], "coupl": [46, 48, 49, 50, 69], "strong_fsi": 46, "set_fsi": [46, 48], "implicitanalysi": [46, 57, 60], "set_initial_timestep_s": [46, 60], "set_dynam": [46, 57], "gamma": [46, 57], "beta": [46, 57], "set_solut": [46, 57, 60], "iteration_limit": 46, "stiffness_reformation_limit": [46, 57], "150": 46, "2e11": [46, 48], "plane_stress": [46, 48], "conddit": [46, 48, 55, 68], "y_translat": [46, 48, 57], "681": [46, 50], "icfd_strong_fsi": [46, 50], "thermal_flow": 47, "200": [47, 51, 60], "20": [47, 51, 55, 68, 70], "80": 47, "777": [47, 50], "icfd_thermal_flow": [47, 50], "loos": 48, "explicit": 48, "weak_fsi": 48, "max_timestep": [48, 55], "icfd_weak_fsi": [48, 50], "flow": [49, 50, 69], "dam": [49, 50, 69], "break": [49, 50, 69], "dem": [49, 50, 69], "driven": [49, 50, 69], "caviti": [49, 50, 69], "thermal": [49, 50, 67], "move": [49, 50, 69], "intern": [49, 50, 69], "3d": [49, 50, 69], "morph": [49, 50, 69], "slosh": [49, 50, 69], "strong": [49, 50, 69], "fsi": [49, 50, 69], "weak": [49, 50, 69], "288": 50, "examples_icfd": 50, "dyna_smp_s_r13": [51, 64, 68], "igapart": [51, 70], "igaformul": 51, "hourglasstyp": 51, "rigidwallcylind": 51, "direct": 51, "contacttyp": [51, 57, 70], "offsettyp": [51, 57], "matpiecewiselinearplast": [51, 57], "matspotweld": [51, 57], "iga_sample_data": 51, "iga_solut": [51, 70], "iga_sampl": [51, 53, 70], "maino": [51, 70], "rkrweld": [51, 70], "kei": [51, 57, 70], "27part": [51, 70], "timestep_size_for_mass_sc": [51, 68, 70], "0004": [51, 70], "plastic": 51, "830e": 51, "06": 51, "yield_stress": [51, 57, 68], "tangent_modulu": [51, 57], "swmatlist": 51, "materialdata": 51, "spotweld": [51, 57], "plastic_hardening_modulu": [51, 57], "axial_force_resultant_at_failur": 51, "force_resultant_nrs_at_failur": 51, "force_resultant_nrt_at_failur": 51, "reissner_mindlin_fibers_at_control_point": 51, "set_hourglass": 51, "type": [51, 57, 64, 70], "belytschko_bindeman": 51, "cylinder1": 51, "2472": 51, "600": 51, "000": 51, "1270": 51, "98": [51, 55], "2668": 51, "53": 51, "cylinder2": 51, "3580": 51, "1261": 51, "3130": 51, "49": 51, "cylinder3": 51, "3090": 51, "59": 51, "955": 51, "35": 51, "1299": 51, "2958": 51, "set_mot": 51, "selfcontact": [51, 57, 70], "automat": [51, 57, 70], "swcontact": [51, 57], "ti": [51, 57], "shell_edge_to_surface_contact": [51, 57], "offset": [51, 57], "spotweldsolid": 51, "spotweldsurfac": [51, 57], "085": [51, 53], "isogeometr": [52, 69], "examples_iga": 53, "iga": [53, 70], "isph": 55, "dyna_mpp_d_r13": 55, "gf8a97bda2a_winx64_ifort190_msmpi": 55, "matsphincompressiblefluid": 55, "matsphincompressiblestructur": 55, "box": 55, "isphstructpart": 55, "isphfluidpart": 55, "isphsolut": 55, "isph_rigidtest": 55, "rigidtest": [55, 56], "isphobj": 55, "04": 55, "isphanalysi": 55, "set_box": 55, "750": 55, "800": 55, "3000": 55, "platemat1": 55, "platemat2": 55, "platemat3": 55, "matsphfluid": 55, "tension_coefficient1": 55, "1e6": 55, "tension_coefficient2": 55, "matsphstruct": 55, "sensorplan": 55, "movingcub": 55, "wallsmesh": 55, "sphwall": 55, "set_smoothing_length": 55, "sphcube": 55, "sphwater": 55, "588": [55, 57], "1176": 55, "204": 55, "17": [55, 57, 59], "create_massflow_plan": 55, "merge_two_rigid_bodi": 55, "x_translat": [55, 57], "500": [55, 57], "z_rotat": 55, "9810": 55, "sphmassflow": 55, "734": [55, 56], "examples_isph": 56, "beampart": 57, "timestepctrol": 57, "matnul": 57, "matmodifiedpiecewiselinearplast": 57, "camry_rc_data": 57, "camry_solut": 57, "camry_rc": [57, 59], "camry_rc_main": 57, "501_rig_bar_roof_crush_platen5": 57, "camry_v1_nosusandpowertrain_impl7": 57, "camry_v1_nosusandpowertrain_impl7_nod": 57, "roof_weld": 57, "weld7": 57, "xtra_sw": 57, "global": 57, "camri": 57, "control_flag": 57, "automatically_adjust_timestep_s": 57, "optimum_equilibrium_iteration_count": 57, "511": 57, "38": 57, "set_eigenvalu": [57, 60], "55": 57, "absolute_convergence_toler": 57, "890e": 57, "09": 57, "100e05": 57, "matplaten": 57, "80e": 57, "00e05": 57, "spotweldharden2100": 57, "850e": 57, "510": 57, "2100": 57, "spotweldharden2200": 57, "2200": 57, "windowshield": 57, "355e": 57, "000e04": 57, "22": [57, 64], "1400": 57, "plastic_strain_to_failur": 57, "integration_points_numb": 57, "windowsrear": 57, "425e": 57, "plastic300": 57, "210000": 57, "300": 57, "plastic250": 57, "plastic360": 57, "360": 57, "plastic180": 57, "180": 57, "plastic450": 57, "plastic1300": 57, "1300": 57, "plastic400": 57, "400": [57, 60], "plastic500": 57, "plastic675": 57, "675": 57, "plastic310": 57, "255e": 57, "70000": 57, "plastic220": 57, "220": 57, "plastic220_410": 57, "410": 57, "bpart": 57, "50000002": 57, "els": 57, "set_diamet": 57, "spart": 57, "1463": 57, "1464": 57, "elif": 57, "417": 57, "419": 57, "530": 57, "532": 57, "585": 57, "586": 57, "587": 57, "50000001": 57, "290": 57, "291": 57, "partswithmat300": 57, "partswithmat250": 57, "partswithmat360": 57, "partswithmat180": 57, "partswithmat450": 57, "partswithmat400": 57, "partswithmat500": 57, "57": 57, "286": 57, "5000000": 57, "5000006": 57, "5000007": 57, "pass": 57, "constrain": 57, "sw": 57, "create_spotweld": 57, "nodeid1": 57, "nodeid2": 57, "cnrb": 57, "create_cnrb": 57, "set_mortar": 57, "vehicl": 57, "platebiw": 57, "biw": 57, "platen": 57, "constrained_offset": 57, "spotweldbeam": 57, "set_contact_thick": 57, "spc": 57, "crv": [57, 60], "77": 57, "13": [57, 60], "39": 57, "65": 57, "78": 57, "91": 57, "104": 57, "117": 57, "127": 57, "0802216": 57, "z_translat": 57, "elout": 57, "0001": 57, "nodout": 57, "secforc": 57, "233": [57, 59], "crash": [58, 59, 69], "examples_implicit": 59, "comput": 60, "frequencydomain": 60, "excitationdof": 60, "responsedof": 60, "responsetyp": 60, "nvh_frf_plate_damp": 60, "frf_plate_damp": [60, 62], "nvhobj": 60, "number_eigenvalu": 60, "solution_method": 60, "fd": 60, "0045": 60, "00713": 60, "00386": 60, "00328": 60, "0034": 60, "00624": 60, "set_frequency_response_funct": 60, "excitation_input_set": 60, "131": 60, "excitation_input_dof": 60, "z": 60, "max_natural_frequ": 60, "2000": 60, "modal_damping_coefficient_curve_typ": 60, "modal_damping_coefficient_curv": 60, "response_output_set": 60, "651": 60, "response_output_dof": 60, "response_output_typ": 60, "base_acceler": 60, "frf_output_min_frequ": 60, "frf_output_max_frequ": 60, "frf_output_num_frequ": 60, "7870": 60, "07e11": 60, "292": 60, "boxshel": 60, "sr_hughes_liu": 60, "002": 60, "set_shear_factor": 60, "833": 60, "set_printout": 60, "993": [60, 62], "frf": [61, 62, 69], "rectangular": [61, 62, 69], "examples_nvh": 62, "efp": [63, 65, 69], "concret": [63, 65, 69], "controlpoint": 64, "advectionmethod": 64, "structuredmesh": 64, "filldirect": 64, "matdb": 64, "efp_solut": 64, "280": 64, "ouput": 64, "interv": 64, "set_output_interv": 64, "set_analysis_typ": 64, "van_leer_with_hi": 64, "control_points_x": 64, "posit": 64, "ratio": 64, "control_points_i": 64, "control_points_z": 64, "269": 64, "309": 64, "339": 64, "geometry_typ": 64, "reference_pressur": 64, "01325e": 64, "highexplos": 64, "define_geometry_paramet": 64, "inout": 64, "outside_the_geometri": 64, "33": 64, "outut": 64, "datebas": 64, "end": 64, "887": [64, 65], "examples_sal": 65, "692": [67, 68], "examples_therm": 67, "thermal_stress": [67, 68], "thermalanalysi": 68, "thermalanalysistyp": 68, "matelasticplastictherm": 68, "t": 68, "tanalysi": 68, "initial_timestep": 68, "set_solv": 68, "transient": 68, "1e10": 68, "thermal_expans": 68, "1e20": 68, "set_thermal_isotrop": 68, "densiti": 68, "generation_rate_multipli": 68, "specific_heat": 68, "conduct": 68, "slab": 68, "initialcondit": 68, "create_temperatur": 68, "seri": 69, "librari": 69, "aim": 70, "conveni": 70, "complet": 70, "wai": 70, "build": 70, "up": 70, "final": 70, "while": 70, "pydpf": 70, "highli": 70, "abstract": 70, "api": 70, "dynaairbag": 70, "ha": 70, "three": 70, "latest": 70, "host": 70, "must": 70, "registri": 70, "support": 70, "request": 70, "read": 70, "onli": 70, "token": 70, "insert": 70, "private_pypi_access_token": 70, "onc": 70, "enhanc": 70, "contribut": 70, "copi": 70, "requir": 70, "lack": 70, "internet": 70, "machin": 70, "should": 70, "wheelhous": 70, "archiv": 70, "releas": 70, "architectur": 70, "each": 70, "wheel": 70, "necessari": 70, "scratch": 70, "isol": 70, "system": 70, "fresh": 70, "unzip": 70, "v0": 70, "zip": 70, "upgrad": 70, "ignor": 70, "preced": 70, "consid": 70, "comprehes": 70, "On": 70, "issu": 70, "question": 70, "report": 70, "bug": 70, "new": 70, "To": 70, "reach": 70, "getcwd": 70, "solv": 70, "distribut": 70, "mit": 70, "root": 70}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"dynabas": 0, "dynadem": 1, "dynaem": 2, "dynaicfd": 3, "dynaiga": 4, "dynaisph": 5, "dynamateri": 6, "dynamech": 7, "dynanvh": 8, "dynasal": 9, "dynasolut": 10, "dynasolv": 11, "api": [12, 13, 14], "refer": 12, "pydyna": [13, 14, 19, 20, 70], "pre": [13, 19], "solver": [14, 20], "contribut": 15, "get": 16, "start": [16, 19], "instal": [16, 19, 70], "user": [17, 70], "guid": 17, "us": 18, "pydpf": 18, "post": 18, "l": 18, "dyna": 18, "oper": 18, "run": 19, "virtualenv": 19, "copi": 19, "packag": 19, "venv": 19, "folder": 19, "requir": 19, "server": 19, "here": 19, "i": 19, "minim": 19, "content": 19, "window": 19, "linux": 19, "client": 19, "structur": 19, "al": 19, "demo": 19, "render": 20, "python": 20, "code": 20, "usag": [20, 70], "airbag": [25, 26, 69], "deploi": 25, "exampl": [25, 26, 28, 29, 31, 32, 34, 49, 51, 52, 54, 55, 57, 58, 61, 63, 66, 68, 69], "comput": [27, 30, 33, 50, 53, 56, 59, 62, 65, 67], "time": [27, 30, 33, 50, 53, 56, 59, 62, 65, 67], "railgun": 28, "em": [29, 69], "belt": 31, "dummi": 31, "explicit": [32, 69], "cylind": 34, "flow": [34, 38, 40, 44, 47], "dam": 35, "break": 35, "dem": 36, "coupl": 36, "driven": 37, "caviti": 37, "thermal": [38, 47, 66, 68, 69], "impos": 39, "move": 39, "intern": 40, "3d": 40, "mesh": [41, 42, 43], "adapt": 41, "morph": 42, "size": 43, "plate": [44, 60], "slosh": 45, "strong": 46, "fsi": [46, 48], "weak": 48, "icfd": [49, 69], "iga": [51, 52, 69], "isph": [54, 69], "rigid": 55, "test": 55, "crash": 57, "implicit": [58, 69], "frf": 60, "rectangular": 60, "nvh": [61, 69], "sale": [63, 69], "efp": 64, "concret": 64, "target": 64, "stress": 68, "document": 70, "0": 70, "2": 70, "1": 70, "project": 70, "overview": 70, "mode": 70, "develop": 70, "offlin": 70, "licens": 70}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"dynamech": [[7, "dynamech"]], "dynasale": [[9, "dynasale"]], "dynasolution": [[10, "dynasolution"]], "dynaicfd": [[3, "dynaicfd"]], "dynaiga": [[4, "dynaiga"]], "API reference": [[12, "api-reference"]], "PyDyna-pre APIs": [[13, "pydyna-pre-apis"]], "dynabase": [[0, "dynabase"]], "User guide": [[17, "user-guide"]], "dynadem": [[1, "dynadem"]], "Contributing": [[15, "contributing"]], "dynasolver": [[11, "dynasolver"]], "dynamaterial": [[6, "dynamaterial"]], "Getting started": [[16, "getting-started"]], "Installation": [[16, "installation"], [70, "installation"]], "PyDyna-solver APIs": [[14, "pydyna-solver-apis"]], "dynaem": [[2, "dynaem"]], "dynaisph": [[5, "dynaisph"]], "dynanvh": [[8, "dynanvh"]], "PyDyna-solver": [[20, "pydyna-solver"]], "Rendered Python code": [[20, "rendered-python-code"]], "Usage": [[20, "usage"], [70, "usage"]], "Cylinder flow example": [[34, "cylinder-flow-example"]], "EM examples": [[29, "em-examples"], [69, "em-examples"]], "Airbag deploy example": [[25, "airbag-deploy-example"]], "Belted dummy example": [[31, "belted-dummy-example"]], "Dam break": [[35, "dam-break"]], "Using PyDPF-post for LS-DYNA": [[18, "using-pydpf-post-for-ls-dyna"]], "Operators": [[18, "operators"]], "Computation times": [[33, "computation-times"], [27, "computation-times"], [30, "computation-times"], [67, "computation-times"], [65, "computation-times"], [62, "computation-times"], [56, "computation-times"], [59, "computation-times"], [50, "computation-times"], [53, "computation-times"]], "Airbag examples": [[26, "airbag-examples"], [69, "airbag-examples"]], "PyDyna-pre": [[19, "pydyna-pre"]], "Running pyDyna-pre in virtualenv": [[19, "running-pydyna-pre-in-virtualenv"]], "Install virtualenv": [[19, "install-virtualenv"]], "Copy pyDyna package in venv folder": [[19, "copy-pydyna-package-in-venv-folder"]], "Requirements": [[19, "requirements"]], "Starting the server": [[19, "starting-the-server"]], "Here is the minimal content in server folder": [[19, "here-is-the-minimal-content-in-server-folder"]], "Starting the server on Windows": [[19, "starting-the-server-on-windows"]], "Starting the server on Linux": [[19, "starting-the-server-on-linux"]], "Running pyDyna-pre client": [[19, "running-pydyna-pre-client"]], "Structure ALE demo": [[19, "structure-ale-demo"]], "Railgun example": [[28, "railgun-example"]], "Explicit examples": [[32, "explicit-examples"], [69, "explicit-examples"]], "EFP Concrete Target": [[64, "efp-concrete-target"]], "ISPH examples": [[54, "isph-examples"], [69, "isph-examples"]], "Rigid test example": [[55, "rigid-test-example"]], "Thermal stress example": [[68, "thermal-stress-example"]], "NVH examples": [[61, "nvh-examples"], [69, "nvh-examples"]], "Examples": [[69, "examples"]], "ICFD examples": [[69, "icfd-examples"], [49, "icfd-examples"]], "IGA examples": [[69, "iga-examples"], [52, "iga-examples"]], "Implicit examples": [[69, "implicit-examples"], [58, "implicit-examples"]], "SALE examples": [[69, "sale-examples"], [63, "sale-examples"]], "Thermal examples": [[69, "thermal-examples"], [66, "thermal-examples"]], "PyDyna documentation 0.2.1": [[70, "pydyna-documentation-version"]], "PyDyna": [[70, "pydyna"]], "Project Overview": [[70, "project-overview"]], "Install in user mode": [[70, "install-in-user-mode"]], "Install in developer mode": [[70, "install-in-developer-mode"]], "Install in offline mode": [[70, "install-in-offline-mode"]], "Documentation": [[70, "documentation"]], "License": [[70, "license"]], "FRF for a rectangular plate": [[60, "frf-for-a-rectangular-plate"]], "Crash example": [[57, "crash-example"]], "Imposed move": [[39, "imposed-move"]], "Driven cavity": [[37, "driven-cavity"]], "Mesh Morphing": [[42, "mesh-morphing"]], "Mesh size": [[43, "mesh-size"]], "Thermal flow": [[47, "thermal-flow"], [38, "thermal-flow"]], "Internal 3D flow": [[40, "internal-3d-flow"]], "Strong FSI": [[46, "strong-fsi"]], "Plate flow": [[44, "plate-flow"]], "Weak FSI": [[48, "weak-fsi"]], "IGA example": [[51, "iga-example"]], "DEM Coupling": [[36, "dem-coupling"]], "Mesh Adaptivity": [[41, "mesh-adaptivity"]], "Sloshing": [[45, "sloshing"]]}, "indexentries": {}}) \ No newline at end of file diff --git a/version/0.3/.buildinfo b/version/0.3/.buildinfo new file mode 100644 index 000000000..c1a64b622 --- /dev/null +++ b/version/0.3/.buildinfo @@ -0,0 +1,4 @@ +# Sphinx build info version 1 +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: af18f961b038d19f49390a908ff0cd7d +tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/version/0.3/_downloads/00116c2aabe55efb39617d3bea7749ae/em_rlc_define_func.ipynb b/version/0.3/_downloads/00116c2aabe55efb39617d3bea7749ae/em_rlc_define_func.ipynb new file mode 100644 index 000000000..ffdb28d4d --- /dev/null +++ b/version/0.3/_downloads/00116c2aabe55efb39617d3bea7749ae/em_rlc_define_func.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "RLC circuit by function\n=======================\n\nThis example shows how to use the `Function` object to define an RLC\ncircuit as an inlet boundary condition. The executable file for LS-DYNA\nis `ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaem import (\n DynaEM,\n NodeSet,\n SegmentSet,\n SolidPart,\n SolidFormulation,\n EMType,\n Isopotential_ConnType,\n Isopotential,\n RogoCoil,\n Function\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid,EMMATTYPE\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.em_rlc_define_func + os.sep\nfns.append(path + \"em_rlc_define_func.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=0.01)\nsolution.create_database_binary(dt=1e-4)\n\nemobj = DynaEM()\nsolution.add(emobj)\n\nemobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4)\n\nemobj.analysis.set_timestep(timestep=1e-4)\nemobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING)\n\nmatrigid = MatRigid(mass_density=7000, young_modulus=2e11,center_of_mass_constraint=1,translational_constraint=7,rotational_constraint=7)\nmatrigid.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4)\n\npart1 = SolidPart(1)\npart1.set_material(matrigid)\npart1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nemobj.parts.add(part1)\n\nnset1 = NodeSet([429,433,437,441,445,449,453,457,461,465,469,473,477,481,485,489,493,497,501,505,509,513,517,521,525])\nnset2 = NodeSet([26,31,36,41,46,51,56,61,66,71,76,81,86,91,96,101,106,111,116,121,126,131,136,141,146])\nisopos_conn1 = Isopotential(nset1)\nisopos_conn2 = Isopotential(nset2)\nfn = \"\"\"float rlc(float time,float emdt,float curr,float curr1,\n float curr2,float pot1,float pot2, float rmesh)\n {\n float fac,R,C,Vc,L,xi ; \n R = 0.5e-3; L = 78.e-6; \n fac =1.e-6; C=363.e-4;\n float q= 181.5;\n if(time 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.imposed_move + os.sep\nfns.append(path + \"imposed_move.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\npart_wall.set_imposed_move(vy=Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"))\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.5)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/08db71af516e6691624b6c94a375f3e4/icfd_weak_fsi.ipynb b/version/0.3/_downloads/08db71af516e6691624b6c94a375f3e4/icfd_weak_fsi.ipynb new file mode 100644 index 000000000..880aa62f4 --- /dev/null +++ b/version/0.3/_downloads/08db71af516e6691624b6c94a375f3e4/icfd_weak_fsi.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Weak FSI\n========\n\nThis example shows a simple FSI (fluid-structure interaction) coupling\nproblem using weak/loose/explicit FSI. The executable file for LS-DYNA\nis `ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n ShellPart,\n ShellFormulation,\n PartSet,\n Curve,\n DOF,\n Motion\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.weak_fsi + os.sep\nfns.append(path + \"weak_fsi.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfd.set_timestep(tssfac=0.9,max_timestep=Curve(x=[0,10000],y=[0.05,0.05]))\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfdanalysis.set_fsi()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.set_fsi()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\n#define rigid cylinder\nmatrigid = MatRigid(mass_density=1000,young_modulus=2e11,poisson_ratio=0.3)\ncylinder = ShellPart(1)\ncylinder.set_material(matrigid)\ncylinder.set_element_formulation(ShellFormulation.PLANE_STRESS)\nicfd.parts.add(cylinder)\n# Define boundary conddition\nicfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY)\n\nsolution.create_database_binary(dt=0.2)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/0bebc1965dcd336d66ec58ea993ac83d/icfd_mesh_adaptivity.ipynb b/version/0.3/_downloads/0bebc1965dcd336d66ec58ea993ac83d/icfd_mesh_adaptivity.ipynb new file mode 100644 index 000000000..2af0b8e5c --- /dev/null +++ b/version/0.3/_downloads/0bebc1965dcd336d66ec58ea993ac83d/icfd_mesh_adaptivity.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Mesh adaptivity\n===============\n\nThis example shows a simple ICFD problem with adaptivity. The executable\nfile for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.mesh_adaptivity + os.sep\nfns.append(path + \"mesh_adaptivity.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfdanalysis.set_mesh_adaptivity(min_mesh_size=0.02,max_mesh_size=0.2,max_perceptual_error=2,num_iteration=10)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=2)\nicfd.parts.add(part_wall)\n\npart_meshsize = ICFDPart(5)\npart_meshsize.set_material(mat)\nicfd.parts.add(part_meshsize)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.5)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/159000bd92c38d9ab85730d1e86278c1/icfd_sloshing.py b/version/0.3/_downloads/159000bd92c38d9ab85730d1e86278c1/icfd_sloshing.py new file mode 100644 index 000000000..175d93d83 --- /dev/null +++ b/version/0.3/_downloads/159000bd92c38d9ab85730d1e86278c1/icfd_sloshing.py @@ -0,0 +1,87 @@ +""" +Sloshing +======== + +This example shows how to directly impose a displacement of the entire volume mesh +through the use of the ``ICFD_CONTROL_IMPOSED_MOVE`` keyword. The executable file +for LS-DYNA is ``ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Curve, + Gravity, + GravityOption, + Compressible + ) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/sloshing.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.sloshing + os.sep +fns.append(path + "sloshing.k") +solution.open_files(fns) +solution.set_termination(termination_time=1) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.02) +icfd.add(icfdanalysis) + +# define model +mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001) +mat2 = MatICFD(flag=Compressible.VACUUM) + +part_bottom = ICFDPart(1) +part_bottom.set_material(mat1) +part_bottom.set_non_slip() +icfd.parts.add(part_bottom) + +part_top = ICFDPart(2) +part_top.set_material(mat2) +part_top.set_non_slip() +icfd.parts.add(part_top) + +part_mid = ICFDPart(3) +part_mid.set_material(mat1) +icfd.parts.add(part_mid) + +g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 10000], y=[9.81, 9.81])) +icfd.add(g) + +icfd.set_imposed_move(vx=Curve(x=[0, 0.5, 0.52, 0.8, 0.82, 2.0], y=[1, 1, -1, -1, 0, 0])) + +partvol_bottom = ICFDVolumePart(surfaces=[1, 3]) +partvol_bottom.set_material(mat1) +icfd.parts.add(partvol_bottom) + +partvol_top = ICFDVolumePart(surfaces=[2, 3]) +partvol_top.set_material(mat2) +icfd.parts.add(partvol_top) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2]) +meshvol.set_fluid_interfaces([3]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.02) +solution.save_file() diff --git a/version/0.3/_downloads/16cf40ce4d4ac8d2cbca5d523cf7639b/camry_rc.ipynb b/version/0.3/_downloads/16cf40ce4d4ac8d2cbca5d523cf7639b/camry_rc.ipynb new file mode 100644 index 000000000..851a24a43 --- /dev/null +++ b/version/0.3/_downloads/16cf40ce4d4ac8d2cbca5d523cf7639b/camry_rc.ipynb @@ -0,0 +1,284 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Implicit model\n==============\n\nThis example shows how to create and use an implicit dynamic roof crush\nmodel.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Perform required imports\n========================\n\nPeform required imports.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n Curve,\n BeamPart,\n ShellPart,\n NodeSet,\n PartSet,\n TimestepCtrol,\n Contact,\n ContactType,\n ContactCategory,\n ContactSurface,\n DOF,\n OffsetType,\n AnalysisType\n)\nfrom ansys.dyna.core.pre.dynamaterial import (\n MatNull,\n MatRigid,\n MatSpotweld,\n MatModifiedPiecewiseLinearPlasticity,\n MatPiecewiseLinearPlasticity,\n)\nfrom camry_rc_data import *\nfrom ansys.dyna.core.pre import examples" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Manually start the `pre` service\n================================\n\nCopy the `pyDyna/src/ansys/dyna/core/pre/Server`folder to a desired\nlocation. Start the `pre` service at this location by running this\ncommand:\n\n`python kwserver.py`\n\nOnce the `pre` servic is running, you can connect a client to it using\nthe hostname and the port. This example uses the default local host and\nport (`\"localhost\"` and `\"50051\"` respectively).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "hostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\ncamry_solution = DynaSolution(hostname)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Import initial mesh data\n========================\n\nImport the initial mesh data (nodes and elements), which includes the\nvehicle data, weld data, and platen data.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fns = []\npath = examples.camry_rc + os.sep\nfns.append(path + \"Camry_RC_main.k\")\nfns.append(path + \"501_RIG_BAR_roof_crush_platen5.key\")\nfns.append(path + \"Camry_V1_NoSusAndPowerTrain_impl7.k\")\nfns.append(path + \"Camry_V1_NoSusAndPowerTrain_impl7_nodes.k\")\nfns.append(path + \"roof_welds.k\")\nfns.append(path + \"weld7.k\")\nfns.append(path + \"xtra_sw.k\")\ncamry_solution.open_files(fns)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define global control cards\n===========================\n\nBecause roof crush is a quasi-static loading case, you must run this\nmodel as an implicit dynamic solution. Define the global control cards.\nFrom the `dynasolution` class, set the termination time and the\nfrequency for the database ASCII options.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "camry_solution.set_termination(10)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Use the implicit analysis methods in the `dynamech` class to define the\nIMPLICIT control cards.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "camry = DynaMech(analysis=AnalysisType.EXPLICIT)\ncamry_solution.add(camry)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set the automatic timestep control flag and the optimal equilibrium\niteration count per timestep.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "camry.implicitanalysis.set_initial_timestep_size(0.1)\ncamry.implicitanalysis.set_timestep(\n control_flag=TimestepCtrol.AUTOMATICALLY_ADJUST_TIMESTEP_SIZE,\n Optimum_equilibrium_iteration_count=511,\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Use the `set_dynamic()` method to set the IMASS value to 1 and assign\nthe gamma and beta values.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "camry.implicitanalysis.set_dynamic(gamma=0.6, beta=0.38)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "If normal modes must be extracted, use the `set_eigenvalue()` method.\nThe `set_solution()` method defines NSOLVR as 12 (Nolinear with BFGS\nupdate).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "camry.implicitanalysis.set_eigenvalue()\ncamry.implicitanalysis.set_solution(iteration_limit=1,\n stiffness_reformation_limit=50, absolute_convergence_tolerance=-100\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define materials\n================\n\nThis model uses four classes of material: `MAT_NULL`, `MAT_RIGID,`\n`MAT_SPOTWELD`, and `MAT_PIECEWISE_LINEAR_PLASTICITY`. Use the\n`dynamaterial` class to define these materials.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "matnull = MatNull(mass_density=6e-11)\nmatrigid = MatRigid(mass_density=7.890e-09, young_modulus=2.100e05, poisson_ratio=0.3)\nmatplaten = MatRigid(\n mass_density=7.80e-09,\n young_modulus=2.00e05,\n poisson_ratio=0.3,\n center_of_mass_constraint=1,\n rotational_constraint=7,\n)\nspotweldharden2100 = MatSpotweld(\n mass_density=7.850e-09,\n young_modulus=2.100e05,\n poisson_ratio=0.3,\n yield_stress=510,\n plastic_hardening_modulus=2100,\n)\nspotweldharden2200 = MatSpotweld(\n mass_density=7.850e-09,\n young_modulus=2.100e05,\n poisson_ratio=0.3,\n yield_stress=510,\n plastic_hardening_modulus=2200,\n)\nwindowshield = MatModifiedPiecewiseLinearPlasticity(\n mass_density=2.355e-09,\n young_modulus=7.000e04,\n poisson_ratio=0.22,\n yield_stress=30,\n tangent_modulus=1400,\n plastic_strain_to_failure=0.015,\n integration_points_number=1,\n)\nwindowsrear = MatModifiedPiecewiseLinearPlasticity(\n mass_density=2.425e-09,\n young_modulus=7.000e04,\n poisson_ratio=0.22,\n yield_stress=30,\n tangent_modulus=1400,\n plastic_strain_to_failure=0.015,\n integration_points_number=1,\n)\nplastic300 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=300, tangent_modulus=5000\n)\nplastic250 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=250, tangent_modulus=5000\n)\nplastic360 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=360, tangent_modulus=5000\n)\nplastic180 = MatPiecewiseLinearPlasticity(\n mass_density=7.850e-09, young_modulus=210000, yield_stress=180, tangent_modulus=5000\n)\nplastic450 = MatPiecewiseLinearPlasticity(\n mass_density=7.850e-09, young_modulus=210000, yield_stress=450, tangent_modulus=5000\n)\nplastic1300 = MatPiecewiseLinearPlasticity(\n mass_density=7.850e-09, young_modulus=210000, yield_stress=1300, tangent_modulus=5000\n)\nplastic400 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=400, tangent_modulus=5000\n)\nplastic500 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=500, tangent_modulus=5000\n)\nplastic675 = MatPiecewiseLinearPlasticity(\n mass_density=7.850e-09, young_modulus=210000, yield_stress=675, tangent_modulus=5000\n)\nplastic310 = MatPiecewiseLinearPlasticity(\n mass_density=2.255e-09, young_modulus=70000, yield_stress=310, tangent_modulus=5000\n)\nplastic220 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=5000\n)\nplastic220_410 = MatPiecewiseLinearPlasticity(\n mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=410\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Assign section and material properties\n======================================\n\nOnce all materials are explicitly defined, these material IDs must be\ncross-referenced in the *PART* card. You use the `set_material()` method\nfor this. Because many parts share common materials, the assignment\nhappens within a loop. Within the loop, the `set_element_formulation()`\nmethod is called to assign the elform for the beam and shell elements.\nAccordingly, either the beam diameter or the shell thickness is also\ndefined. To identify the part ID that has a particular material type, a\npredefined list is made available in the `camry_rc_data.py` file, which\nis read in this script.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "for bpart in beamparts:\n part = BeamPart(bpart[0])\n if part.id in [50000002]:\n part.set_material(spotweldharden2200)\n else:\n part.set_material(spotweldharden2100)\n part.set_element_formulation(bpart[1])\n part.set_diameter(bpart[2])\n camry.parts.add(part)\n\nfor spart in shellparts:\n part = ShellPart(spart[0])\n if part.id in [1463, 1464]:\n part.set_material(matnull)\n elif part.id in [417, 419, 530, 532, 585, 586, 587, 588]:\n part.set_material(matrigid)\n elif part.id in [50000001]:\n part.set_material(matplaten)\n elif part.id in [290]:\n part.set_material(windowshield)\n elif part.id in [291]:\n part.set_material(windowsrear)\n elif part.id in partswithmat300:\n part.set_material(plastic300)\n elif part.id in partswithmat250:\n part.set_material(plastic250)\n elif part.id in partswithmat360:\n part.set_material(plastic360)\n elif part.id in partswithmat180:\n part.set_material(plastic180)\n elif part.id in partswithmat450:\n part.set_material(plastic450)\n elif part.id in partswithmat400:\n part.set_material(plastic400)\n elif part.id in partswithmat500:\n part.set_material(plastic500)\n elif part.id in [57]:\n part.set_material(plastic1300)\n elif part.id in [286]:\n part.set_material(plastic675)\n elif part.id in [5000000]:\n part.set_material(plastic310)\n elif part.id in [5000006]:\n part.set_material(plastic220)\n elif part.id in [5000007]:\n part.set_material(plastic220_410)\n else:\n pass\n part.set_element_formulation(spart[1])\n part.set_thickness(spart[2])\n camry.parts.add(part)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Generate keywords for spotwelds and nodal rigid bodies\n======================================================\n\nThe `camry_rc_data.py` contains the predefined node pairs and node sets\nrequired for the *CONSTRAINED\\_SPOTWELD* and\n*CONSTRAINED\\_NODAL\\_RIGID\\_BODY* definitions. Loop through these lists\nto generate the appropriate keywords.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "for sw in spotweld:\n camry.constraints.create_spotweld(nodeid1=sw[0], nodeid2=sw[1])\n\nfor cnrb in cnrbs:\n camry.constraints.create_cnrb(nodeset=NodeSet(cnrb))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define contacts\n===============\n\nThere are three contacts defined in this model:\n\n- Automatic single surface contact for the BIW self contact\n- Surface-to-surface contact between the platen and the BIW\n- Tied contact for the spotweld beams\n\nUse the `ContactSurface()` method to set the SSTYPE and MSTYPE. The\n`PartSet()` method accepts the name of a list and converts it to\n*PART\\_SET\\_LIST*. Notice how the contact type and category can be used\nto create the three different type of contacts for this model.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "selfcontact = Contact(type=ContactType.AUTOMATIC)\nselfcontact.set_mortar()\nselfcontact.set_friction_coefficient(static=0.2)\nsurf1 = ContactSurface(PartSet(vehicle))\nselfcontact.set_slave_surface(surf1)\ncamry.contacts.add(selfcontact)\n\nplatebiw = Contact(type=ContactType.AUTOMATIC, category=ContactCategory.SURFACE_TO_SURFACE_CONTACT)\nplatebiw.set_mortar()\nplatebiw.set_friction_coefficient(static=0.2, dynamic=0.2)\nsurf1 = ContactSurface(PartSet(biw))\nsurf2 = ContactSurface(PartSet(platen))\nplatebiw.set_slave_surface(surf1)\nplatebiw.set_master_surface(surf2)\ncamry.contacts.add(platebiw)\n\nswcontact = Contact(\n type=ContactType.TIED,\n category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT,\n offset=OffsetType.CONSTRAINED_OFFSET,\n)\nspotweldbeam = ContactSurface(PartSet(spotweldbeams))\nspotweldbeam.set_contact_thickness(thickness=-0.9)\nspotweldsurface = ContactSurface(PartSet(spotweldsurfaces))\nspotweldsurface.set_contact_thickness(thickness=-0.9)\nswcontact.set_slave_surface(spotweldbeam)\nswcontact.set_master_surface(spotweldsurface)\ncamry.contacts.add(swcontact)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define SPC\n==========\n\nYou can use the `boundaryconditions` class to define both SPCs and\nprescribed motions. The bottom of the BIW is SPCed by selecting a few\nnodes. The prescribed motion is then assigned to the platen.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "camry.boundaryconditions.create_spc(NodeSet(spc))\n\ncrv = Curve(\n x=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9.77, 100],\n y=[0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 127, 127],\n)\nplaten = PartSet([50000001])\ncamry.boundaryconditions.create_imposed_motion(\n platen, crv, dof=DOF.X_TRANSLATIONAL, scalefactor=-0.0802216\n)\ncamry.boundaryconditions.create_imposed_motion(\n platen, crv, dof=DOF.Y_TRANSLATIONAL, scalefactor=-0.0802216\n)\ncamry.boundaryconditions.create_imposed_motion(\n platen, crv, dof=DOF.Z_TRANSLATIONAL, scalefactor=-0.0802216\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define database cards and save input file\n=========================================\n\nDefine the frequency of output for the binary and ASCII database outputs\nand save the input file.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "camry_solution.create_database_binary(dt=0.001)\ncamry_solution.set_output_database(\n elout=0.0001,\n glstat=0.0001,\n matsum=0.0001,\n nodout=0.0001,\n rbdout=0.0001,\n rcforc=0.0001,\n secforc=0.0001,\n)\n\ncamry_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/1a101a54ffa1198a500f49c824112a6f/icfd_cylinderflow.py b/version/0.3/_downloads/1a101a54ffa1198a500f49c824112a6f/icfd_cylinderflow.py new file mode 100644 index 000000000..b7b9113e8 --- /dev/null +++ b/version/0.3/_downloads/1a101a54ffa1198a500f49c824112a6f/icfd_cylinderflow.py @@ -0,0 +1,82 @@ +""" +Cylinder flow +============= + +This example shows how to create a simple ICFD cylinder flow input deck. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + ICFDAnalysis, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/cylinderflow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +icfd_solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.cylinder_flow + os.sep +fns.append(path + "cylinder_flow.k") +icfd_solution.open_files(fns) +# Set total time of simulation +icfd_solution.set_termination(termination_time=100) + +icfd = DynaICFD() +icfd_solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +icfd_solution.create_database_binary(dt=1) +icfd_solution.save_file() diff --git a/version/0.3/_downloads/1b07d385edd589ef392e67420f635f1d/icfd_dam_break.ipynb b/version/0.3/_downloads/1b07d385edd589ef392e67420f635f1d/icfd_dam_break.ipynb new file mode 100644 index 000000000..d9abf27f2 --- /dev/null +++ b/version/0.3/_downloads/1b07d385edd589ef392e67420f635f1d/icfd_dam_break.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Dam break\n=========\n\nThis example shows how to use the ICFD solver on a simple free surface.\nA column of water collapses under the load of gravity. The executable\nfile for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n Gravity,\n GravityOption,\n Compressible\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.dam_break + os.sep\nfns.append(path + \"dam_break.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=50)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001)\nmat2 = MatICFD(flag=Compressible.VACUUM)\n\npart1 = ICFDPart(1)\npart1.set_material(mat1)\npart1.set_free_slip()\nicfd.parts.add(part1)\n\npart2 = ICFDPart(2)\npart2.set_material(mat2)\npart2.set_free_slip()\nicfd.parts.add(part2)\n\npart3 = ICFDPart(3)\npart3.set_material(mat1)\nicfd.parts.add(part3)\n\ng = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[9.81, 9.81]))\nicfd.add(g)\n\npartvol1 = ICFDVolumePart(surfaces=[1, 3])\npartvol1.set_material(mat1)\nicfd.parts.add(partvol1)\n\npartvol2 = ICFDVolumePart(surfaces=[2, 3])\npartvol2.set_material(mat2)\nicfd.parts.add(partvol2)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2])\nmeshvol.set_fluid_interfaces([3])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.2)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/1ec155e34236e6b4c74f471b0380b354/rigidtest.ipynb b/version/0.3/_downloads/1ec155e34236e6b4c74f471b0380b354/rigidtest.ipynb new file mode 100644 index 000000000..0523cbbaf --- /dev/null +++ b/version/0.3/_downloads/1ec155e34236e6b4c74f471b0380b354/rigidtest.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Rigid test\n==========\n\nThis examples show how to use the PyDYNA `pre` service to create an ISPH\nmodel. The executable file for LS-DYNA is\n`ls-dyna_mpp_d_R13.0_365-gf8a97bda2a_winx64_ifort190_msmpi.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamaterial import (\n MatRigid,\n MatSPHIncompressibleFluid,\n MatSPHIncompressibleStructure,\n)\nfrom ansys.dyna.core.pre.dynaisph import (\n DynaISPH,\n Box,\n Point,\n Curve,\n PartSet,\n ShellPart,\n ShellFormulation,\n ISPHStructPart,\n ISPHFluidPart,\n DOF,\n Motion,\n Gravity,\n GravityOption,\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nisphsolution = DynaSolution(hostname)\nfns = []\npath = examples.isph_rigidtest + os.sep\nfns.append(path + \"rigidtest.k\")\nisphsolution.open_files(fns)\n\nisphsolution.set_termination(0.5)\n\nisphobj = DynaISPH()\nisphsolution.add(isphobj)\n\nisphobj.set_timestep(\n tssfac=1, max_timestep=Curve(x=[0, 0.04, 0.05, 0.1, 100], y=[0.5, 0.5, 1, 1, 1])\n)\nisphobj.isphanalysis.set_box(Box(-750, 800, -800, 800, -100, 3000))\n\nplatemat1 = MatRigid(\n mass_density=1e-9,\n young_modulus=10,\n center_of_mass_constraint=1,\n translational_constraint=5,\n rotational_constraint=4,\n)\nplatemat2 = MatRigid(\n mass_density=1e-9,\n young_modulus=10,\n center_of_mass_constraint=1,\n translational_constraint=7,\n rotational_constraint=7,\n)\n# platemat3 = MatRigid(mass_density=1e-9,young_modulus=10)\n# matelastic = MatElastic(mass_density=1e-9,young_modulus=1)\nmatsphfluid = MatSPHIncompressibleFluid(\n mass_density=1e-9, dynamic_viscosity=1e-9, tension_coefficient1=1e6, tension_coefficient2=1000\n)\nmatsphstruct = MatSPHIncompressibleStructure(mass_density=1e-9)\n\nsensorplane = ShellPart(1)\nsensorplane.set_material(platemat2)\nsensorplane.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nsensorplane.set_thickness(0.1)\nisphobj.parts.add(sensorplane)\n\nmovingcube = ShellPart(7)\nmovingcube.set_material(platemat1)\nmovingcube.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nmovingcube.set_thickness(0.1)\nisphobj.parts.add(movingcube)\n\nwallsmesh = ShellPart(8)\nwallsmesh.set_material(platemat2)\nwallsmesh.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nwallsmesh.set_thickness(0.1)\nisphobj.parts.add(wallsmesh)\n\nsphwall = ISPHStructPart(4, PartSet([8]), 12)\nsphwall.set_material(matsphstruct)\nsphwall.set_smoothing_length(1, 1, 1, 12)\nisphobj.parts.add(sphwall)\n\nsphcube = ISPHStructPart(5, PartSet([7]), 12)\nsphcube.set_material(matsphstruct)\nsphcube.set_smoothing_length(1, 1, 1, 12)\nisphobj.parts.add(sphcube)\n\nsphwater = ISPHFluidPart(6, Point(-588, -588, 9), Point(1176, 1176, 204), 98, 98, 17)\nsphwater.set_material(matsphfluid)\nsphwater.set_smoothing_length(1, 1, 1, 12)\nsphwater.create_massflow_plane(PartSet([1]))\nisphobj.parts.add(sphwater)\n\n# Constraint\nisphobj.constraints.merge_two_rigid_bodies(7, 1)\n\n# Define boundary conddition\nisphobj.boundaryconditions.create_imposed_motion(\n PartSet([7]),\n Curve(x=[0, 0.1, 0.11, 20], y=[3000, 3000, 0, 0]),\n dof=DOF.X_TRANSLATIONAL,\n motion=Motion.VELOCITY,\n)\nisphobj.boundaryconditions.create_imposed_motion(\n PartSet([7]),\n Curve(x=[0, 0.1, 0.11, 20], y=[500, 500, 500, 500]),\n dof=DOF.Z_ROTATIONAL,\n motion=Motion.VELOCITY,\n scalefactor=0.01,\n)\n\n# Load\ng = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 100], y=[9810, 9810]))\nisphobj.add(g)\n\nisphsolution.set_output_database(glstat=0.001, sphmassflow=0.001)\nisphsolution.create_database_binary(dt=0.01)\nisphsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/220449ba0d8ffa6e2f805998039f9539/icfd_dam_break.py b/version/0.3/_downloads/220449ba0d8ffa6e2f805998039f9539/icfd_dam_break.py new file mode 100644 index 000000000..aa9d3949d --- /dev/null +++ b/version/0.3/_downloads/220449ba0d8ffa6e2f805998039f9539/icfd_dam_break.py @@ -0,0 +1,83 @@ +""" +Dam break +========= + +This example shows how to use the ICFD solver on a simple free surface. +A column of water collapses under the load of gravity. The executable file +for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Gravity, + GravityOption, + Compressible +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/dam_break.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.dam_break + os.sep +fns.append(path + "dam_break.k") +solution.open_files(fns) +solution.set_termination(termination_time=50) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001) +mat2 = MatICFD(flag=Compressible.VACUUM) + +part1 = ICFDPart(1) +part1.set_material(mat1) +part1.set_free_slip() +icfd.parts.add(part1) + +part2 = ICFDPart(2) +part2.set_material(mat2) +part2.set_free_slip() +icfd.parts.add(part2) + +part3 = ICFDPart(3) +part3.set_material(mat1) +icfd.parts.add(part3) + +g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[9.81, 9.81])) +icfd.add(g) + +partvol1 = ICFDVolumePart(surfaces=[1, 3]) +partvol1.set_material(mat1) +icfd.parts.add(partvol1) + +partvol2 = ICFDVolumePart(surfaces=[2, 3]) +partvol2.set_material(mat2) +icfd.parts.add(partvol2) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2]) +meshvol.set_fluid_interfaces([3]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.2) +solution.save_file() diff --git a/version/0.3/_downloads/225effe935a4e99c765ceac6aa6ff116/em_rlc_isopotential.py b/version/0.3/_downloads/225effe935a4e99c765ceac6aa6ff116/em_rlc_isopotential.py new file mode 100644 index 000000000..ae9c24895 --- /dev/null +++ b/version/0.3/_downloads/225effe935a4e99c765ceac6aa6ff116/em_rlc_isopotential.py @@ -0,0 +1,69 @@ +""" +RLC circuit by isopotential +=========================== +This example shows how to use the corresponding ``contype`` in the +``connect_isopotential()`` method to define an RLC circuit as an +inlet boundary condition. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +""" + +import os +import sys + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaem import ( + DynaEM, + NodeSet, + SegmentSet, + SolidPart, + SolidFormulation, + EMType, + Isopotential_ConnType, + Isopotential, + RogoCoil, +) +from ansys.dyna.core.pre.dynamaterial import MatRigid,EMMATTYPE +from em_set_data import rlc_rogoseg +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/em/rlc_isopotential.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +fns = [] +path = examples.em_rlc_isopotential + os.sep +fns.append(path + "em_rlc_isopotential.k") +solution.open_files(fns) +solution.set_termination(termination_time=0.01) +solution.create_database_binary(dt=1e-4) + +emobj = DynaEM() +solution.add(emobj) + +emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + +emobj.analysis.set_timestep(timestep=1e-4) +emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING) + +matrigid = MatRigid(mass_density=7000, young_modulus=2e11,center_of_mass_constraint=1,translational_constraint=7,rotational_constraint=7) +matrigid.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + +part1 = SolidPart(1) +part1.set_material(matrigid) +part1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +emobj.parts.add(part1) + +nset1 = NodeSet([429,433,437,441,445,449,453,457,461,465,469,473,477,481,485,489,493,497,501,505,509,513,517,521,525]) +nset2 = NodeSet([26,31,36,41,46,51,56,61,66,71,76,81,86,91,96,101,106,111,116,121,126,131,136,141,146]) +isopos_conn1 = Isopotential(nset1) +isopos_conn2 = Isopotential(nset2) +emobj.connect_isopotential(contype = Isopotential_ConnType.RLC_CIRCUIT,isopotential1 = isopos_conn1,value=5e-4,inductance=7.8e-5,capacity=0.0363,initial_voltage=5000) +emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = isopos_conn2) +emobj.add(RogoCoil(SegmentSet(rlc_rogoseg))) + +emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + +solution.save_file() diff --git a/version/0.3/_downloads/25de11a0620151df3876302373b85a20/icfd_internal_3d_flow.py b/version/0.3/_downloads/25de11a0620151df3876302373b85a20/icfd_internal_3d_flow.py new file mode 100644 index 000000000..9dbb8d834 --- /dev/null +++ b/version/0.3/_downloads/25de11a0620151df3876302373b85a20/icfd_internal_3d_flow.py @@ -0,0 +1,81 @@ +""" +Internal 3D flow +================ + +This example shows a simple 3D ICFD problem. +The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ICFD_SurfRemeshMethod +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/internal_3d_flow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.internal_3d_flow + os.sep +fns.append(path + "internal_3d_flow.k") +solution.open_files(fns) +solution.set_termination(termination_time=10) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(timestep=0.05) +icfdanalysis.set_volume_mesh(mesh_growth_scale_factor=1.1) +icfdanalysis.set_surface_mesh(remesh_method = ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING) +icfd.add(icfdanalysis) +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +part_inflow.set_boundary_layer_symmetry_condition() +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +part_outflow.set_boundary_layer_symmetry_condition() +part_outflow.compute_flux() +icfd.parts.add(part_outflow) + +part_wall = ICFDPart(3) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.set_boundary_layer(2) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.3/_downloads/2987fa9c38b9ff89d53308f8acc39fad/icfd_strong_fsi.ipynb b/version/0.3/_downloads/2987fa9c38b9ff89d53308f8acc39fad/icfd_strong_fsi.ipynb new file mode 100644 index 000000000..0415822b8 --- /dev/null +++ b/version/0.3/_downloads/2987fa9c38b9ff89d53308f8acc39fad/icfd_strong_fsi.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Strong FSI\n==========\n\nThis example shows a simple FSI (fluid-structure interaction) coupling\nproblem using strong FSI. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n ShellPart,\n ShellFormulation,\n PartSet,\n Curve,\n DOF,\n Motion\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.strong_fsi + os.sep\nfns.append(path + \"strong_fsi.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfdanalysis.set_fsi()\nicfd.add(icfdanalysis)\n\nicfd.implicitanalysis.set_initial_timestep_size(\n size=10\n)\nicfd.implicitanalysis.set_dynamic(gamma=0.6, beta=0.4)\nicfd.implicitanalysis.set_solution(\n iteration_limit=100, stiffness_reformation_limit=150\n)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.set_fsi()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\n#define rigid cylinder\nmatrigid = MatRigid(mass_density=1.2,young_modulus=2e11,poisson_ratio=0.3)\ncylinder = ShellPart(1)\ncylinder.set_material(matrigid)\ncylinder.set_element_formulation(ShellFormulation.PLANE_STRESS)\nicfd.parts.add(cylinder)\n# Define boundary conddition\nicfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY)\n\nsolution.create_database_binary(dt=0.1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/2ea9b215ea6bbb3a321df65967122d5d/icfd_mesh_adaptivity.py b/version/0.3/_downloads/2ea9b215ea6bbb3a321df65967122d5d/icfd_mesh_adaptivity.py new file mode 100644 index 000000000..a0a00d7bb --- /dev/null +++ b/version/0.3/_downloads/2ea9b215ea6bbb3a321df65967122d5d/icfd_mesh_adaptivity.py @@ -0,0 +1,85 @@ +""" +Mesh adaptivity +=============== + +This example shows a simple ICFD problem with adaptivity. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/mesh_adaptivity.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.mesh_adaptivity + os.sep +fns.append(path + "mesh_adaptivity.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfdanalysis.set_mesh_adaptivity(min_mesh_size=0.02,max_mesh_size=0.2,max_perceptual_error=2,num_iteration=10) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=2) +icfd.parts.add(part_wall) + +part_meshsize = ICFDPart(5) +part_meshsize.set_material(mat) +icfd.parts.add(part_meshsize) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.5) +solution.save_file() diff --git a/version/0.3/_downloads/2f42ddca4a14b183b375d5ffe7f929c8/em_resistive_heating.ipynb b/version/0.3/_downloads/2f42ddca4a14b183b375d5ffe7f929c8/em_resistive_heating.ipynb new file mode 100644 index 000000000..b5e42ff30 --- /dev/null +++ b/version/0.3/_downloads/2f42ddca4a14b183b375d5ffe7f929c8/em_resistive_heating.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Resistive heating\n=================\n\nThis example shows the minimum number of keywords required to turn on\nthe EM resistive heating solver. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaem import (\n DynaEM,\n NodeSet,\n Curve,\n SolidPart,\n SolidFormulation,\n FEMSOLVER,\n ThermalAnalysis,\n ThermalAnalysisType,\n EMType\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatElastic,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1\nfrom em_set_data import *\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.em_resistive_heating + os.sep\nfns.append(path + \"em_resistive_heating.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=20)\nsolution.create_database_binary(dt=0.1)\n\nemobj = DynaEM()\nsolution.add(emobj)\n\nemobj.set_timestep(timestep_size_for_mass_scaled=0.01,max_timestep=Curve(x=[0,9.9999997474e-5],y=[0.01,0.01]))\n\nemobj.analysis.set_timestep(timestep=0.01)\nemobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING)\nemobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3)\n\ntanalysis = ThermalAnalysis()\ntanalysis.set_timestep(initial_timestep=0.05)\ntanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT)\nemobj.add(tanalysis)\n\nmatelastic1 = MatElastic(mass_density=8000, young_modulus=1e11, poisson_ratio=0.33)\nmatelastic2 = MatElastic(mass_density=7000, young_modulus=1e11, poisson_ratio=0.33)\nmatelastic1.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=6e7)\nmatelastic2.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=4e6,eos=EMEOSTabulated1(Curve(x=[0, 25, 50, 100], y=[4e6, 4e6, 4e5, 4e5])))\n\nmatthermaliso1 = MatThermalIsotropic(density=8000,specific_heat=400, conductivity=400)\nmatthermaliso2 = MatThermalIsotropic(density=7000,specific_heat=450, conductivity=40)\n\npart2 = SolidPart(2)\npart2.set_material(matelastic1,matthermaliso1)\npart2.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nemobj.parts.add(part2)\n\npart3 = SolidPart(3)\npart3.set_material(matelastic1,matthermaliso1)\npart3.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nemobj.parts.add(part3)\n\npart1 = SolidPart(1)\npart1.set_material(matelastic2,matthermaliso2)\npart1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nemobj.parts.add(part1)\n\nemobj.boundaryconditions.create_temperature(NodeSet(resistive_heating_tmp), scalefactor=50)\nemobj.set_init_temperature(temp=25)\n\nemobj.create_em_output(mats=2, matf=2, sols=2, solf=2)\n\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/3120a704a273732a88354748305c8e04/icfd_weak_fsi.py b/version/0.3/_downloads/3120a704a273732a88354748305c8e04/icfd_weak_fsi.py new file mode 100644 index 000000000..1f7d7efc4 --- /dev/null +++ b/version/0.3/_downloads/3120a704a273732a88354748305c8e04/icfd_weak_fsi.py @@ -0,0 +1,101 @@ +""" +Weak FSI +======== + +This example shows a simple FSI (fluid-structure interaction) coupling problem +using weak/loose/explicit FSI. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ShellPart, + ShellFormulation, + PartSet, + Curve, + DOF, + Motion +) +from ansys.dyna.core.pre.dynamaterial import MatRigid +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/weak_fsi.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.weak_fsi + os.sep +fns.append(path + "weak_fsi.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfd.set_timestep(tssfac=0.9,max_timestep=Curve(x=[0,10000],y=[0.05,0.05])) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfdanalysis.set_fsi() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.set_fsi() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +#define rigid cylinder +matrigid = MatRigid(mass_density=1000,young_modulus=2e11,poisson_ratio=0.3) +cylinder = ShellPart(1) +cylinder.set_material(matrigid) +cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS) +icfd.parts.add(cylinder) +# Define boundary conddition +icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY) + +solution.create_database_binary(dt=0.2) +solution.save_file() diff --git a/version/0.3/_downloads/316dc8e808c890bbb2d9d3adafb25fac/icfd_mesh_morphing.py b/version/0.3/_downloads/316dc8e808c890bbb2d9d3adafb25fac/icfd_mesh_morphing.py new file mode 100644 index 000000000..4105b86d7 --- /dev/null +++ b/version/0.3/_downloads/316dc8e808c890bbb2d9d3adafb25fac/icfd_mesh_morphing.py @@ -0,0 +1,90 @@ +""" +Mesh morphing +============= + +This example shows a simple ICFD problem with mesh morphing. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/mesh_morphing.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.mesh_morphing + os.sep +fns.append(path + "mesh_morphing.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=2) +part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) +icfd.parts.add(part_wall) + +part_meshmorph = ICFDPart(5) +part_meshmorph.set_material(mat) +icfd.parts.add(part_meshmorph) + +partvol1 = ICFDVolumePart(surfaces=[1, 2, 3, 5]) +partvol1.set_material(mat) +icfd.parts.add(partvol1) +partvol2 = ICFDVolumePart(surfaces=[5, 4]) +partvol2.set_material(mat) +partvol2.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) +icfd.parts.add(partvol2) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +meshvol.set_fluid_interfaces([5]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.5) +solution.save_file() diff --git a/version/0.3/_downloads/3762eb96bf39f8b01034ec6d8e400a90/icfd_mesh_size.py b/version/0.3/_downloads/3762eb96bf39f8b01034ec6d8e400a90/icfd_mesh_size.py new file mode 100644 index 000000000..0c0619b94 --- /dev/null +++ b/version/0.3/_downloads/3762eb96bf39f8b01034ec6d8e400a90/icfd_mesh_size.py @@ -0,0 +1,85 @@ +""" +Mesh size +========== + +This example shows a simple ICFD input deck with a coarse mesh. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/mesh_size.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.mesh_size + os.sep +fns.append(path + "mesh_size.k") +solution.open_files(fns) +solution.set_termination(termination_time=50) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=2) +icfd.parts.add(part_wall) + +part_meshsize = ICFDPart(5) +part_meshsize.set_material(mat) +icfd.parts.add(part_meshsize) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +meshvol.set_meshsize([5]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.3/_downloads/557451bf975d8f7c5fd2b858396c5b06/sale_efp.py b/version/0.3/_downloads/557451bf975d8f7c5fd2b858396c5b06/sale_efp.py new file mode 100644 index 000000000..2457adb65 --- /dev/null +++ b/version/0.3/_downloads/557451bf975d8f7c5fd2b858396c5b06/sale_efp.py @@ -0,0 +1,100 @@ +""" +EFP concrete target +=================== + +This example shows how to create a S-ALE input deck. +The executable file for LS-DYNA is ``ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. +""" + +import os +import sys + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynasale import ( + DynaSALE, + ControlPoint, + AdvectionMethod, + StructuredMesh, + FillDirection, + Point, +) +from ansys.dyna.core.pre import dynamaterial as matDB +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/sale/efpcase.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +efp_solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.sale_efp + os.sep +fns.append(path + "efpcase.k") +efp_solution.open_files(fns) + +# set termination +efp_solution.set_termination(280) + +efp = DynaSALE() +efp_solution.add(efp) + +# set post result ouput interval +efp.set_output_interval(5.0) + +# set analysis type +efp.set_analysis_type(method=AdvectionMethod.VAN_LEER_WITH_HIS) + +# define mesh +control_points_x = [ + ControlPoint(number=1, position=0, ratio=1), + ControlPoint(number=11, position=-2.5, ratio=0.5), + ControlPoint(number=21, position=0, ratio=0.5), + ControlPoint(number=31, position=0, ratio=1), +] + +control_points_y = [ + ControlPoint(number=1, position=0, ratio=1), + ControlPoint(number=11, position=-2.5, ratio=0.5), + ControlPoint(number=21, position=0, ratio=0.5), + ControlPoint(number=31, position=0, ratio=1), +] + +control_points_z = [ + ControlPoint(number=1, position=0, ratio=0.5), + ControlPoint(number=269, position=11, ratio=0.25), + ControlPoint(number=309, position=21, ratio=0.25), + ControlPoint(number=339, position=0, ratio=5), +] + +mesh = StructuredMesh(control_points_x, control_points_y, control_points_z) +efp.add(mesh) + +# fill material +vacuum = matDB.Vacuum() +mesh.fill(vacuum) +air = matDB.Air() +mesh.fill(air, geometry_type="ALL", reference_pressure=1.01325e-6) +he = matDB.HighExplosive() +mesh.fill( + he, + geometry_type="PART", + define_geometry_parameters=[23], + inout=FillDirection.OUTSIDE_THE_GEOMETRY, +) +liner = matDB.Liner() +mesh.fill( + liner, + geometry_type="PART", + define_geometry_parameters=[22], + inout=FillDirection.OUTSIDE_THE_GEOMETRY, +) + +# Set the initial conditions +mesh.initial_detonation(Point(0, 0, 19.33)) + +# set outut datebase +efp_solution.set_output_database(matsum=0.2, glstat=0.2) + +# save file on server end +efp_solution.save_file() diff --git a/version/0.3/_downloads/632dc33878e3c2b6f81e5812685dad17/airbag_post.py b/version/0.3/_downloads/632dc33878e3c2b6f81e5812685dad17/airbag_post.py new file mode 100644 index 000000000..a41101ed3 --- /dev/null +++ b/version/0.3/_downloads/632dc33878e3c2b6f81e5812685dad17/airbag_post.py @@ -0,0 +1,73 @@ +""" +Airbag deploy postprocessing +---------------------------- +This example shows how to animate the d3plot and display the stress on the airbag. + +""" +############################################################################### +# Perform required imports +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Import required imports. +# +from ansys.dpf import core as dpf +from ansys.dpf.core import examples + +############################################################################### +# Connect to DPF Server +# ~~~~~~~~~~~~~~~~~~~~~ +# Connect to the DPF Server. +# +dpf.connect_to_server() + +############################################################################### +# Load model +# ~~~~~~~~~~ +# Load the model and print the contents of the model. All parts in the model +# are shell parts. Model information includes the result components and the +# number of states available in the d3plot. +# +""" ds = dpf.DataSources() +ds.set_result_file_path(r'D:\PYDYNA_BETA_V.0.1\example-data\pydyna\Airbag\d3plot', 'd3plot') +model = dpf.Model(ds) +print(model) """ + +############################################################################### +# Extract stress on all parts +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Extract the stress on all the parts. The stress fields container is scoped to +# all time frequencies to be able to animate the change in stress on the +# airbag fabric. +# +""" stress = model.results.stress.on_all_time_freqs() +stress.inputs.data_sources(ds) +stress.inputs.requested_location.connect("Nodal") +fieldsStr = stress.outputs.fields_container()""" + +############################################################################### +# Extract stress on mid integration point +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# In the d3plot file, the shell stress is reported at three through-thickness +# points by default. Extract the stress on the mid integration point. +# +""" shell_layer_extract = dpf.operators.utility.change_shell_layers() +shell_layer_extract.inputs.fields_container.connect(fieldsStr) +shell_layer_extract.inputs.e_shell_layer.connect(dpf.common.shell_layers.mid.value) +fields_top = shell_layer_extract.outputs.fields_container_as_fields_container() """ + +############################################################################### +# Plot deformed state +# ~~~~~~~~~~~~~~~~~~~ +# Plot the deformed state at 9 ms. +# +""" N = fields_top[19] +D = model.results.displacement(time_scoping=[19]).eval() +N.plot(deform_by=D[0],show_edges=False) """ + +############################################################################### +# Display stress field and set mesh +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Display the stress field and set the mesh to deform by the displacement of +# the nodes. +# +""" disp = model.results.displacement.on_all_time_freqs.eval() +fields_top.animate(deform_by=disp,show_edges=False) """ \ No newline at end of file diff --git a/version/0.3/_downloads/641e8ca7397ddfb3c989598901785a70/frf_plate_damping.ipynb b/version/0.3/_downloads/641e8ca7397ddfb3c989598901785a70/frf_plate_damping.ipynb new file mode 100644 index 000000000..55c8c5108 --- /dev/null +++ b/version/0.3/_downloads/641e8ca7397ddfb3c989598901785a70/frf_plate_damping.ipynb @@ -0,0 +1,212 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "FRF for a rectangular plate\n===========================\n\nThis example shows how to set up the keywords for computation of a FRF\n(frequency response function). The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Perform required imports\n========================\n\nPeform required imports.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamaterial import MatElastic\nfrom ansys.dyna.core.pre.dynanvh import (\n DynaNVH,\n FrequencyDomain,\n ExcitationDOF,\n Curve,\n NodeSet,\n ShellPart,\n ShellFormulation,\n ResponseDOF,\n ResponseType,\n)\nfrom ansys.dyna.core.pre import examples" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Manually start the `pre` service\n================================\n\nCopy the `pyDyna/src/ansys/dyna/core/pre/Server`folder to a desired\nlocation. Start the `pre` service at this location by running this\ncommand:\n\n`python kwserver.py`\n\nOnce the `pre` servic is running, you can connect a client to it using\nthe hostname and the port. This example uses the default local host and\nport (`\"localhost\"` and `\"50051\"` respectively).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "hostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nsolution = DynaSolution(hostname)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Import the initial mesh data (nodes and elements)\n=================================================\n\nImport mesh data, which includes the predefined *NODE*, *ELEMENT\\_* and\n*PART* cards.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fns = []\npath = examples.nvh_frf_plate_damping + os.sep\nfns.append(path + \"frf_plate_damping.k\")\nsolution.open_files(fns)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define global control cards\n===========================\n\nDefine the global control cards.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nvhobj = DynaNVH()\nsolution.add(nvhobj)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set initial timestep size\n=========================\n\nSet the initial timestep size in CONTROL\\_IMPLICIT\\_GENERAL.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nvhobj.implicitanalysis.set_initial_timestep_size(1.0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set number of eigen modes\n=========================\n\nSet the number of eigen modes to `100`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define linear solver\n====================\n\nDefine the linear solver by setting NSOLVR to `1` in\nCONTROL\\_IMPLICIT\\_SOLUTION.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "nvhobj.implicitanalysis.set_solution(solution_method=1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define frequency domain cards\n=============================\n\n*FREQUENCY\\_DOMAIN\\_FRF* is used to compute the frequency response\nfunction due to nodal excitations. In this case, a base velocity is\ndefine as an input at node 131. The base acceleration response is\nmeasured at nodes 131 and 651. The maximum natural frequency employed in\nFRF is limited to 2000 Hz.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fd = FrequencyDomain()\ncrv = Curve(\n x=[1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 200],\n y=[0, 0, 0.0045, 0.00713, 0.00386, 0.00328, 0.0034, 0.00624, 7.2e-4, 8.3e-4, 0, 0],\n)\nfd.set_frequency_response_function(\n excitation_input_set=NodeSet([131]),\n excitation_input_dof=ExcitationDOF.Z,\n max_natural_frequency=2000,\n modal_damping_coefficient_curve_type=1,\n modal_damping_coefficient_curve=crv,\n response_output_set=NodeSet([131, 651]),\n response_output_dof=ResponseDOF.Z,\n response_output_type=ResponseType.BASE_ACCELERATION,\n frf_output_min_frequency=1,\n frf_output_max_frequency=400,\n frf_output_num_frequency=400,\n)\nnvhobj.add(fd)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material and section properties\n======================================\n\nDefine the `MAT_ELASTIC` material. Set shell formulation to\n\\`\\`SR\\_HUGHES\\_LIU.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "matelastic = MatElastic(mass_density=7870, young_modulus=2.07e11, poisson_ratio=0.292)\n\nboxshell = ShellPart(1)\nboxshell.set_material(matelastic)\nboxshell.set_element_formulation(ShellFormulation.SR_HUGHES_LIU)\nboxshell.set_thickness(0.002)\nboxshell.set_shear_factor(0.833)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set printout property and save input deck\n=========================================\n\nUse the `set_printout()` method to set the printout property to `3`.\nSave the input deck.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "boxshell.set_printout(3)\nnvhobj.parts.add(boxshell)\n\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/69246894ad7ee81da23aebe12fa78d56/icfd_mesh_size.ipynb b/version/0.3/_downloads/69246894ad7ee81da23aebe12fa78d56/icfd_mesh_size.ipynb new file mode 100644 index 000000000..d17ec0036 --- /dev/null +++ b/version/0.3/_downloads/69246894ad7ee81da23aebe12fa78d56/icfd_mesh_size.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Mesh size\n=========\n\nThis example shows a simple ICFD input deck with a coarse mesh. The\nexecutable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.mesh_size + os.sep\nfns.append(path + \"mesh_size.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=50)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=2)\nicfd.parts.add(part_wall)\n\npart_meshsize = ICFDPart(5)\npart_meshsize.set_material(mat)\nicfd.parts.add(part_meshsize)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nmeshvol.set_meshsize([5])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/71b33baae77c0a71116f1167815d26f0/em_resistive_heating.py b/version/0.3/_downloads/71b33baae77c0a71116f1167815d26f0/em_resistive_heating.py new file mode 100644 index 000000000..c0dd30d57 --- /dev/null +++ b/version/0.3/_downloads/71b33baae77c0a71116f1167815d26f0/em_resistive_heating.py @@ -0,0 +1,84 @@ +""" +Resistive heating +================= + +This example shows the minimum number of keywords required to turn on the +EM resistive heating solver. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaem import ( + DynaEM, + NodeSet, + Curve, + SolidPart, + SolidFormulation, + FEMSOLVER, + ThermalAnalysis, + ThermalAnalysisType, + EMType +) +from ansys.dyna.core.pre.dynamaterial import MatElastic,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1 +from em_set_data import * +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/em/em_resistive_heating.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +fns = [] +path = examples.em_resistive_heating + os.sep +fns.append(path + "em_resistive_heating.k") +solution.open_files(fns) +solution.set_termination(termination_time=20) +solution.create_database_binary(dt=0.1) + +emobj = DynaEM() +solution.add(emobj) + +emobj.set_timestep(timestep_size_for_mass_scaled=0.01,max_timestep=Curve(x=[0,9.9999997474e-5],y=[0.01,0.01])) + +emobj.analysis.set_timestep(timestep=0.01) +emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING) +emobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3) + +tanalysis = ThermalAnalysis() +tanalysis.set_timestep(initial_timestep=0.05) +tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) +emobj.add(tanalysis) + +matelastic1 = MatElastic(mass_density=8000, young_modulus=1e11, poisson_ratio=0.33) +matelastic2 = MatElastic(mass_density=7000, young_modulus=1e11, poisson_ratio=0.33) +matelastic1.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=6e7) +matelastic2.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=4e6,eos=EMEOSTabulated1(Curve(x=[0, 25, 50, 100], y=[4e6, 4e6, 4e5, 4e5]))) + +matthermaliso1 = MatThermalIsotropic(density=8000,specific_heat=400, conductivity=400) +matthermaliso2 = MatThermalIsotropic(density=7000,specific_heat=450, conductivity=40) + +part2 = SolidPart(2) +part2.set_material(matelastic1,matthermaliso1) +part2.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +emobj.parts.add(part2) + +part3 = SolidPart(3) +part3.set_material(matelastic1,matthermaliso1) +part3.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +emobj.parts.add(part3) + +part1 = SolidPart(1) +part1.set_material(matelastic2,matthermaliso2) +part1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +emobj.parts.add(part1) + +emobj.boundaryconditions.create_temperature(NodeSet(resistive_heating_tmp), scalefactor=50) +emobj.set_init_temperature(temp=25) + +emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + +solution.save_file() diff --git a/version/0.3/_downloads/7234df4157bdc1351f6df25383a34811/icfd_imposed_move.py b/version/0.3/_downloads/7234df4157bdc1351f6df25383a34811/icfd_imposed_move.py new file mode 100644 index 000000000..27bee8289 --- /dev/null +++ b/version/0.3/_downloads/7234df4157bdc1351f6df25383a34811/icfd_imposed_move.py @@ -0,0 +1,83 @@ +""" +Imposed move +============ + +This example shows how to impose displacements on fluid nodes through the +use of the ``ICFD_CONTROL_IMPOSED_MOVE`` keyword. The executable file for +LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Curve + ) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/imposed_move.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.imposed_move + os.sep +fns.append(path + "imposed_move.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=0.5) +solution.save_file() diff --git a/version/0.3/_downloads/742ba0a1cc9342277b608285746b2314/icfd_thermal_flow.ipynb b/version/0.3/_downloads/742ba0a1cc9342277b608285746b2314/icfd_thermal_flow.ipynb new file mode 100644 index 000000000..b7ae9dc36 --- /dev/null +++ b/version/0.3/_downloads/742ba0a1cc9342277b608285746b2314/icfd_thermal_flow.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Thermal flow\n============\n\nThis example shows a simple ICFD forced-convection input deck with a\ncoarse mesh. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.thermal_flow + os.sep\nfns.append(path + \"thermal_flow.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=100)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005,heat_capacity = 1000,thermal_conductivity=200)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\npart_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[20, 20]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[80, 80]))\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\nicfd.parts.add(part_wall)\n\nicfd.set_initial(temperature=10)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3,4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/7b1802958cf339ccc8ce45783df382f0/frf_plate_damping.py b/version/0.3/_downloads/7b1802958cf339ccc8ce45783df382f0/frf_plate_damping.py new file mode 100644 index 000000000..22a7b43f1 --- /dev/null +++ b/version/0.3/_downloads/7b1802958cf339ccc8ce45783df382f0/frf_plate_damping.py @@ -0,0 +1,136 @@ +""" +FRF for a rectangular plate +=========================== + +This example shows how to set up the keywords for computation of a FRF (frequency response function). +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +""" +############################################################################### +# Perform required imports +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Peform required imports. +# +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamaterial import MatElastic +from ansys.dyna.core.pre.dynanvh import ( + DynaNVH, + FrequencyDomain, + ExcitationDOF, + Curve, + NodeSet, + ShellPart, + ShellFormulation, + ResponseDOF, + ResponseType, +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/nvh/frf_plate_damping.png' +############################################################################### +# Manually start the ``pre`` service +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Copy the ``pyDyna/src/ansys/dyna/core/pre/Server``folder to a desired location. +# Start the ``pre`` service at this location by running this command: +# +# ``python kwserver.py`` +# +# Once the ``pre`` servic is running, you can connect a client to it using +# the hostname and the port. This example uses the default local host and port +# (``"localhost"`` and ``"50051"`` respectively). +# +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +solution = DynaSolution(hostname) +############################################################################### +# Import the initial mesh data (nodes and elements) +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Import mesh data, which includes the predefined *NODE*, *ELEMENT_* and *PART* +# cards. +# +fns = [] +path = examples.nvh_frf_plate_damping + os.sep +fns.append(path + "frf_plate_damping.k") +solution.open_files(fns) + +############################################################################### +# Define global control cards +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define the global control cards. + +nvhobj = DynaNVH() +solution.add(nvhobj) +############################################################################### +# Set initial timestep size +# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# Set the initial timestep size in CONTROL_IMPLICIT_GENERAL. +# +nvhobj.implicitanalysis.set_initial_timestep_size(1.0) + +############################################################################### +# Set number of eigen modes +# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# Set the number of eigen modes to ``100``. +# +nvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100) + +############################################################################### +# Define linear solver +# ~~~~~~~~~~~~~~~~~~~~ +# Define the linear solver by setting NSOLVR to ``1`` in CONTROL_IMPLICIT_SOLUTION. +nvhobj.implicitanalysis.set_solution(solution_method=1) + +############################################################################### +# Define frequency domain cards +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# *FREQUENCY_DOMAIN_FRF* is used to compute the frequency response function due to +# nodal excitations. In this case, a base velocity is define as an input at node 131. +# The base acceleration response is measured at nodes 131 and 651. The maximum +# natural frequency employed in FRF is limited to 2000 Hz. +fd = FrequencyDomain() +crv = Curve( + x=[1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 200], + y=[0, 0, 0.0045, 0.00713, 0.00386, 0.00328, 0.0034, 0.00624, 7.2e-4, 8.3e-4, 0, 0], +) +fd.set_frequency_response_function( + excitation_input_set=NodeSet([131]), + excitation_input_dof=ExcitationDOF.Z, + max_natural_frequency=2000, + modal_damping_coefficient_curve_type=1, + modal_damping_coefficient_curve=crv, + response_output_set=NodeSet([131, 651]), + response_output_dof=ResponseDOF.Z, + response_output_type=ResponseType.BASE_ACCELERATION, + frf_output_min_frequency=1, + frf_output_max_frequency=400, + frf_output_num_frequency=400, +) +nvhobj.add(fd) + +############################################################################### +# Define material and section properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define the ``MAT_ELASTIC`` material. Set shell formulation to ``SR_HUGHES_LIU. +# +matelastic = MatElastic(mass_density=7870, young_modulus=2.07e11, poisson_ratio=0.292) + +boxshell = ShellPart(1) +boxshell.set_material(matelastic) +boxshell.set_element_formulation(ShellFormulation.SR_HUGHES_LIU) +boxshell.set_thickness(0.002) +boxshell.set_shear_factor(0.833) + +############################################################################### +# Set printout property and save input deck +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use the ``set_printout()`` method to set the printout property to ``3``. +# Save the input deck. +# +boxshell.set_printout(3) +nvhobj.parts.add(boxshell) + +solution.save_file() diff --git a/version/0.3/_downloads/7ea211e3cf584bc95d4cbd98aa169e97/thermal_stress.ipynb b/version/0.3/_downloads/7ea211e3cf584bc95d4cbd98aa169e97/thermal_stress.ipynb new file mode 100644 index 000000000..455533fe6 --- /dev/null +++ b/version/0.3/_downloads/7ea211e3cf584bc95d4cbd98aa169e97/thermal_stress.ipynb @@ -0,0 +1,176 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Thermal stress example\n======================\n\nThis example shows how to create a thermal stress model with the PyDYNA\n`pre` service. The executable file for LS-DYNA is\n`ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Perform required imports\n========================\n\nPeform required imports.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n ThermalAnalysis,\n ThermalAnalysisType,\n SolidPart,\n SolidFormulation,\n NodeSet,\n AnalysisType\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatElasticPlasticThermal\nfrom ansys.dyna.core.pre import examples" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Manually start the `pre` service\n================================\n\nCopy the `pyDyna/src/ansys/dyna/core/pre/Server`folder to a desired\nlocation. Start the `pre` service at this location by running this\ncommand:\n\n`python kwserver.py`\n\nOnce the `pre` servic is running, you can connect a client to it using\nthe hostname and the port. This example uses the default local host and\nport (`\"localhost\"` and `\"50051\"` respectively).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "hostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nsolution = DynaSolution(hostname)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start the solution workflow\n===========================\n\nNODES and ELEMENTS are read in from the `thermal_stress.k` file. This\nfile also has the *PART* defined in it, but the section and material\nfields are empty to begin with.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fns = []\npath = examples.thermal_stress + os.sep\nfns.append(path + \"thermal_stress.k\")\nsolution.open_files(fns)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set simulation termination time\n===============================\n\nSet the simulation termination time.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "solution.set_termination(3.0)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "To invoke the transient thermal solver, set the thermal analysis type\nfor `CONTROL_SOLUTION` to 2 by `ThermalAnalysisType.TRANSIENT`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "ts = DynaMech(analysis=AnalysisType.EXPLICIT)\nsolution.add(ts)\n\ntanalysis = ThermalAnalysis()\ntanalysis.set_timestep(initial_timestep=0.1)\ntanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT)\nts.add(tanalysis)\n\nts.set_timestep(timestep_size_for_mass_scaled=0.01)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material and section properties\n======================================\n\nDefine the `MAT_4` material, which can have temperature-dependent\nproperties. For the `MAT_THERMAL_ISOTROPIC` property, which is\nassociated with the same part, define the specific heat, thermal\nconductivity, and thermal generation rate.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "mat = MatElasticPlasticThermal(\n mass_density=1.0,\n temperatures=(0,10,20,30,40,50),\n young_modulus=(1e10,1e10,1e10,1e10,1e10,1e10),\n poisson_ratio=(0.3,0.3,0.3,0.3,0.3,0.3),\n thermal_expansion=(0,2e-6,4e-6,6e-6,8e-6,1e-5),\n yield_stress = (1e20,1e20,1e20,1e20,1e20,1e20)\n)\nmat.set_thermal_isotropic(density=1,generation_rate_multiplier=10,specific_heat=1,conductivity=1)\n\nslab = SolidPart(1)\nslab.set_material(mat)\nslab.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nts.parts.add(slab)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Set initial conditions\n======================\n\nInitialize nodes 1 through 8 with a temperature of 10 degrees.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "for i in range(1,9):\n ts.initialconditions.create_temperature(NodeSet([i]),temperature=10)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define output frequencies and save input file\n=============================================\n\nDefine output frequencies and save the input file to disk.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "solution.set_output_database(glstat=0.03)\nsolution.create_database_binary(dt=0.01)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/811a081e5b26ce516983730fed64dfc6/icfd_plate_flow.py b/version/0.3/_downloads/811a081e5b26ce516983730fed64dfc6/icfd_plate_flow.py new file mode 100644 index 000000000..c687808d6 --- /dev/null +++ b/version/0.3/_downloads/811a081e5b26ce516983730fed64dfc6/icfd_plate_flow.py @@ -0,0 +1,81 @@ +""" +Plate flow +========== + +This example shows a simple ICFD input deck with a coarse mesh. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/plate_flow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.plate_flow + os.sep +fns.append(path + "plate_flow.k") +solution.open_files(fns) +solution.set_termination(termination_time=100) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=2) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3]) +meshvol.embed_shell([4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.3/_downloads/815c392141948f7d0926a1ac3ccff888/em_resistive_heating_2d.ipynb b/version/0.3/_downloads/815c392141948f7d0926a1ac3ccff888/em_resistive_heating_2d.ipynb new file mode 100644 index 000000000..fee5eee9a --- /dev/null +++ b/version/0.3/_downloads/815c392141948f7d0926a1ac3ccff888/em_resistive_heating_2d.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Resistive heating 2D\n====================\n\nThis example of a simple metal bar imposes potential on both ends. The\nexecutable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaem import (\n DynaEM,\n PartSet,\n NodeSet,\n Curve,\n ShellPart,\n ShellFormulation,\n FEMSOLVER,\n ThermalAnalysis,\n ThermalAnalysisType,\n EMType,\n Isopotential_ConnType,\n Isopotential\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.em_resistive_heating_2d + os.sep\nfns.append(path + \"em_resistive_heating_2d.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=0.0101)\nsolution.create_database_binary(dt=1e-4)\n\nemobj = DynaEM()\nsolution.add(emobj)\n\nemobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4)\n\nemobj.analysis.set_timestep(timestep=1e-4)\nemobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING)\nemobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3)\n\ntanalysis = ThermalAnalysis()\ntanalysis.set_timestep(initial_timestep=1e-4)\ntanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT)\nemobj.add(tanalysis)\n\nmatrigid = MatRigid(mass_density=1, young_modulus=2e11)\nmatrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4)\n\nmatthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7)\n\npart = ShellPart(1)\npart.set_material(matrigid,matthermaliso)\npart.set_element_formulation(ShellFormulation.PLANE_STRESS)\nemobj.parts.add(part)\n\nemobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10]))\nemobj.set_init_temperature(temp=25)\nemobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([521,517,513,509,525])),value=500)\nemobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([585,605,625,564,565])))\n\nemobj.create_em_output(mats=2, matf=2, sols=2, solf=2)\n\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/83bc05e59def5da3bb748c90ef26415a/sale_efp.ipynb b/version/0.3/_downloads/83bc05e59def5da3bb748c90ef26415a/sale_efp.ipynb new file mode 100644 index 000000000..dca67c489 --- /dev/null +++ b/version/0.3/_downloads/83bc05e59def5da3bb748c90ef26415a/sale_efp.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "EFP concrete target\n===================\n\nThis example shows how to create a S-ALE input deck. The executable file\nfor LS-DYNA is\n`ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynasale import (\n DynaSALE,\n ControlPoint,\n AdvectionMethod,\n StructuredMesh,\n FillDirection,\n Point,\n)\nfrom ansys.dyna.core.pre import dynamaterial as matDB\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nefp_solution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.sale_efp + os.sep\nfns.append(path + \"efpcase.k\")\nefp_solution.open_files(fns)\n\n# set termination\nefp_solution.set_termination(280)\n\nefp = DynaSALE()\nefp_solution.add(efp)\n\n# set post result ouput interval\nefp.set_output_interval(5.0)\n\n# set analysis type\nefp.set_analysis_type(method=AdvectionMethod.VAN_LEER_WITH_HIS)\n\n# define mesh\ncontrol_points_x = [\n ControlPoint(number=1, position=0, ratio=1),\n ControlPoint(number=11, position=-2.5, ratio=0.5),\n ControlPoint(number=21, position=0, ratio=0.5),\n ControlPoint(number=31, position=0, ratio=1),\n]\n\ncontrol_points_y = [\n ControlPoint(number=1, position=0, ratio=1),\n ControlPoint(number=11, position=-2.5, ratio=0.5),\n ControlPoint(number=21, position=0, ratio=0.5),\n ControlPoint(number=31, position=0, ratio=1),\n]\n\ncontrol_points_z = [\n ControlPoint(number=1, position=0, ratio=0.5),\n ControlPoint(number=269, position=11, ratio=0.25),\n ControlPoint(number=309, position=21, ratio=0.25),\n ControlPoint(number=339, position=0, ratio=5),\n]\n\nmesh = StructuredMesh(control_points_x, control_points_y, control_points_z)\nefp.add(mesh)\n\n# fill material\nvacuum = matDB.Vacuum()\nmesh.fill(vacuum)\nair = matDB.Air()\nmesh.fill(air, geometry_type=\"ALL\", reference_pressure=1.01325e-6)\nhe = matDB.HighExplosive()\nmesh.fill(\n he,\n geometry_type=\"PART\",\n define_geometry_parameters=[23],\n inout=FillDirection.OUTSIDE_THE_GEOMETRY,\n)\nliner = matDB.Liner()\nmesh.fill(\n liner,\n geometry_type=\"PART\",\n define_geometry_parameters=[22],\n inout=FillDirection.OUTSIDE_THE_GEOMETRY,\n)\n\n# Set the initial conditions\nmesh.initial_detonation(Point(0, 0, 19.33))\n\n# set outut datebase\nefp_solution.set_output_database(matsum=0.2, glstat=0.2)\n\n# save file on server end\nefp_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/8b257b723560fc1baeaa658786a0b7e6/em_resistive_heating_2d_isopots.ipynb b/version/0.3/_downloads/8b257b723560fc1baeaa658786a0b7e6/em_resistive_heating_2d_isopots.ipynb new file mode 100644 index 000000000..8d09ddb5d --- /dev/null +++ b/version/0.3/_downloads/8b257b723560fc1baeaa658786a0b7e6/em_resistive_heating_2d_isopots.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Resistive heating 2D connect isopotential\n=========================================\n\nThis example shows how to use the `connect_isopotential()` method to\nconnect two parts. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaem import (\n DynaEM,\n PartSet,\n NodeSet,\n SegmentSet,\n Curve,\n ShellPart,\n ShellFormulation,\n FEMSOLVER,\n ThermalAnalysis,\n ThermalAnalysisType,\n EMType,\n Isopotential_ConnType,\n Isopotential,\n RogoCoil,\n EMDimension\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1\nfrom em_set_data import rogoseg\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.em_resistive_heating_2d_isopots + os.sep\nfns.append(path + \"em_resistive_heating_2d_isopots.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=0.0101)\nsolution.create_database_binary(dt=1e-4)\n\nemobj = DynaEM()\nsolution.add(emobj)\n\nemobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4)\n\nemobj.analysis.set_timestep(timestep=1e-4)\nemobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING,dimtype=EMDimension.PLANAR_2D)\nemobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3)\n\ntanalysis = ThermalAnalysis()\ntanalysis.set_timestep(initial_timestep=1e-4)\ntanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT)\nemobj.add(tanalysis)\n\nmatrigid = MatRigid(mass_density=1, young_modulus=2e11)\nmatrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4)\n\nmatthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7)\n\npart = ShellPart(1)\npart.set_material(matrigid,matthermaliso)\npart.set_element_formulation(ShellFormulation.PLANE_STRESS)\nemobj.parts.add(part)\n\nemobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10]))\nemobj.set_init_temperature(temp=25)\n\nemobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([521,517,513,509,525])),value=500)\nemobj.connect_isopotential(contype = Isopotential_ConnType.SHORT_CIRCUIT,isopotential1 = Isopotential(NodeSet([642,652,661,670,643])),isopotential2 = Isopotential(NodeSet([549,548,577,597,617])),value=0.01)\nemobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([653,644,626,627,662])))\nemobj.add(RogoCoil(SegmentSet(rogoseg)))\n\nemobj.create_em_output(mats=2, matf=2, sols=2, solf=2)\n\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/91ca354c95102ff493a8f98b74ab4725/airbag_post.ipynb b/version/0.3/_downloads/91ca354c95102ff493a8f98b74ab4725/airbag_post.ipynb new file mode 100644 index 000000000..809f6e5e9 --- /dev/null +++ b/version/0.3/_downloads/91ca354c95102ff493a8f98b74ab4725/airbag_post.ipynb @@ -0,0 +1,158 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Airbag deploy postprocessing\n============================\n\nThis example shows how to animate the d3plot and display the stress on\nthe airbag.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Perform required imports\n========================\n\nImport required imports.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from ansys.dpf import core as dpf\nfrom ansys.dpf.core import examples" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Connect to DPF Server\n=====================\n\nConnect to the DPF Server.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "dpf.connect_to_server()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Load model\n==========\n\nLoad the model and print the contents of the model. All parts in the\nmodel are shell parts. Model information includes the result components\nand the number of states available in the d3plot.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "\"\"\" ds = dpf.DataSources()\nds.set_result_file_path(r'D:\\PYDYNA_BETA_V.0.1\\example-data\\pydyna\\Airbag\\d3plot', 'd3plot')\nmodel = dpf.Model(ds)\nprint(model) \"\"\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Extract stress on all parts\n===========================\n\nExtract the stress on all the parts. The stress fields container is\nscoped to all time frequencies to be able to animate the change in\nstress on the airbag fabric.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "\"\"\" stress = model.results.stress.on_all_time_freqs()\nstress.inputs.data_sources(ds)\nstress.inputs.requested_location.connect(\"Nodal\")\nfieldsStr = stress.outputs.fields_container()\"\"\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Extract stress on mid integration point\n=======================================\n\nIn the d3plot file, the shell stress is reported at three\nthrough-thickness points by default. Extract the stress on the mid\nintegration point.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "\"\"\" shell_layer_extract = dpf.operators.utility.change_shell_layers()\nshell_layer_extract.inputs.fields_container.connect(fieldsStr)\nshell_layer_extract.inputs.e_shell_layer.connect(dpf.common.shell_layers.mid.value)\nfields_top = shell_layer_extract.outputs.fields_container_as_fields_container() \"\"\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Plot deformed state\n===================\n\nPlot the deformed state at 9 ms.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "\"\"\" N = fields_top[19]\nD = model.results.displacement(time_scoping=[19]).eval()\nN.plot(deform_by=D[0],show_edges=False) \"\"\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Display stress field and set mesh\n=================================\n\nDisplay the stress field and set the mesh to deform by the displacement\nof the nodes.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "\"\"\" disp = model.results.displacement.on_all_time_freqs.eval()\nfields_top.animate(deform_by=disp,show_edges=False) \"\"\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/9475b9e250d1cdfb05933e66928b6173/icfd_dem_coupling.ipynb b/version/0.3/_downloads/9475b9e250d1cdfb05933e66928b6173/icfd_dem_coupling.ipynb new file mode 100644 index 000000000..fd5e3782b --- /dev/null +++ b/version/0.3/_downloads/9475b9e250d1cdfb05933e66928b6173/icfd_dem_coupling.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "DEM coupling\n============\n\nThis example shows how to couple the ICFD fluid solver with DEM\nparticles. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R101_winx64_ifort131.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n SolidPart,\n SolidFormulation,\n Curve,\n Velocity,\n Point,\n ICFD_CouplingForm\n)\nfrom ansys.dyna.core.pre.dynadem import DEMAnalysis\nfrom ansys.dyna.core.pre.dynamaterial import MatRigidDiscrete\nfrom ansys.dyna.core.pre import examples\n\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.dem_coupling + os.sep\nfns.append(path + \"dem_coupling.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=100)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfd.set_timestep(tssfac=0.8)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfdanalysis.set_coupling_dem(formulation=ICFD_CouplingForm.FORCE_USING_FLUID_PRESSURE_GRADIENT)\nicfd.add(icfdanalysis)\n\ndemanalysis = DEMAnalysis()\ndemanalysis.set_des(normal_damping_coeff=0.9, tangential_damping_coeff=0.9, static_friction_coeff=0.3, rolling_friction_coeff=0.001)\nicfd.add(demanalysis)\n\n# define model\nmat = MatICFD(flow_density=2.0, dynamic_viscosity=0.01)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\nicfd.set_initial(velocity=Velocity(1, 0, 0))\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3])\nmeshvol.meshsize_box(size=0.05,min_point=Point(-1, -1, -1),max_point=Point(1, 1, 1))\nicfd.add(meshvol)\n\n#define rigid cylinder\nmatrigid = MatRigidDiscrete(mass_density=1000,young_modulus=1e4)\ndisc = SolidPart(101)\ndisc.set_material(matrigid)\ndisc.set_element_formulation(SolidFormulation.ONE_POINT_COROTATIONAL)\nicfd.parts.add(disc)\n\nsolution.create_database_binary(dt=1.0)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/94ad1be567957bdba5011e7f2ac40c7f/icfd_internal_3d_flow.ipynb b/version/0.3/_downloads/94ad1be567957bdba5011e7f2ac40c7f/icfd_internal_3d_flow.ipynb new file mode 100644 index 000000000..8f44b7517 --- /dev/null +++ b/version/0.3/_downloads/94ad1be567957bdba5011e7f2ac40c7f/icfd_internal_3d_flow.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Internal 3D flow\n================\n\nThis example shows a simple 3D ICFD problem. The executable file for\nLS-DYNA is `ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n ICFD_SurfRemeshMethod\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.internal_3d_flow + os.sep\nfns.append(path + \"internal_3d_flow.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=10)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(timestep=0.05)\nicfdanalysis.set_volume_mesh(mesh_growth_scale_factor=1.1)\nicfdanalysis.set_surface_mesh(remesh_method = ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING)\nicfd.add(icfdanalysis)\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\npart_inflow.set_boundary_layer_symmetry_condition()\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\npart_outflow.set_boundary_layer_symmetry_condition()\npart_outflow.compute_flux()\nicfd.parts.add(part_outflow)\n\npart_wall = ICFDPart(3)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.set_boundary_layer(2)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/9f3c5771e8aaf289fc5dc494e644a933/airbag_deploy.py b/version/0.3/_downloads/9f3c5771e8aaf289fc5dc494e644a933/airbag_deploy.py new file mode 100644 index 000000000..8c15f1b13 --- /dev/null +++ b/version/0.3/_downloads/9f3c5771e8aaf289fc5dc494e644a933/airbag_deploy.py @@ -0,0 +1,190 @@ +""" +Airbag deploy +------------- +This example shows how to create an airbag deploy model with the PyDNYA ``pre`` service. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +""" +############################################################################### +# Perform required imports +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Peform required imports. + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Airbag, + PartSet, + Curve, + Point, + RigidwallPlanar, + Contact, + ContactSurface, + ContactCategory, + ShellPart, + ShellFormulation, +) + +############################################################################### +# Manually start the ``pre`` service +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Copy the ``pyDyna/src/ansys/dyna/core/pre/Server``folder to a desired location. +# Start the ``pre`` service at this location by running this command: +# +# ``python kwserver.py`` +# +# Once the ``pre`` servic is running, you can connect a client to it using +# the hostname and the port. This example uses the default local host and port +# (``"localhost"`` and ``"50051"`` respectively). +# +from ansys.dyna.core.pre.dynamaterial import MatRigid, MatFabric +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/airbag/airbag.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +############################################################################### +# Start the solution workflow +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# The ``DynaSolution`` class is like a workflow orchestrator. +# It inherits methods from other classes and helps create a complete workflow. +# +airbag_solution = DynaSolution(hostname) +fns = [] +# path = sys.path[0] + os.sep + "input" + os.sep + "airbag_deploy" + os.sep +path = examples.airbag_deploy + os.sep +fns.append(path + "airbag_deploy.k") +airbag_solution.open_files(fns) + +############################################################################### +# Create standard explicit control cards +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# This code uses the ``set_termination`` method to set the termination time +# to ``0.03`` in *CONTROL_TERMINATION*. The ``DynaMech`` class +# automatically generates the common control cards used in +# explicit problems. ``CONTROL_ACCURACY``, ``CONTACT``, ``BULK VISCOCITY``, +# and ``CONTACT``are all automatically generated. +# +airbag_solution.set_termination(0.03) + +airbagdeploy = DynaMech() +airbag_solution.add(airbagdeploy) + +############################################################################### +# Define *AIRBAG_SIMPLE_AIRBAG_MODEL* as a keyword +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use the ``Airbag`` function in the ``DynaMech`` class to define +# *AIRBAG_SIMPLE_AIRBAG_MODEL* as a keyword. While LS-DYNA has many different +# airbag models, PyDYNA currently supports only one airbag model, +# SIMPLE_AIRBAG_MODEL. If you have an urgent need for PyDYNA to support +# another airbag model, email `pyansys.core@ansys.com `_. + +airbag = Airbag( + set=PartSet([3]), + heat_capacity_at_constant_volume=1.736e3, + heat_capacity_at_constant_pressure=2.43e3, + input_gas_temperature=1.2e3, + input_mass_flow_rate=Curve(x=[0, 0.032, 0.045, 0.08], y=[0, 26, 0.6, 0.1]), + shape_factor_for_exit_hole=0.7, + ambient_pressure=14.7, + ambient_density=3.821e-6, +) +airbagdeploy.add(airbag) + +############################################################################### +# Generate an infinite planar rigid wall +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# To generate an infinite planar rigidwall, define the coordinates of the heat +# vector and the tail vector of the plane. +# +rigidwall = RigidwallPlanar(Point(0, 0, 0), Point(0, 1, 0), coulomb_friction_coefficient=0.5) +airbagdeploy.add(rigidwall) + +############################################################################### +# Define a node-to-surface contact +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define a node-to-surface contact by passing a master part set and a slave +# part set. + +contact = Contact(category=ContactCategory.NODES_TO_SURFACE) +contact.set_friction_coefficient(static=0.5, dynamic=0.5) +surf1 = ContactSurface(PartSet([3])) +surf2 = ContactSurface(PartSet([2])) +surf2.set_penalty_stiffness_scale_factor(0.06667) +contact.set_slave_surface(surf1) +contact.set_master_surface(surf2) +airbagdeploy.contacts.add(contact) + +############################################################################### +# Define material cards +# ~~~~~~~~~~~~~~~~~~~~~ +# LS-DYNA has over 300 materials that are used for varied applications. +# Whlie PyDYNA does not yet support all material cards, it does support some +# of the most commonly used materials, including ``FABRIC``, `MAT_ELASTIC``, +# ``PIECEWISE_LINEAR_PLASTICITY``, and ``RIGID``. All supported materials +# are accessed from the ``dynamaterial`` class. In the following code, +# ``MAT_RIGID`` is defined as the material for the cylindrical tube and the +# bottom plate. ``MAT_FABRIC`` is defined as the material for the airbag volume. +# Note that ``platemat`` has contraints defined as well. + +platemat = MatRigid( + mass_density=7.84e-4, + young_modulus=30e6, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, +) +cylindermat = MatRigid(mass_density=1.96e-4, young_modulus=30e6) +airbagmat = MatFabric( + mass_density=1e-4, + young_modulus_longitudinal_direction=2e6, + young_modulus_transverse_direction=2e6, + shear_modulus=1.53e6, +) + +############################################################################### +# Define sectional properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# The following code defines the sectional properties of the parts. This example +# has three shell parts. Each shell part is initialized as ``ShellPart`` with a +# unique ID and an appropriate shell formulation is assigned. Again, +# PyDYNA does not yet support all element formulations. You can find the +# supported formulations in ``dynabase`` class. + +plate = ShellPart(1) +plate.set_material(platemat) +plate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +plate.set_thickness(0.5) +airbagdeploy.parts.add(plate) + +cylinder = ShellPart(2) +cylinder.set_material(cylindermat) +cylinder.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +cylinder.set_thickness(0.5) +airbagdeploy.parts.add(cylinder) + +airbagpart = ShellPart(3) +airbagpart.set_material(airbagmat) +airbagpart.set_element_formulation(ShellFormulation.FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE) +airbagpart.set_thickness(0.015) +airbagpart.set_integration_points(4) +airbagdeploy.parts.add(airbagpart) + +############################################################################### +# Define database outputs +# ~~~~~~~~~~~~~~~~~~~~~~~ +# Use the ``set_output_database()`` and ``create_database_binary()`` methods to define the +# output frequency of the ASCII and binary D3PLOT files. Then, use the ``save_file()`` +# method to write out the model as an input DYNA key file. + +airbag_solution.set_output_database( + abstat=2.0e-4, glstat=2.0e-4, matsum=2.0e-4, rcforc=2.0e-4, rbdout=2.0e-4, rwforc=2.0e-4 +) +airbag_solution.create_database_binary(dt=5e-4, ieverp=1) +airbag_solution.save_file() diff --git a/version/0.3/_downloads/a0fda58d7ea4be91cba76c0b4ebf9df0/em_rlc_isopotential.ipynb b/version/0.3/_downloads/a0fda58d7ea4be91cba76c0b4ebf9df0/em_rlc_isopotential.ipynb new file mode 100644 index 000000000..3817fda4d --- /dev/null +++ b/version/0.3/_downloads/a0fda58d7ea4be91cba76c0b4ebf9df0/em_rlc_isopotential.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "RLC circuit by isopotential\n===========================\n\nThis example shows how to use the corresponding `contype` in the\n`connect_isopotential()` method to define an RLC circuit as an inlet\nboundary condition. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaem import (\n DynaEM,\n NodeSet,\n SegmentSet,\n SolidPart,\n SolidFormulation,\n EMType,\n Isopotential_ConnType,\n Isopotential,\n RogoCoil,\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid,EMMATTYPE\nfrom em_set_data import rlc_rogoseg\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.em_rlc_isopotential + os.sep\nfns.append(path + \"em_rlc_isopotential.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=0.01)\nsolution.create_database_binary(dt=1e-4)\n\nemobj = DynaEM()\nsolution.add(emobj)\n\nemobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4)\n\nemobj.analysis.set_timestep(timestep=1e-4)\nemobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING)\n\nmatrigid = MatRigid(mass_density=7000, young_modulus=2e11,center_of_mass_constraint=1,translational_constraint=7,rotational_constraint=7)\nmatrigid.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4)\n\npart1 = SolidPart(1)\npart1.set_material(matrigid)\npart1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nemobj.parts.add(part1)\n\nnset1 = NodeSet([429,433,437,441,445,449,453,457,461,465,469,473,477,481,485,489,493,497,501,505,509,513,517,521,525])\nnset2 = NodeSet([26,31,36,41,46,51,56,61,66,71,76,81,86,91,96,101,106,111,116,121,126,131,136,141,146])\nisopos_conn1 = Isopotential(nset1)\nisopos_conn2 = Isopotential(nset2)\nemobj.connect_isopotential(contype = Isopotential_ConnType.RLC_CIRCUIT,isopotential1 = isopos_conn1,value=5e-4,inductance=7.8e-5,capacity=0.0363,initial_voltage=5000)\nemobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = isopos_conn2)\nemobj.add(RogoCoil(SegmentSet(rlc_rogoseg)))\n\nemobj.create_em_output(mats=2, matf=2, sols=2, solf=2)\n\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/a4918dca4a4aa228342e8bd9d796cb73/icfd_thermal_flow.py b/version/0.3/_downloads/a4918dca4a4aa228342e8bd9d796cb73/icfd_thermal_flow.py new file mode 100644 index 000000000..99ceb860a --- /dev/null +++ b/version/0.3/_downloads/a4918dca4a4aa228342e8bd9d796cb73/icfd_thermal_flow.py @@ -0,0 +1,85 @@ +""" +Thermal flow +============ + +This example shows a simple ICFD forced-convection input deck with +a coarse mesh. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/thermal_flow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.thermal_flow + os.sep +fns.append(path + "thermal_flow.k") +solution.open_files(fns) +solution.set_termination(termination_time=100) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep() +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005,heat_capacity = 1000,thermal_conductivity=200) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[20, 20])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[80, 80])) +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +icfd.parts.add(part_wall) + +icfd.set_initial(temperature=10) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3,4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.3/_downloads/a68af5a85465291b37b3428800bc9bb3/em_resistive_heating_2d_multi_isopots.py b/version/0.3/_downloads/a68af5a85465291b37b3428800bc9bb3/em_resistive_heating_2d_multi_isopots.py new file mode 100644 index 000000000..0252b383e --- /dev/null +++ b/version/0.3/_downloads/a68af5a85465291b37b3428800bc9bb3/em_resistive_heating_2d_multi_isopots.py @@ -0,0 +1,85 @@ +""" +Resistive heating 2D multiple connect isopotential +================================================== +This example shows how to define complex circuits as inlet boundary conditions. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +""" + +import os +import sys + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaem import ( + DynaEM, + PartSet, + NodeSet, + SegmentSet, + Curve, + ShellPart, + ShellFormulation, + FEMSOLVER, + ThermalAnalysis, + ThermalAnalysisType, + EMType, + Isopotential_ConnType, + Isopotential, + RogoCoil, + EMDimension +) +from ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE +from em_set_data import rogoseg +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/em/resistive_heating_2d_isopots.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +fns = [] +path = examples.em_resistive_heating_2d_multi_isopots + os.sep +fns.append(path + "em_resistive_heating_2d_multi_isopots.k") +solution.open_files(fns) +solution.set_termination(termination_time=0.0101) +solution.create_database_binary(dt=1e-4) + +emobj = DynaEM() +solution.add(emobj) + +emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + +emobj.analysis.set_timestep(timestep=1e-4) +emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING,dimtype=EMDimension.PLANAR_2D) + +tanalysis = ThermalAnalysis() +tanalysis.set_timestep(initial_timestep=1e-4) +tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) +emobj.add(tanalysis) + +matrigid = MatRigid(mass_density=1, young_modulus=2e11) +matrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + +matthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7) + +part = ShellPart(1) +part.set_material(matrigid,matthermaliso) +part.set_element_formulation(ShellFormulation.PLANE_STRESS) +emobj.parts.add(part) + +emobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10])) +emobj.set_init_temperature(temp=25) + +crv = Curve(func="-5./0.01*EXP(-TIME/((5.e-4+0.05+0.01)*0.04))") +nset1 = NodeSet([521,517,513,509,525]) +nset2 = NodeSet([549,548,577,597,617]) +nset3 = NodeSet([653,644,626,627,662]) +nset4 = NodeSet([642,652,661,670,643]) +emobj.connect_isopotential(contype = Isopotential_ConnType.CURRENT_SOURCE,isopotential1 = Isopotential(nset4),isopotential2 = Isopotential(nset2),curve=crv) +emobj.connect_isopotential(contype = Isopotential_ConnType.RESISTANCE,isopotential1 = Isopotential(nset4),isopotential2 = Isopotential(nset2),value=0.01) +emobj.connect_isopotential(contype = Isopotential_ConnType.RESISTANCE,isopotential1 = Isopotential(nset3),isopotential2 = Isopotential(nset1),value=0.05) +emobj.add(RogoCoil(SegmentSet(rogoseg))) + +emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + +solution.save_file() diff --git a/version/0.3/_downloads/aa171cc18b4e4d68e2332837af606e40/belted_dummy.py b/version/0.3/_downloads/aa171cc18b4e4d68e2332837af606e40/belted_dummy.py new file mode 100644 index 000000000..0b736f4f0 --- /dev/null +++ b/version/0.3/_downloads/aa171cc18b4e4d68e2332837af606e40/belted_dummy.py @@ -0,0 +1,217 @@ +""" +Belted dummy +============ +This example shows how to use the PyDYNA ``pre`` service to create +a belted dummy model. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +""" +############################################################################### +# Perform required imports +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Peform required imports. +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Velocity, + Curve, + ShellPart, + DiscretePart, + NodeSet, + SegmentSet, + DRO, + Contact, + ContactSurface, + ContactCategory, + Motion, + Gravity, + GravityOption, + ShellFormulation, +) +from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatElastic, + MatSpringNonlinearElastic, + MatDamperViscous, + MatDamperNonlinearViscous, +) +from belted_dummy_data import * +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/explicit/belted_dummy.png' + +############################################################################### +# Manually start the ``pre`` service +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Copy the ``pyDyna/src/ansys/dyna/core/pre/Server`` folder to a desired location. +# Start the ``pre`` service at this location by running this command: +# +# ``python kwserver.py`` +# +# Once the ``pre`` servic is running, you can connect a client to it using +# the host name and the port. This example uses the default local host and port +# (``"localhost"`` and ``"50051"`` respectively). +# +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +dummy_solution = DynaSolution(hostname) + +############################################################################### +# Start the solution workflow +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# NODES and ELEMENTS are read in from the ``belted_dummy.k`` file. This file +# also has the *PART* defined in it, but the section and material fields are +# empty to begin with. +# +fns = [] +path = examples.belted_dummy + os.sep +fns.append(path + "belted_dummy.k") +dummy_solution.open_files(fns) + +############################################################################### +# Create database and control cards +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# For the D3plots, set simulation termination time, simulation timestep, and +# output frequency. Use the ``set_init_velocity`` method in the ``dynamech`` +# class to initialize the velocity components in the desired direction. +# +dummy_solution.set_termination(termination_time=0.12) +dummy_solution.create_database_binary(dt=2.5e-3) + +dummy = DynaMech() +dummy_solution.add(dummy) + +dummy.set_timestep(tssfac=0.8) +dummy.set_init_velocity(Velocity(14.8, 0, 0)) + +############################################################################### +# Define materials +# ~~~~~~~~~~~~~~~~ +# In this model, many parts share common material types. Thus, these materials +# are generated in a loop and a list of these materials are created. This list +# can then be used later to assign materials to parts. The ``dynamaterials`` class +# are used to define these materials: ``MAT_RIGID``, ``MAT_ELASTIC``, +# ``MAT_SPRING_NONLINEAR_ELASTIC,`` ``MAT_DAMPER_VISCOUS``, and +# ``MAT_DAMPER_NONLINEAR_VISCOUS``. +# +shellmatlist = [] +for i in range(15): + matrigid = MatRigid( + mass_density=rigidmats[i][0], young_modulus=rigidmats[i][1], poisson_ratio=0.3 + ) + shellmatlist.append(matrigid) + +for i in range(16, 23): + index = i - 16 + matelastic = MatElastic( + mass_density=elasticmats[index][0], young_modulus=elasticmats[index][1], poisson_ratio=0.3 + ) + shellmatlist.append(matelastic) + +discmatlist = [] +for i in range(101, 143): + index = i - 101 + mat = MatSpringNonlinearElastic(curve=Curve(x=curvedata[index][0], y=curvedata[index][1])) + discmatlist.append(mat) + +for i in range(143, 185): + index = i - 143 + mat = MatDamperViscous(damping_constant=dampingconst[index]) + discmatlist.append(mat) + +for i in range(185, 209): + index = i - 185 + mat = MatDamperNonlinearViscous( + curve=Curve(x=curvedata[lcidlist[index]][0], y=curvedata[lcidlist[index]][1]) + ) + discmatlist.append(mat) + +############################################################################### +# Define section properties and assign materials +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Now that you have a list of materials with the material ID corresponding to +# the Part ID, you can loop through the list and assign these materials to the +# parts. While in the loop, also define the section properties, element +# formulations, and constraints. +# +for i in range(1, 23): + part = ShellPart(i) + part.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + part.set_material(shellmatlist[i - 1]) + part.set_thickness(shellsec[i - 1][0]) + part.set_integration_points(shellsec[i - 1][1]) + if i in range(1, 16): + part.set_extra_nodes(NodeSet(extra_nodes[i - 1])) + dummy.parts.add(part) + +for i in range(101, 209): + index = i - 101 + part = DiscretePart(i) + part.set_material(discmatlist[index]) + part.set_displacement_option(displacement_option=DRO.DESCRIBES_TORSIONAL_SPRING) + dummy.parts.add(part) + +############################################################################### +# Define surface-to-surface contacts +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define several surface-to-surface contacts between predefined segment set pairs +# such that each contact has a specific friction defined between the master and slave. + +fslist = [0.62, 0.62, 0.62, 0.8, 1, 0.8, 0.88, 0.88, 0.16, 0.88, 0] +for i in range(11): + contact = Contact(category=ContactCategory.SURFACE_TO_SURFACE_CONTACT) + contact.set_friction_coefficient(static=fslist[i]) + surf1 = ContactSurface(SegmentSet(segments[2 * i])) + surf2 = ContactSurface(SegmentSet(segments[2 * i + 1])) + contact.set_slave_surface(surf1) + contact.set_master_surface(surf2) + dummy.contacts.add(contact) + +############################################################################### +# Define spherical joints +# ~~~~~~~~~~~~~~~~~~~~~~~ +# A spherical joint is one of the simpler joint types. You need only define +# a coincident node pair. Read the node pairs from the ``jointlist`` array defined in +# the ``belted_dummy_data.py`` file. +# +for i in range(42): + id = i + 1 + dummy.create_defineorientation( + vid=id, iop=2, vector=vector, node1=nlist[i][0], node2=nlist[i][1] + ) + +for i in range(14): + dummy.constraints.create_joint_spherical(nodes=jointlist[i]) + +############################################################################### +# Define a prescribed motion on a node set +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use the ``create_imposed_motion()`` method to define a prescribed motion +# on a node set. +# +dummy.boundaryconditions.create_imposed_motion( + NodeSet(motion_nodes), + Curve(x=motion_curve_x, y=motion_curve_y,sfo=0.1), + motion=Motion.ACCELERATION, + scalefactor=-1, +) +############################################################################### +# Define gravity +# ~~~~~~~~~~~~~~ +# Use the ``Gravity()`` method in the ``dynabase`` class +# to define the gravity load, direction of the load, and the curve. +# +g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0.152], y=[9.81, 9.81])) +dummy.add(g) + +############################################################################### +# Define database outputs +# ~~~~~~~~~~~~~~~~~~~~~~~ +# Define the frequency for the D3PLOT file and write out the input file. +# +dummy_solution.create_database_binary(dt=2.5e-3) +dummy_solution.save_file() diff --git a/version/0.3/_downloads/ab9bf938c72e60c57fbe5e6a82fd2cb9/icfd_driven_cavity.ipynb b/version/0.3/_downloads/ab9bf938c72e60c57fbe5e6a82fd2cb9/icfd_driven_cavity.ipynb new file mode 100644 index 000000000..e7fe5f3c2 --- /dev/null +++ b/version/0.3/_downloads/ab9bf938c72e60c57fbe5e6a82fd2cb9/icfd_driven_cavity.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Driven cavity\n=============\n\nThis example shows the universally famous driven-cavity case tested with\nthe second-order steady solver and for `Re=1000`. The executable file\nfor LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n ICFD_AnalysisType,\n ICFD_MessageLevel,\n ICFDDOF\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.driven_cavity + os.sep\nfns.append(path + \"driven_cavity.k\")\nsolution.open_files(fns)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_type(analysis_type=ICFD_AnalysisType.STEADY_STATE_ANALYSIS)\nicfdanalysis.set_output(messagelevel=ICFD_MessageLevel.FULL_OUTPUT_INFORMATION,iteration_interval=250)\nicfdanalysis.set_steady_state(max_iteration=2500,momentum_tol_limit=1e-8,pressure_tol_limit=1e-8,velocity_relax_param=1,pressure_relax_param=1)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1, dynamic_viscosity=0.001)\n\npart1 = ICFDPart(1)\npart1.set_material(mat)\npart1.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\nicfd.parts.add(part1)\n\npart2 = ICFDPart(2)\npart2.set_material(mat)\npart2.set_non_slip()\nicfd.parts.add(part2)\n\npartvol = ICFDVolumePart(surfaces=[1, 2])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=250)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/aba191ff39a3846f649b65a67560e3a0/icfd_mesh_morphing.ipynb b/version/0.3/_downloads/aba191ff39a3846f649b65a67560e3a0/icfd_mesh_morphing.ipynb new file mode 100644 index 000000000..d230d134b --- /dev/null +++ b/version/0.3/_downloads/aba191ff39a3846f649b65a67560e3a0/icfd_mesh_morphing.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Mesh morphing\n=============\n\nThis example shows a simple ICFD problem with mesh morphing. The\nexecutable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.mesh_morphing + os.sep\nfns.append(path + \"mesh_morphing.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=40)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.05)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=2)\npart_wall.set_imposed_move(vy=Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"))\nicfd.parts.add(part_wall)\n\npart_meshmorph = ICFDPart(5)\npart_meshmorph.set_material(mat)\nicfd.parts.add(part_meshmorph)\n\npartvol1 = ICFDVolumePart(surfaces=[1, 2, 3, 5])\npartvol1.set_material(mat)\nicfd.parts.add(partvol1)\npartvol2 = ICFDVolumePart(surfaces=[5, 4])\npartvol2.set_material(mat)\npartvol2.set_imposed_move(vy=Curve(func=\"2*3.14/10*sin(2*3.14/10*TIME+3.14/2)\"))\nicfd.parts.add(partvol2)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nmeshvol.set_fluid_interfaces([5])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.5)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/b5a5e8f2d21e3a9bde55c1059bcb5400/em_rlc_define_func.py b/version/0.3/_downloads/b5a5e8f2d21e3a9bde55c1059bcb5400/em_rlc_define_func.py new file mode 100644 index 000000000..ccd902b50 --- /dev/null +++ b/version/0.3/_downloads/b5a5e8f2d21e3a9bde55c1059bcb5400/em_rlc_define_func.py @@ -0,0 +1,80 @@ +""" +RLC circuit by function +======================= +This example shows how to use the ``Function`` object to define an +RLC circuit as an inlet boundary condition. The executable file for +LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +""" + +import os +import sys + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaem import ( + DynaEM, + NodeSet, + SegmentSet, + SolidPart, + SolidFormulation, + EMType, + Isopotential_ConnType, + Isopotential, + RogoCoil, + Function +) +from ansys.dyna.core.pre.dynamaterial import MatRigid,EMMATTYPE +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/em/rlc_isopotential.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +fns = [] +path = examples.em_rlc_define_func + os.sep +fns.append(path + "em_rlc_define_func.k") +solution.open_files(fns) +solution.set_termination(termination_time=0.01) +solution.create_database_binary(dt=1e-4) + +emobj = DynaEM() +solution.add(emobj) + +emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + +emobj.analysis.set_timestep(timestep=1e-4) +emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING) + +matrigid = MatRigid(mass_density=7000, young_modulus=2e11,center_of_mass_constraint=1,translational_constraint=7,rotational_constraint=7) +matrigid.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + +part1 = SolidPart(1) +part1.set_material(matrigid) +part1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +emobj.parts.add(part1) + +nset1 = NodeSet([429,433,437,441,445,449,453,457,461,465,469,473,477,481,485,489,493,497,501,505,509,513,517,521,525]) +nset2 = NodeSet([26,31,36,41,46,51,56,61,66,71,76,81,86,91,96,101,106,111,116,121,126,131,136,141,146]) +isopos_conn1 = Isopotential(nset1) +isopos_conn2 = Isopotential(nset2) +fn = """float rlc(float time,float emdt,float curr,float curr1, + float curr2,float pot1,float pot2, float rmesh) + { + float fac,R,C,Vc,L,xi ; + R = 0.5e-3; L = 78.e-6; + fac =1.e-6; C=363.e-4; + float q= 181.5; + if(time 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +fns = [] +path = examples.em_resistive_heating_2d + os.sep +fns.append(path + "em_resistive_heating_2d.k") +solution.open_files(fns) +solution.set_termination(termination_time=0.0101) +solution.create_database_binary(dt=1e-4) + +emobj = DynaEM() +solution.add(emobj) + +emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + +emobj.analysis.set_timestep(timestep=1e-4) +emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING) +emobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3) + +tanalysis = ThermalAnalysis() +tanalysis.set_timestep(initial_timestep=1e-4) +tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) +emobj.add(tanalysis) + +matrigid = MatRigid(mass_density=1, young_modulus=2e11) +matrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + +matthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7) + +part = ShellPart(1) +part.set_material(matrigid,matthermaliso) +part.set_element_formulation(ShellFormulation.PLANE_STRESS) +emobj.parts.add(part) + +emobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10])) +emobj.set_init_temperature(temp=25) +emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([521,517,513,509,525])),value=500) +emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([585,605,625,564,565]))) + +emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + +solution.save_file() diff --git a/version/0.3/_downloads/b65f0b18b3d5eee637f14e2d551e35e0/ball_plate.py b/version/0.3/_downloads/b65f0b18b3d5eee637f14e2d551e35e0/ball_plate.py new file mode 100644 index 000000000..b71ab0172 --- /dev/null +++ b/version/0.3/_downloads/b65f0b18b3d5eee637f14e2d551e35e0/ball_plate.py @@ -0,0 +1,158 @@ +""" +Ball Plate +========== +This example shows how to use the PyDYNA ``pre`` service to create +a ball plate model. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +""" +############################################################################### +# Perform required imports +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Peform required imports. +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Velocity, + PartSet, + ShellPart, + SolidPart, + NodeSet, + Contact, + ContactSurface, + ShellFormulation, + SolidFormulation, + ContactType, + AnalysisType +) +from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatPiecewiseLinearPlasticity, +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/explicit/ball_plate.png' + +############################################################################### +# Start the ``pre`` service +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Prerequisite: make sure the ``pre`` service docker have been started. +# Refer to: https://dyna.docs.pyansys.com/version/stable/getting-started/index.html + +# Once the ``pre`` servic is running, you can connect a client to it using +# the host name and the port. This example uses the default local host and port +# (``"localhost"`` and ``"50051"`` respectively). +# +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +solution = DynaSolution(hostname) + +############################################################################### +# Start the solution workflow +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# NODES and ELEMENTS are read in from the ``ball_plate.k`` file. This file +# also has the *PART* defined in it, but the section and material fields are +# empty to begin with. +# +fns = [] +path = examples.ball_plate + os.sep +fns.append(path+"ball_plate.k") +solution.open_files(fns) + +############################################################################### +# Create database and control cards +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# For the D3plots, set simulation termination time, simulation timestep, and +# output frequency. + +solution.set_termination(termination_time=10) + +ballplate = DynaMech(AnalysisType.NONE) +solution.add(ballplate) + +############################################################################### +# Define materials +# ~~~~~~~~~~~~~~~~ +# The ``dynamaterials`` class +# are used to define these materials: ``MAT_RIGID``, ``MAT_PIECEWISE_LINEAR_PLASTICITY``, + +matrigid = MatRigid(mass_density=7.83e-6, young_modulus=207, poisson_ratio=0.3) +matplastic = MatPiecewiseLinearPlasticity(mass_density=7.83e-6, young_modulus=207, yield_stress=0.2, tangent_modulus=2) + + +############################################################################### +# Define section properties and assign materials +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Now that you have materials with the material ID corresponding to +# the Part ID, you can assign these materials to the +# parts. also define the section properties, element +# formulations, and constraints. +# + +plate = ShellPart(1) +plate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +plate.set_material(matplastic) +plate.set_thickness(1) +plate.set_integration_points(5) +ballplate.parts.add(plate) + +ball = SolidPart(2) +ball.set_material(matrigid) +ball.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +ballplate.parts.add(ball) + + +############################################################################### +# Define surface-to-surface contacts +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define single-surface contact between predefined part set. + +selfcontact = Contact(type=ContactType.AUTOMATIC) +surf1 = ContactSurface(PartSet([1, 2])) +selfcontact.set_slave_surface(surf1) +ballplate.contacts.add(selfcontact) + +############################################################################### +# Define nodal single point constraints. +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Constrain the nodes in the spc list + +spc = [34,35,51,52,68,69,85,86,102,103,119,120,136,137,153,154,170,171,187,188,204,205,221,222,238,239,255,256] +for i in range(1,19): + spc.append(i) +for i in range(272,290): + spc.append(i) +ballplate.boundaryconditions.create_spc(NodeSet(spc),rx=False,ry=False,rz=False) + +############################################################################### +# Define initial condition. +# ~~~~~~~~~~~~~~~~~~~~~~~~~ +# Use the ``create_velocity_node`` method +# to initialize the velocity components in the desired direction. +for i in range(1,1652): + ballplate.initialconditions.create_velocity_node(i,trans=Velocity(0, 0, -10)) + +############################################################################### +# Define database outputs +# ~~~~~~~~~~~~~~~~~~~~~~~ +# Define the frequency for the D3PLOT file and write out the input file. +# +solution.set_output_database(glstat=0.1, matsum=0.1, sleout=0.1) +solution.create_database_binary(dt=1) +serverpath = solution.save_file() + +############################################################################### +# Download output file +# ~~~~~~~~~~~~~~~~~~~~ +# Download output file from service docker to local /output/. + +serveroutfile = '/'.join((serverpath,"ball_plate.k")) +downloadpath = os.path.join(os.getcwd(), "output") +if not os.path.exists(downloadpath): + os.makedirs(downloadpath) +downloadfile = os.path.join(downloadpath,"ball_plate.k") +solution.download(serveroutfile,downloadfile) diff --git a/version/0.3/_downloads/b91df3575d79fd262c84187d1f6fb77c/belted_dummy.ipynb b/version/0.3/_downloads/b91df3575d79fd262c84187d1f6fb77c/belted_dummy.ipynb new file mode 100644 index 000000000..66e291cf8 --- /dev/null +++ b/version/0.3/_downloads/b91df3575d79fd262c84187d1f6fb77c/belted_dummy.ipynb @@ -0,0 +1,230 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Belted dummy\n============\n\nThis example shows how to use the PyDYNA `pre` service to create a\nbelted dummy model. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Perform required imports\n========================\n\nPeform required imports.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n Velocity,\n Curve,\n ShellPart,\n DiscretePart,\n NodeSet,\n SegmentSet,\n DRO,\n Contact,\n ContactSurface,\n ContactCategory,\n Motion,\n Gravity,\n GravityOption,\n ShellFormulation,\n)\nfrom ansys.dyna.core.pre.dynamaterial import (\n MatRigid,\n MatElastic,\n MatSpringNonlinearElastic,\n MatDamperViscous,\n MatDamperNonlinearViscous,\n)\nfrom belted_dummy_data import *\nfrom ansys.dyna.core.pre import examples" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Manually start the `pre` service\n================================\n\nCopy the `pyDyna/src/ansys/dyna/core/pre/Server` folder to a desired\nlocation. Start the `pre` service at this location by running this\ncommand:\n\n`python kwserver.py`\n\nOnce the `pre` servic is running, you can connect a client to it using\nthe host name and the port. This example uses the default local host and\nport (`\"localhost\"` and `\"50051\"` respectively).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "hostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\ndummy_solution = DynaSolution(hostname)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start the solution workflow\n===========================\n\nNODES and ELEMENTS are read in from the `belted_dummy.k` file. This file\nalso has the *PART* defined in it, but the section and material fields\nare empty to begin with.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fns = []\npath = examples.belted_dummy + os.sep\nfns.append(path + \"belted_dummy.k\")\ndummy_solution.open_files(fns)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create database and control cards\n=================================\n\nFor the D3plots, set simulation termination time, simulation timestep,\nand output frequency. Use the `set_init_velocity` method in the\n`dynamech` class to initialize the velocity components in the desired\ndirection.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "dummy_solution.set_termination(termination_time=0.12)\ndummy_solution.create_database_binary(dt=2.5e-3)\n\ndummy = DynaMech()\ndummy_solution.add(dummy)\n\ndummy.set_timestep(tssfac=0.8)\ndummy.set_init_velocity(Velocity(14.8, 0, 0))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define materials\n================\n\nIn this model, many parts share common material types. Thus, these\nmaterials are generated in a loop and a list of these materials are\ncreated. This list can then be used later to assign materials to parts.\nThe `dynamaterials` class are used to define these materials:\n`MAT_RIGID`, `MAT_ELASTIC`, `MAT_SPRING_NONLINEAR_ELASTIC,`\n`MAT_DAMPER_VISCOUS`, and `MAT_DAMPER_NONLINEAR_VISCOUS`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "shellmatlist = []\nfor i in range(15):\n matrigid = MatRigid(\n mass_density=rigidmats[i][0], young_modulus=rigidmats[i][1], poisson_ratio=0.3\n )\n shellmatlist.append(matrigid)\n\nfor i in range(16, 23):\n index = i - 16\n matelastic = MatElastic(\n mass_density=elasticmats[index][0], young_modulus=elasticmats[index][1], poisson_ratio=0.3\n )\n shellmatlist.append(matelastic)\n\ndiscmatlist = []\nfor i in range(101, 143):\n index = i - 101\n mat = MatSpringNonlinearElastic(curve=Curve(x=curvedata[index][0], y=curvedata[index][1]))\n discmatlist.append(mat)\n\nfor i in range(143, 185):\n index = i - 143\n mat = MatDamperViscous(damping_constant=dampingconst[index])\n discmatlist.append(mat)\n\nfor i in range(185, 209):\n index = i - 185\n mat = MatDamperNonlinearViscous(\n curve=Curve(x=curvedata[lcidlist[index]][0], y=curvedata[lcidlist[index]][1])\n )\n discmatlist.append(mat)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define section properties and assign materials\n==============================================\n\nNow that you have a list of materials with the material ID corresponding\nto the Part ID, you can loop through the list and assign these materials\nto the parts. While in the loop, also define the section properties,\nelement formulations, and constraints.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "for i in range(1, 23):\n part = ShellPart(i)\n part.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\n part.set_material(shellmatlist[i - 1])\n part.set_thickness(shellsec[i - 1][0])\n part.set_integration_points(shellsec[i - 1][1])\n if i in range(1, 16):\n part.set_extra_nodes(NodeSet(extra_nodes[i - 1]))\n dummy.parts.add(part)\n\nfor i in range(101, 209):\n index = i - 101\n part = DiscretePart(i)\n part.set_material(discmatlist[index])\n part.set_displacement_option(displacement_option=DRO.DESCRIBES_TORSIONAL_SPRING)\n dummy.parts.add(part)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define surface-to-surface contacts\n==================================\n\nDefine several surface-to-surface contacts between predefined segment\nset pairs such that each contact has a specific friction defined between\nthe master and slave.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fslist = [0.62, 0.62, 0.62, 0.8, 1, 0.8, 0.88, 0.88, 0.16, 0.88, 0]\nfor i in range(11):\n contact = Contact(category=ContactCategory.SURFACE_TO_SURFACE_CONTACT)\n contact.set_friction_coefficient(static=fslist[i])\n surf1 = ContactSurface(SegmentSet(segments[2 * i]))\n surf2 = ContactSurface(SegmentSet(segments[2 * i + 1]))\n contact.set_slave_surface(surf1)\n contact.set_master_surface(surf2)\n dummy.contacts.add(contact)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define spherical joints\n=======================\n\nA spherical joint is one of the simpler joint types. You need only\ndefine a coincident node pair. Read the node pairs from the `jointlist`\narray defined in the `belted_dummy_data.py` file.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "for i in range(42):\n id = i + 1\n dummy.create_defineorientation(\n vid=id, iop=2, vector=vector, node1=nlist[i][0], node2=nlist[i][1]\n )\n\nfor i in range(14):\n dummy.constraints.create_joint_spherical(nodes=jointlist[i])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define a prescribed motion on a node set\n========================================\n\nUse the `create_imposed_motion()` method to define a prescribed motion\non a node set.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "dummy.boundaryconditions.create_imposed_motion(\n NodeSet(motion_nodes),\n Curve(x=motion_curve_x, y=motion_curve_y,sfo=0.1),\n motion=Motion.ACCELERATION,\n scalefactor=-1,\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define gravity\n==============\n\nUse the `Gravity()` method in the `dynabase` class to define the gravity\nload, direction of the load, and the curve.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0.152], y=[9.81, 9.81]))\ndummy.add(g)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define database outputs\n=======================\n\nDefine the frequency for the D3PLOT file and write out the input file.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "dummy_solution.create_database_binary(dt=2.5e-3)\ndummy_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/bc298b4ebddba5ef8ca2aea8ce1eb3ad/icfd_dem_coupling.py b/version/0.3/_downloads/bc298b4ebddba5ef8ca2aea8ce1eb3ad/icfd_dem_coupling.py new file mode 100644 index 000000000..41685e772 --- /dev/null +++ b/version/0.3/_downloads/bc298b4ebddba5ef8ca2aea8ce1eb3ad/icfd_dem_coupling.py @@ -0,0 +1,98 @@ +""" +DEM coupling +============ + +This example shows how to couple the ICFD fluid solver with DEM particles. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R101_winx64_ifort131.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + SolidPart, + SolidFormulation, + Curve, + Velocity, + Point, + ICFD_CouplingForm +) +from ansys.dyna.core.pre.dynadem import DEMAnalysis +from ansys.dyna.core.pre.dynamaterial import MatRigidDiscrete +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/dem_coupling.png' + + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.dem_coupling + os.sep +fns.append(path + "dem_coupling.k") +solution.open_files(fns) +solution.set_termination(termination_time=100) +icfd = DynaICFD() +solution.add(icfd) + +icfd.set_timestep(tssfac=0.8) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfdanalysis.set_coupling_dem(formulation=ICFD_CouplingForm.FORCE_USING_FLUID_PRESSURE_GRADIENT) +icfd.add(icfdanalysis) + +demanalysis = DEMAnalysis() +demanalysis.set_des(normal_damping_coeff=0.9, tangential_damping_coeff=0.9, static_friction_coeff=0.3, rolling_friction_coeff=0.001) +icfd.add(demanalysis) + +# define model +mat = MatICFD(flow_density=2.0, dynamic_viscosity=0.01) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +icfd.set_initial(velocity=Velocity(1, 0, 0)) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3]) +meshvol.meshsize_box(size=0.05,min_point=Point(-1, -1, -1),max_point=Point(1, 1, 1)) +icfd.add(meshvol) + +#define rigid cylinder +matrigid = MatRigidDiscrete(mass_density=1000,young_modulus=1e4) +disc = SolidPart(101) +disc.set_material(matrigid) +disc.set_element_formulation(SolidFormulation.ONE_POINT_COROTATIONAL) +icfd.parts.add(disc) + +solution.create_database_binary(dt=1.0) +solution.save_file() diff --git a/version/0.3/_downloads/bf771f225224686f80c0ae60d04741f3/icfd_free_convection_flow.py b/version/0.3/_downloads/bf771f225224686f80c0ae60d04741f3/icfd_free_convection_flow.py new file mode 100644 index 000000000..45284f96a --- /dev/null +++ b/version/0.3/_downloads/bf771f225224686f80c0ae60d04741f3/icfd_free_convection_flow.py @@ -0,0 +1,88 @@ +""" +Thermal flow +============ + +This example shows a simple ICFD forced-convection input deck with a coarse mesh. +The executable file for LS-DYNA is`` ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Gravity, + GravityOption + +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/free_convection_flow.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.free_convection_flow + os.sep +fns.append(path + "free_convection_flow.k") +solution.open_files(fns) +solution.set_termination(termination_time=30) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.01) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=37.799999, dynamic_viscosity=1,heat_capacity = 0.7,thermal_conductivity=1.0,thermal_expansion_coefficient=1) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_non_slip() +part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[1, 1])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_non_slip() +part_outflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_non_slip() +part_symmetric.compute_temperature() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.compute_temperature() +icfd.parts.add(part_wall) + +icfd.set_initial() + +g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[1, 1])) +icfd.add(g) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3,4]) +icfd.add(meshvol) + +solution.create_database_binary(dt=1) +solution.save_file() diff --git a/version/0.3/_downloads/c04899840c098784ca12117d664f304c/camry_rc.py b/version/0.3/_downloads/c04899840c098784ca12117d664f304c/camry_rc.py new file mode 100644 index 000000000..b559b7d8d --- /dev/null +++ b/version/0.3/_downloads/c04899840c098784ca12117d664f304c/camry_rc.py @@ -0,0 +1,362 @@ +""" +Implicit model +============== +This example shows how to create and use an implicit dynamic roof crush model. + +""" +############################################################################### +# Perform required imports +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Peform required imports. +# +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Curve, + BeamPart, + ShellPart, + NodeSet, + PartSet, + TimestepCtrol, + Contact, + ContactType, + ContactCategory, + ContactSurface, + DOF, + OffsetType, + AnalysisType +) +from ansys.dyna.core.pre.dynamaterial import ( + MatNull, + MatRigid, + MatSpotweld, + MatModifiedPiecewiseLinearPlasticity, + MatPiecewiseLinearPlasticity, +) +from camry_rc_data import * +from ansys.dyna.core.pre import examples + +############################################################################### +# Manually start the ``pre`` service +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Copy the ``pyDyna/src/ansys/dyna/core/pre/Server``folder to a desired location. +# Start the ``pre`` service at this location by running this command: +# +# ``python kwserver.py`` +# +# Once the ``pre`` servic is running, you can connect a client to it using +# the hostname and the port. This example uses the default local host and port +# (``"localhost"`` and ``"50051"`` respectively). +# +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +camry_solution = DynaSolution(hostname) + +############################################################################### +# Import initial mesh data +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Import the initial mesh data (nodes and elements), which includes the +# vehicle data, weld data, and platen data. +# +fns = [] +path = examples.camry_rc + os.sep +fns.append(path + "Camry_RC_main.k") +fns.append(path + "501_RIG_BAR_roof_crush_platen5.key") +fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7.k") +fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7_nodes.k") +fns.append(path + "roof_welds.k") +fns.append(path + "weld7.k") +fns.append(path + "xtra_sw.k") +camry_solution.open_files(fns) + +############################################################################### +# Define global control cards +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Because roof crush is a quasi-static loading case, you must run this model +# as an implicit dynamic solution. Define the global control cards. From +# the ``dynasolution`` class, set the termination time and the frequency for +# the database ASCII options. +# +camry_solution.set_termination(10) + +############################################################################### +# Use the implicit analysis methods in the ``dynamech`` class to define +# the IMPLICIT control cards. +# +camry = DynaMech(analysis=AnalysisType.EXPLICIT) +camry_solution.add(camry) + +############################################################################### +# Set the automatic timestep control flag +# and the optimal equilibrium iteration count per timestep. +# +camry.implicitanalysis.set_initial_timestep_size(0.1) +camry.implicitanalysis.set_timestep( + control_flag=TimestepCtrol.AUTOMATICALLY_ADJUST_TIMESTEP_SIZE, + Optimum_equilibrium_iteration_count=511, +) + +############################################################################### +# Use the ``set_dynamic()`` method to set the IMASS value to 1 and assign the +# gamma and beta values. +# +camry.implicitanalysis.set_dynamic(gamma=0.6, beta=0.38) +############################################################################### +# If normal modes must be extracted, use the ``set_eigenvalue()`` method. +# The ``set_solution()`` method defines NSOLVR as 12 (Nolinear with BFGS update). +# +camry.implicitanalysis.set_eigenvalue() +camry.implicitanalysis.set_solution(iteration_limit=1, + stiffness_reformation_limit=50, absolute_convergence_tolerance=-100 +) + +############################################################################### +# Define materials +# ~~~~~~~~~~~~~~~~ +# This model uses four classes of material: ``MAT_NULL``, ``MAT_RIGID,`` +# ``MAT_SPOTWELD``, and ``MAT_PIECEWISE_LINEAR_PLASTICITY``. Use the ``dynamaterial`` +# class to define these materials. +# +matnull = MatNull(mass_density=6e-11) +matrigid = MatRigid(mass_density=7.890e-09, young_modulus=2.100e05, poisson_ratio=0.3) +matplaten = MatRigid( + mass_density=7.80e-09, + young_modulus=2.00e05, + poisson_ratio=0.3, + center_of_mass_constraint=1, + rotational_constraint=7, +) +spotweldharden2100 = MatSpotweld( + mass_density=7.850e-09, + young_modulus=2.100e05, + poisson_ratio=0.3, + yield_stress=510, + plastic_hardening_modulus=2100, +) +spotweldharden2200 = MatSpotweld( + mass_density=7.850e-09, + young_modulus=2.100e05, + poisson_ratio=0.3, + yield_stress=510, + plastic_hardening_modulus=2200, +) +windowshield = MatModifiedPiecewiseLinearPlasticity( + mass_density=2.355e-09, + young_modulus=7.000e04, + poisson_ratio=0.22, + yield_stress=30, + tangent_modulus=1400, + plastic_strain_to_failure=0.015, + integration_points_number=1, +) +windowsrear = MatModifiedPiecewiseLinearPlasticity( + mass_density=2.425e-09, + young_modulus=7.000e04, + poisson_ratio=0.22, + yield_stress=30, + tangent_modulus=1400, + plastic_strain_to_failure=0.015, + integration_points_number=1, +) +plastic300 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=300, tangent_modulus=5000 +) +plastic250 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=250, tangent_modulus=5000 +) +plastic360 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=360, tangent_modulus=5000 +) +plastic180 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=180, tangent_modulus=5000 +) +plastic450 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=450, tangent_modulus=5000 +) +plastic1300 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=1300, tangent_modulus=5000 +) +plastic400 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=400, tangent_modulus=5000 +) +plastic500 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=500, tangent_modulus=5000 +) +plastic675 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=675, tangent_modulus=5000 +) +plastic310 = MatPiecewiseLinearPlasticity( + mass_density=2.255e-09, young_modulus=70000, yield_stress=310, tangent_modulus=5000 +) +plastic220 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=5000 +) +plastic220_410 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=410 +) + +############################################################################### +# Assign section and material properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Once all materials are explicitly defined, these material IDs must be cross-referenced +# in the *PART* card. You use the ``set_material()`` method for this. Because many parts +# share common materials, the assignment happens within a loop. Within the loop, the +# ``set_element_formulation()`` method is called to assign the elform for the beam and +# shell elements. Accordingly, either the beam diameter or the shell thickness is also +# defined. To identify the part ID that has a particular material type, a predefined +# list is made available in the ``camry_rc_data.py`` file, which is read in this script. +# +for bpart in beamparts: + part = BeamPart(bpart[0]) + if part.id in [50000002]: + part.set_material(spotweldharden2200) + else: + part.set_material(spotweldharden2100) + part.set_element_formulation(bpart[1]) + part.set_diameter(bpart[2]) + camry.parts.add(part) + +for spart in shellparts: + part = ShellPart(spart[0]) + if part.id in [1463, 1464]: + part.set_material(matnull) + elif part.id in [417, 419, 530, 532, 585, 586, 587, 588]: + part.set_material(matrigid) + elif part.id in [50000001]: + part.set_material(matplaten) + elif part.id in [290]: + part.set_material(windowshield) + elif part.id in [291]: + part.set_material(windowsrear) + elif part.id in partswithmat300: + part.set_material(plastic300) + elif part.id in partswithmat250: + part.set_material(plastic250) + elif part.id in partswithmat360: + part.set_material(plastic360) + elif part.id in partswithmat180: + part.set_material(plastic180) + elif part.id in partswithmat450: + part.set_material(plastic450) + elif part.id in partswithmat400: + part.set_material(plastic400) + elif part.id in partswithmat500: + part.set_material(plastic500) + elif part.id in [57]: + part.set_material(plastic1300) + elif part.id in [286]: + part.set_material(plastic675) + elif part.id in [5000000]: + part.set_material(plastic310) + elif part.id in [5000006]: + part.set_material(plastic220) + elif part.id in [5000007]: + part.set_material(plastic220_410) + else: + pass + part.set_element_formulation(spart[1]) + part.set_thickness(spart[2]) + camry.parts.add(part) + +############################################################################### +# Generate keywords for spotwelds and nodal rigid bodies +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# The ``camry_rc_data.py`` contains the predefined node pairs and node sets +# required for the *CONSTRAINED_SPOTWELD* and *CONSTRAINED_NODAL_RIGID_BODY* +# definitions. Loop through these lists to generate the appropriate keywords. +# +for sw in spotweld: + camry.constraints.create_spotweld(nodeid1=sw[0], nodeid2=sw[1]) + +for cnrb in cnrbs: + camry.constraints.create_cnrb(nodeset=NodeSet(cnrb)) + +############################################################################### +# Define contacts +# ~~~~~~~~~~~~~~~ +# There are three contacts defined in this model: +# +# - Automatic single surface contact for the BIW self contact +# - Surface-to-surface contact between the platen and the BIW +# - Tied contact for the spotweld beams +# +# Use the ``ContactSurface()`` method to set the SSTYPE and MSTYPE. +# The ``PartSet()`` method accepts the name of a list and converts it to +# *PART_SET_LIST*. Notice how the contact type and category can be used +# to create the three different type of contacts for this model. +# +selfcontact = Contact(type=ContactType.AUTOMATIC) +selfcontact.set_mortar() +selfcontact.set_friction_coefficient(static=0.2) +surf1 = ContactSurface(PartSet(vehicle)) +selfcontact.set_slave_surface(surf1) +camry.contacts.add(selfcontact) + +platebiw = Contact(type=ContactType.AUTOMATIC, category=ContactCategory.SURFACE_TO_SURFACE_CONTACT) +platebiw.set_mortar() +platebiw.set_friction_coefficient(static=0.2, dynamic=0.2) +surf1 = ContactSurface(PartSet(biw)) +surf2 = ContactSurface(PartSet(platen)) +platebiw.set_slave_surface(surf1) +platebiw.set_master_surface(surf2) +camry.contacts.add(platebiw) + +swcontact = Contact( + type=ContactType.TIED, + category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT, + offset=OffsetType.CONSTRAINED_OFFSET, +) +spotweldbeam = ContactSurface(PartSet(spotweldbeams)) +spotweldbeam.set_contact_thickness(thickness=-0.9) +spotweldsurface = ContactSurface(PartSet(spotweldsurfaces)) +spotweldsurface.set_contact_thickness(thickness=-0.9) +swcontact.set_slave_surface(spotweldbeam) +swcontact.set_master_surface(spotweldsurface) +camry.contacts.add(swcontact) + +############################################################################### +# Define SPC +# ~~~~~~~~~~ +# You can use the ``boundaryconditions`` class to define both SPCs and +# prescribed motions. The bottom of the BIW is SPCed by selecting a few nodes. +# The prescribed motion is then assigned to the platen. +camry.boundaryconditions.create_spc(NodeSet(spc)) + +crv = Curve( + x=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9.77, 100], + y=[0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 127, 127], +) +platen = PartSet([50000001]) +camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.X_TRANSLATIONAL, scalefactor=-0.0802216 +) +camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.Y_TRANSLATIONAL, scalefactor=-0.0802216 +) +camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.Z_TRANSLATIONAL, scalefactor=-0.0802216 +) + +############################################################################### +# Define database cards and save input file +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define the frequency of output for the binary and ASCII database outputs +# and save the input file. +# +camry_solution.create_database_binary(dt=0.001) +camry_solution.set_output_database( + elout=0.0001, + glstat=0.0001, + matsum=0.0001, + nodout=0.0001, + rbdout=0.0001, + rcforc=0.0001, + secforc=0.0001, +) + +camry_solution.save_file() diff --git a/version/0.3/_downloads/c370dd0f14db5783ce70aa60e7e9d7b4/nvh_frf_solid.ipynb b/version/0.3/_downloads/c370dd0f14db5783ce70aa60e7e9d7b4/nvh_frf_solid.ipynb new file mode 100644 index 000000000..b55b04e45 --- /dev/null +++ b/version/0.3/_downloads/c370dd0f14db5783ce70aa60e7e9d7b4/nvh_frf_solid.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "FRF for a colume model with a hole\n==================================\n\nThis example shows a column with a hole using solid elements. The\nexecutable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamaterial import MatPiecewiseLinearPlasticity\nfrom ansys.dyna.core.pre.dynanvh import (\n DynaNVH,\n FrequencyDomain,\n ExcitationDOF,\n NodeSet,\n SolidPart,\n SolidFormulation,\n ResponseDOF,\n ResponseType,\n EnergyFlag,\n OutputEcho,\n ExcitationType\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.nvh_frf_solid + os.sep\nfns.append(path + \"frf_solid.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=1)\n\nnvhobj = DynaNVH()\nsolution.add(nvhobj)\n\nnvhobj.set_energy(hourglass_energy=EnergyFlag.COMPUTED)\nnvhobj.set_output(print_suppression_d3hsp=True,print_suppression_echo=OutputEcho.SUPPRESSED_NODAL_AND_ELEMENT_PRINTING)\n\nnvhobj.implicitanalysis.set_initial_timestep_size(1.0)\nnvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100)\nnvhobj.implicitanalysis.set_solution(solution_method=1)\n\nfd = FrequencyDomain()\n\noutputset = [290,292,294,296,298,300,302,304,306,380,382,384,386,388,390,482,484,486,488,490,492,578,580,582,638,640,706,708]\nfd.set_frequency_response_function(\n excitation_input_dof=ExcitationDOF.X,\n excitation_input_type=ExcitationType.BASE_ACCELERATION,\n max_natural_frequency=20,\n modal_damping_coefficient=0.01,\n response_output_set=NodeSet(outputset),\n response_output_dof=ResponseDOF.X,\n response_output_type=ResponseType.BASE_ACCELERATION,\n frf_output_min_frequency=0.01,\n frf_output_max_frequency=10,\n frf_output_num_frequency=1000,\n)\nnvhobj.add(fd)\n\nplastic1 = MatPiecewiseLinearPlasticity(\n mass_density=4.99e-07, young_modulus=11.37,poisson_ratio=0.32, yield_stress=0.0468\n)\nplastic2 = MatPiecewiseLinearPlasticity(\n mass_density=4.99e-07, young_modulus=110.37,poisson_ratio=0.32, yield_stress=0.0468\n)\n\nlower = SolidPart(4)\nlower.set_material(plastic1)\nlower.set_element_formulation(SolidFormulation.IMPLICIT_9_POINT_ENHANCED_STRAIN)\nnvhobj.parts.add(lower)\n\nupper = SolidPart(5)\nupper.set_material(plastic2)\nupper.set_element_formulation(SolidFormulation.IMPLICIT_9_POINT_ENHANCED_STRAIN)\nnvhobj.parts.add(upper)\n\nspc = [163,166,169,172,175,178,181,184,187,307,310,313,316,319,322,391,394,397,400,403,406,493,496,499,589,592,645,648]\nnvhobj.boundaryconditions.create_spc(NodeSet(spc))\n\nsolution.create_database_binary(dt=0.1)\nsolution.set_output_database(\n glstat=0.1,\n matsum=0.1,\n)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/cd113194b07b8f747fc3e64868361218/airbag_deploy.ipynb b/version/0.3/_downloads/cd113194b07b8f747fc3e64868361218/airbag_deploy.ipynb new file mode 100644 index 000000000..d10de7947 --- /dev/null +++ b/version/0.3/_downloads/cd113194b07b8f747fc3e64868361218/airbag_deploy.ipynb @@ -0,0 +1,212 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Airbag deploy\n=============\n\nThis example shows how to create an airbag deploy model with the PyDNYA\n`pre` service. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Perform required imports\n========================\n\nPeform required imports.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n Airbag,\n PartSet,\n Curve,\n Point,\n RigidwallPlanar,\n Contact,\n ContactSurface,\n ContactCategory,\n ShellPart,\n ShellFormulation,\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Manually start the `pre` service\n================================\n\nCopy the `pyDyna/src/ansys/dyna/core/pre/Server`folder to a desired\nlocation. Start the `pre` service at this location by running this\ncommand:\n\n`python kwserver.py`\n\nOnce the `pre` servic is running, you can connect a client to it using\nthe hostname and the port. This example uses the default local host and\nport (`\"localhost\"` and `\"50051\"` respectively).\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "from ansys.dyna.core.pre.dynamaterial import MatRigid, MatFabric\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start the solution workflow\n===========================\n\nThe `DynaSolution` class is like a workflow orchestrator. It inherits\nmethods from other classes and helps create a complete workflow.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "airbag_solution = DynaSolution(hostname)\nfns = []\n# path = sys.path[0] + os.sep + \"input\" + os.sep + \"airbag_deploy\" + os.sep\npath = examples.airbag_deploy + os.sep\nfns.append(path + \"airbag_deploy.k\")\nairbag_solution.open_files(fns)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create standard explicit control cards\n======================================\n\nThis code uses the `set_termination` method to set the termination time\nto `0.03` in *CONTROL\\_TERMINATION*. The `DynaMech` class automatically\ngenerates the common control cards used in explicit problems.\n`CONTROL_ACCURACY`, `CONTACT`, `BULK VISCOCITY`, and `CONTACT`are all\nautomatically generated.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "airbag_solution.set_termination(0.03)\n\nairbagdeploy = DynaMech()\nairbag_solution.add(airbagdeploy)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define *AIRBAG\\_SIMPLE\\_AIRBAG\\_MODEL* as a keyword\n===================================================\n\nUse the `Airbag` function in the `DynaMech` class to define\n*AIRBAG\\_SIMPLE\\_AIRBAG\\_MODEL* as a keyword. While LS-DYNA has many\ndifferent airbag models, PyDYNA currently supports only one airbag\nmodel, SIMPLE\\_AIRBAG\\_MODEL. If you have an urgent need for PyDYNA to\nsupport another airbag model, email .\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "airbag = Airbag(\n set=PartSet([3]),\n heat_capacity_at_constant_volume=1.736e3,\n heat_capacity_at_constant_pressure=2.43e3,\n input_gas_temperature=1.2e3,\n input_mass_flow_rate=Curve(x=[0, 0.032, 0.045, 0.08], y=[0, 26, 0.6, 0.1]),\n shape_factor_for_exit_hole=0.7,\n ambient_pressure=14.7,\n ambient_density=3.821e-6,\n)\nairbagdeploy.add(airbag)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Generate an infinite planar rigid wall\n======================================\n\nTo generate an infinite planar rigidwall, define the coordinates of the\nheat vector and the tail vector of the plane.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "rigidwall = RigidwallPlanar(Point(0, 0, 0), Point(0, 1, 0), coulomb_friction_coefficient=0.5)\nairbagdeploy.add(rigidwall)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define a node-to-surface contact\n================================\n\nDefine a node-to-surface contact by passing a master part set and a\nslave part set.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "contact = Contact(category=ContactCategory.NODES_TO_SURFACE)\ncontact.set_friction_coefficient(static=0.5, dynamic=0.5)\nsurf1 = ContactSurface(PartSet([3]))\nsurf2 = ContactSurface(PartSet([2]))\nsurf2.set_penalty_stiffness_scale_factor(0.06667)\ncontact.set_slave_surface(surf1)\ncontact.set_master_surface(surf2)\nairbagdeploy.contacts.add(contact)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define material cards\n=====================\n\nLS-DYNA has over 300 materials that are used for varied applications.\nWhlie PyDYNA does not yet support all material cards, it does support\nsome of the most commonly used materials, including `FABRIC`,\n[MAT\\_ELASTIC]{.title-ref}[,\n]{.title-ref}[PIECEWISE\\_LINEAR\\_PLASTICITY]{.title-ref}[, and\n]{.title-ref}[RIGID]{.title-ref}[. All supported materials are accessed\nfrom the ]{.title-ref}[dynamaterial]{.title-ref}[ class. In the\nfollowing code, ]{.title-ref}[MAT\\_RIGID]{.title-ref}[ is defined as the\nmaterial for the cylindrical tube and the bottom plate.\n]{.title-ref}[MAT\\_FABRIC]{.title-ref}[ is defined as the material for\nthe airbag volume. Note that ]{.title-ref}[platemat]{.title-ref}\\` has\ncontraints defined as well.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "platemat = MatRigid(\n mass_density=7.84e-4,\n young_modulus=30e6,\n center_of_mass_constraint=1,\n translational_constraint=7,\n rotational_constraint=7,\n)\ncylindermat = MatRigid(mass_density=1.96e-4, young_modulus=30e6)\nairbagmat = MatFabric(\n mass_density=1e-4,\n young_modulus_longitudinal_direction=2e6,\n young_modulus_transverse_direction=2e6,\n shear_modulus=1.53e6,\n)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define sectional properties\n===========================\n\nThe following code defines the sectional properties of the parts. This\nexample has three shell parts. Each shell part is initialized as\n`ShellPart` with a unique ID and an appropriate shell formulation is\nassigned. Again, PyDYNA does not yet support all element formulations.\nYou can find the supported formulations in `dynabase` class.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plate = ShellPart(1)\nplate.set_material(platemat)\nplate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nplate.set_thickness(0.5)\nairbagdeploy.parts.add(plate)\n\ncylinder = ShellPart(2)\ncylinder.set_material(cylindermat)\ncylinder.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\ncylinder.set_thickness(0.5)\nairbagdeploy.parts.add(cylinder)\n\nairbagpart = ShellPart(3)\nairbagpart.set_material(airbagmat)\nairbagpart.set_element_formulation(ShellFormulation.FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE)\nairbagpart.set_thickness(0.015)\nairbagpart.set_integration_points(4)\nairbagdeploy.parts.add(airbagpart)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define database outputs\n=======================\n\nUse the `set_output_database()` and `create_database_binary()` methods\nto define the output frequency of the ASCII and binary D3PLOT files.\nThen, use the `save_file()` method to write out the model as an input\nDYNA key file.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "airbag_solution.set_output_database(\n abstat=2.0e-4, glstat=2.0e-4, matsum=2.0e-4, rcforc=2.0e-4, rbdout=2.0e-4, rwforc=2.0e-4\n)\nairbag_solution.create_database_binary(dt=5e-4, ieverp=1)\nairbag_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/ce5db160925f8de4caffc07437be1bc7/icfd_cylinderflow.ipynb b/version/0.3/_downloads/ce5db160925f8de4caffc07437be1bc7/icfd_cylinderflow.ipynb new file mode 100644 index 000000000..757b9819b --- /dev/null +++ b/version/0.3/_downloads/ce5db160925f8de4caffc07437be1bc7/icfd_cylinderflow.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Cylinder flow\n=============\n\nThis example shows how to create a simple ICFD cylinder flow input deck.\nThe executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n ICFDAnalysis,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nicfd_solution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.cylinder_flow + os.sep\nfns.append(path + \"cylinder_flow.k\")\nicfd_solution.open_files(fns)\n# Set total time of simulation\nicfd_solution.set_termination(termination_time=100)\n\nicfd = DynaICFD()\nicfd_solution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=3)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3, 4])\nicfd.add(meshvol)\n\nicfd_solution.create_database_binary(dt=1)\nicfd_solution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/d66c56577eff715fd2297ff61958c66b/icfd_free_convection_flow.ipynb b/version/0.3/_downloads/d66c56577eff715fd2297ff61958c66b/icfd_free_convection_flow.ipynb new file mode 100644 index 000000000..847fd747e --- /dev/null +++ b/version/0.3/_downloads/d66c56577eff715fd2297ff61958c66b/icfd_free_convection_flow.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Thermal flow\n============\n\nThis example shows a simple ICFD forced-convection input deck with a\ncoarse mesh. The executable file for LS-DYNA\nis`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n Gravity,\n GravityOption\n\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.free_convection_flow + os.sep\nfns.append(path + \"free_convection_flow.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=30)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.01)\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=37.799999, dynamic_viscosity=1,heat_capacity = 0.7,thermal_conductivity=1.0,thermal_expansion_coefficient=1)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_non_slip()\npart_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[1, 1]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_non_slip()\npart_outflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_non_slip()\npart_symmetric.compute_temperature()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_temperature()\nicfd.parts.add(part_wall)\n\nicfd.set_initial()\n\ng = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[1, 1]))\nicfd.add(g)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3,4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/d75c8269ba954daad414a42a3b4d1b92/thermal_stress.py b/version/0.3/_downloads/d75c8269ba954daad414a42a3b4d1b92/thermal_stress.py new file mode 100644 index 000000000..49eb5390e --- /dev/null +++ b/version/0.3/_downloads/d75c8269ba954daad414a42a3b4d1b92/thermal_stress.py @@ -0,0 +1,117 @@ +""" +Thermal stress example +====================== + +This example shows how to create a thermal stress model with the PyDYNA ``pre`` service. +The executable file for LS-DYNA is ``ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +""" +############################################################################### +# Perform required imports +# ~~~~~~~~~~~~~~~~~~~~~~~~ +# Peform required imports. +# +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamech import ( + DynaMech, + ThermalAnalysis, + ThermalAnalysisType, + SolidPart, + SolidFormulation, + NodeSet, + AnalysisType +) +from ansys.dyna.core.pre.dynamaterial import MatElasticPlasticThermal +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/thermal/thermal.png' +############################################################################### +# Manually start the ``pre`` service +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Copy the ``pyDyna/src/ansys/dyna/core/pre/Server``folder to a desired location. +# Start the ``pre`` service at this location by running this command: +# +# ``python kwserver.py`` +# +# Once the ``pre`` servic is running, you can connect a client to it using +# the hostname and the port. This example uses the default local host and port +# (``"localhost"`` and ``"50051"`` respectively). +# +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +solution = DynaSolution(hostname) + +############################################################################### +# Start the solution workflow +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# NODES and ELEMENTS are read in from the ``thermal_stress.k`` file. This file also has the +# *PART* defined in it, but the section and material fields are empty to begin with. +fns = [] +path = examples.thermal_stress + os.sep +fns.append(path + "thermal_stress.k") +solution.open_files(fns) + +############################################################################### +# Set simulation termination time +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Set the simulation termination time. +# +solution.set_termination(3.0) + +############################################################################### +# To invoke the transient thermal solver, set the thermal analysis type for +# ``CONTROL_SOLUTION`` to 2 by ``ThermalAnalysisType.TRANSIENT``. +# +ts = DynaMech(analysis=AnalysisType.EXPLICIT) +solution.add(ts) + +tanalysis = ThermalAnalysis() +tanalysis.set_timestep(initial_timestep=0.1) +tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) +ts.add(tanalysis) + +ts.set_timestep(timestep_size_for_mass_scaled=0.01) + +############################################################################### +# Define material and section properties +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define the ``MAT_4`` material, which can have temperature-dependent +# properties. For the ``MAT_THERMAL_ISOTROPIC`` property, which is associated +# with the same part, define the specific heat, thermal conductivity, and thermal +# generation rate. +# +mat = MatElasticPlasticThermal( + mass_density=1.0, + temperatures=(0,10,20,30,40,50), + young_modulus=(1e10,1e10,1e10,1e10,1e10,1e10), + poisson_ratio=(0.3,0.3,0.3,0.3,0.3,0.3), + thermal_expansion=(0,2e-6,4e-6,6e-6,8e-6,1e-5), + yield_stress = (1e20,1e20,1e20,1e20,1e20,1e20) +) +mat.set_thermal_isotropic(density=1,generation_rate_multiplier=10,specific_heat=1,conductivity=1) + +slab = SolidPart(1) +slab.set_material(mat) +slab.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) +ts.parts.add(slab) + +############################################################################### +# Set initial conditions +# ~~~~~~~~~~~~~~~~~~~~~~~ +# Initialize nodes 1 through 8 with a temperature of 10 degrees. +# +for i in range(1,9): + ts.initialconditions.create_temperature(NodeSet([i]),temperature=10) + +############################################################################### +# Define output frequencies and save input file +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# Define output frequencies and save the input file to disk. +# +solution.set_output_database(glstat=0.03) +solution.create_database_binary(dt=0.01) +solution.save_file() diff --git a/version/0.3/_downloads/dd3a3cc3c943acdd6d8fe16ac384c06e/em_resistive_heating_2d_multi_isopots.ipynb b/version/0.3/_downloads/dd3a3cc3c943acdd6d8fe16ac384c06e/em_resistive_heating_2d_multi_isopots.ipynb new file mode 100644 index 000000000..5aa10d343 --- /dev/null +++ b/version/0.3/_downloads/dd3a3cc3c943acdd6d8fe16ac384c06e/em_resistive_heating_2d_multi_isopots.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Resistive heating 2D multiple connect isopotential\n==================================================\n\nThis example shows how to define complex circuits as inlet boundary\nconditions. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaem import (\n DynaEM,\n PartSet,\n NodeSet,\n SegmentSet,\n Curve,\n ShellPart,\n ShellFormulation,\n FEMSOLVER,\n ThermalAnalysis,\n ThermalAnalysisType,\n EMType,\n Isopotential_ConnType,\n Isopotential,\n RogoCoil,\n EMDimension\n)\nfrom ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE\nfrom em_set_data import rogoseg\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\nfns = []\npath = examples.em_resistive_heating_2d_multi_isopots + os.sep\nfns.append(path + \"em_resistive_heating_2d_multi_isopots.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=0.0101)\nsolution.create_database_binary(dt=1e-4)\n\nemobj = DynaEM()\nsolution.add(emobj)\n\nemobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4)\n\nemobj.analysis.set_timestep(timestep=1e-4)\nemobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING,dimtype=EMDimension.PLANAR_2D)\n\ntanalysis = ThermalAnalysis()\ntanalysis.set_timestep(initial_timestep=1e-4)\ntanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT)\nemobj.add(tanalysis)\n\nmatrigid = MatRigid(mass_density=1, young_modulus=2e11)\nmatrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4)\n\nmatthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7)\n\npart = ShellPart(1)\npart.set_material(matrigid,matthermaliso)\npart.set_element_formulation(ShellFormulation.PLANE_STRESS)\nemobj.parts.add(part)\n\nemobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10]))\nemobj.set_init_temperature(temp=25)\n\ncrv = Curve(func=\"-5./0.01*EXP(-TIME/((5.e-4+0.05+0.01)*0.04))\")\nnset1 = NodeSet([521,517,513,509,525])\nnset2 = NodeSet([549,548,577,597,617]) \nnset3 = NodeSet([653,644,626,627,662]) \nnset4 = NodeSet([642,652,661,670,643]) \nemobj.connect_isopotential(contype = Isopotential_ConnType.CURRENT_SOURCE,isopotential1 = Isopotential(nset4),isopotential2 = Isopotential(nset2),curve=crv)\nemobj.connect_isopotential(contype = Isopotential_ConnType.RESISTANCE,isopotential1 = Isopotential(nset4),isopotential2 = Isopotential(nset2),value=0.01)\nemobj.connect_isopotential(contype = Isopotential_ConnType.RESISTANCE,isopotential1 = Isopotential(nset3),isopotential2 = Isopotential(nset1),value=0.05)\nemobj.add(RogoCoil(SegmentSet(rogoseg)))\n\nemobj.create_em_output(mats=2, matf=2, sols=2, solf=2)\n\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/deb99af49d21747cb9cfb700f66939b1/icfd_strong_fsi.py b/version/0.3/_downloads/deb99af49d21747cb9cfb700f66939b1/icfd_strong_fsi.py new file mode 100644 index 000000000..4412a0063 --- /dev/null +++ b/version/0.3/_downloads/deb99af49d21747cb9cfb700f66939b1/icfd_strong_fsi.py @@ -0,0 +1,107 @@ +""" +Strong FSI +========== + +This example shows a simple FSI (fluid-structure interaction) coupling problem +using strong FSI. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ShellPart, + ShellFormulation, + PartSet, + Curve, + DOF, + Motion +) +from ansys.dyna.core.pre.dynamaterial import MatRigid +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/strong_fsi.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.strong_fsi + os.sep +fns.append(path + "strong_fsi.k") +solution.open_files(fns) +solution.set_termination(termination_time=40) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_timestep(0.05) +icfdanalysis.set_fsi() +icfd.add(icfdanalysis) + +icfd.implicitanalysis.set_initial_timestep_size( + size=10 +) +icfd.implicitanalysis.set_dynamic(gamma=0.6, beta=0.4) +icfd.implicitanalysis.set_solution( + iteration_limit=100, stiffness_reformation_limit=150 +) + +# define model +mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + +part_inflow = ICFDPart(1) +part_inflow.set_material(mat) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) +part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_inflow) + +part_outflow = ICFDPart(2) +part_outflow.set_material(mat) +part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) +icfd.parts.add(part_outflow) + +part_symmetric = ICFDPart(3) +part_symmetric.set_material(mat) +part_symmetric.set_free_slip() +icfd.parts.add(part_symmetric) + +part_wall = ICFDPart(4) +part_wall.set_material(mat) +part_wall.set_non_slip() +part_wall.set_fsi() +part_wall.compute_drag_force() +part_wall.set_boundary_layer(number=3) +icfd.parts.add(part_wall) + +partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) +icfd.add(meshvol) + +#define rigid cylinder +matrigid = MatRigid(mass_density=1.2,young_modulus=2e11,poisson_ratio=0.3) +cylinder = ShellPart(1) +cylinder.set_material(matrigid) +cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS) +icfd.parts.add(cylinder) +# Define boundary conddition +icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY) + +solution.create_database_binary(dt=0.1) +solution.save_file() diff --git a/version/0.3/_downloads/eca29c48c4159cef155b9c422ac04952/nvh_frf_solid.py b/version/0.3/_downloads/eca29c48c4159cef155b9c422ac04952/nvh_frf_solid.py new file mode 100644 index 000000000..cf30e45cc --- /dev/null +++ b/version/0.3/_downloads/eca29c48c4159cef155b9c422ac04952/nvh_frf_solid.py @@ -0,0 +1,93 @@ +""" +FRF for a colume model with a hole +================================== + +This example shows a column with a hole using solid elements. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +""" +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamaterial import MatPiecewiseLinearPlasticity +from ansys.dyna.core.pre.dynanvh import ( + DynaNVH, + FrequencyDomain, + ExcitationDOF, + NodeSet, + SolidPart, + SolidFormulation, + ResponseDOF, + ResponseType, + EnergyFlag, + OutputEcho, + ExcitationType +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/nvh/frf_column_hole.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +solution = DynaSolution(hostname) +fns = [] +path = examples.nvh_frf_solid + os.sep +fns.append(path + "frf_solid.k") +solution.open_files(fns) +solution.set_termination(termination_time=1) + +nvhobj = DynaNVH() +solution.add(nvhobj) + +nvhobj.set_energy(hourglass_energy=EnergyFlag.COMPUTED) +nvhobj.set_output(print_suppression_d3hsp=True,print_suppression_echo=OutputEcho.SUPPRESSED_NODAL_AND_ELEMENT_PRINTING) + +nvhobj.implicitanalysis.set_initial_timestep_size(1.0) +nvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100) +nvhobj.implicitanalysis.set_solution(solution_method=1) + +fd = FrequencyDomain() + +outputset = [290,292,294,296,298,300,302,304,306,380,382,384,386,388,390,482,484,486,488,490,492,578,580,582,638,640,706,708] +fd.set_frequency_response_function( + excitation_input_dof=ExcitationDOF.X, + excitation_input_type=ExcitationType.BASE_ACCELERATION, + max_natural_frequency=20, + modal_damping_coefficient=0.01, + response_output_set=NodeSet(outputset), + response_output_dof=ResponseDOF.X, + response_output_type=ResponseType.BASE_ACCELERATION, + frf_output_min_frequency=0.01, + frf_output_max_frequency=10, + frf_output_num_frequency=1000, +) +nvhobj.add(fd) + +plastic1 = MatPiecewiseLinearPlasticity( + mass_density=4.99e-07, young_modulus=11.37,poisson_ratio=0.32, yield_stress=0.0468 +) +plastic2 = MatPiecewiseLinearPlasticity( + mass_density=4.99e-07, young_modulus=110.37,poisson_ratio=0.32, yield_stress=0.0468 +) + +lower = SolidPart(4) +lower.set_material(plastic1) +lower.set_element_formulation(SolidFormulation.IMPLICIT_9_POINT_ENHANCED_STRAIN) +nvhobj.parts.add(lower) + +upper = SolidPart(5) +upper.set_material(plastic2) +upper.set_element_formulation(SolidFormulation.IMPLICIT_9_POINT_ENHANCED_STRAIN) +nvhobj.parts.add(upper) + +spc = [163,166,169,172,175,178,181,184,187,307,310,313,316,319,322,391,394,397,400,403,406,493,496,499,589,592,645,648] +nvhobj.boundaryconditions.create_spc(NodeSet(spc)) + +solution.create_database_binary(dt=0.1) +solution.set_output_database( + glstat=0.1, + matsum=0.1, +) +solution.save_file() diff --git a/version/0.3/_downloads/f38acc7b3e23fee1fa397a12731b07c2/ball_plate.ipynb b/version/0.3/_downloads/f38acc7b3e23fee1fa397a12731b07c2/ball_plate.ipynb new file mode 100644 index 000000000..a80c1c125 --- /dev/null +++ b/version/0.3/_downloads/f38acc7b3e23fee1fa397a12731b07c2/ball_plate.ipynb @@ -0,0 +1,230 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Ball Plate\n==========\n\nThis example shows how to use the PyDYNA `pre` service to create a ball\nplate model. The executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Perform required imports\n========================\n\nPeform required imports.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynamech import (\n DynaMech,\n Velocity,\n PartSet,\n ShellPart,\n SolidPart,\n NodeSet,\n Contact,\n ContactSurface,\n ShellFormulation,\n SolidFormulation,\n ContactType,\n AnalysisType\n)\nfrom ansys.dyna.core.pre.dynamaterial import (\n MatRigid,\n MatPiecewiseLinearPlasticity,\n)\nfrom ansys.dyna.core.pre import examples" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start the `pre` service\n=======================\n\nPrerequisite: make sure the `pre` service docker have been started.\nRefer to:\n\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "# Once the ``pre`` servic is running, you can connect a client to it using\n# the host name and the port. This example uses the default local host and port\n# (``\"localhost\"`` and ``\"50051\"`` respectively).\n#\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\nsolution = DynaSolution(hostname)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Start the solution workflow\n===========================\n\nNODES and ELEMENTS are read in from the `ball_plate.k` file. This file\nalso has the *PART* defined in it, but the section and material fields\nare empty to begin with.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "fns = []\npath = examples.ball_plate + os.sep\nfns.append(path+\"ball_plate.k\")\nsolution.open_files(fns)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Create database and control cards\n=================================\n\nFor the D3plots, set simulation termination time, simulation timestep,\nand output frequency.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "solution.set_termination(termination_time=10)\n\nballplate = DynaMech(AnalysisType.NONE)\nsolution.add(ballplate)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define materials\n================\n\nThe `dynamaterials` class are used to define these materials:\n`MAT_RIGID`, `MAT_PIECEWISE_LINEAR_PLASTICITY`,\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "matrigid = MatRigid(mass_density=7.83e-6, young_modulus=207, poisson_ratio=0.3)\nmatplastic = MatPiecewiseLinearPlasticity(mass_density=7.83e-6, young_modulus=207, yield_stress=0.2, tangent_modulus=2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define section properties and assign materials\n==============================================\n\nNow that you have materials with the material ID corresponding to the\nPart ID, you can assign these materials to the parts. also define the\nsection properties, element formulations, and constraints.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "plate = ShellPart(1)\nplate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY)\nplate.set_material(matplastic)\nplate.set_thickness(1)\nplate.set_integration_points(5)\nballplate.parts.add(plate)\n\nball = SolidPart(2)\nball.set_material(matrigid)\nball.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT)\nballplate.parts.add(ball)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define surface-to-surface contacts\n==================================\n\nDefine single-surface contact between predefined part set.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "selfcontact = Contact(type=ContactType.AUTOMATIC)\nsurf1 = ContactSurface(PartSet([1, 2]))\nselfcontact.set_slave_surface(surf1)\nballplate.contacts.add(selfcontact)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define nodal single point constraints.\n======================================\n\nConstrain the nodes in the spc list\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "spc = [34,35,51,52,68,69,85,86,102,103,119,120,136,137,153,154,170,171,187,188,204,205,221,222,238,239,255,256]\nfor i in range(1,19):\n spc.append(i)\nfor i in range(272,290):\n spc.append(i)\nballplate.boundaryconditions.create_spc(NodeSet(spc),rx=False,ry=False,rz=False)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define initial condition.\n=========================\n\nUse the `create_velocity_node` method to initialize the velocity\ncomponents in the desired direction.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "for i in range(1,1652):\n ballplate.initialconditions.create_velocity_node(i,trans=Velocity(0, 0, -10))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Define database outputs\n=======================\n\nDefine the frequency for the D3PLOT file and write out the input file.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "solution.set_output_database(glstat=0.1, matsum=0.1, sleout=0.1)\nsolution.create_database_binary(dt=1)\nserverpath = solution.save_file()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Download output file\n====================\n\nDownload output file from service docker to local \\/output/.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "serveroutfile = '/'.join((serverpath,\"ball_plate.k\"))\ndownloadpath = os.path.join(os.getcwd(), \"output\")\nif not os.path.exists(downloadpath):\n os.makedirs(downloadpath)\ndownloadfile = os.path.join(downloadpath,\"ball_plate.k\")\nsolution.download(serveroutfile,downloadfile)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/f6bc4a05f3b1b4f4737821c4a3c48c7d/em_resistive_heating_2d_isopots.py b/version/0.3/_downloads/f6bc4a05f3b1b4f4737821c4a3c48c7d/em_resistive_heating_2d_isopots.py new file mode 100644 index 000000000..7b659c750 --- /dev/null +++ b/version/0.3/_downloads/f6bc4a05f3b1b4f4737821c4a3c48c7d/em_resistive_heating_2d_isopots.py @@ -0,0 +1,83 @@ +""" +Resistive heating 2D connect isopotential +========================================= + +This example shows how to use the ``connect_isopotential()`` method to +connect two parts. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +""" + +import os +import sys + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaem import ( + DynaEM, + PartSet, + NodeSet, + SegmentSet, + Curve, + ShellPart, + ShellFormulation, + FEMSOLVER, + ThermalAnalysis, + ThermalAnalysisType, + EMType, + Isopotential_ConnType, + Isopotential, + RogoCoil, + EMDimension +) +from ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1 +from em_set_data import rogoseg +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/em/resistive_heating_2d_isopots.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +fns = [] +path = examples.em_resistive_heating_2d_isopots + os.sep +fns.append(path + "em_resistive_heating_2d_isopots.k") +solution.open_files(fns) +solution.set_termination(termination_time=0.0101) +solution.create_database_binary(dt=1e-4) + +emobj = DynaEM() +solution.add(emobj) + +emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + +emobj.analysis.set_timestep(timestep=1e-4) +emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING,dimtype=EMDimension.PLANAR_2D) +emobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3) + +tanalysis = ThermalAnalysis() +tanalysis.set_timestep(initial_timestep=1e-4) +tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) +emobj.add(tanalysis) + +matrigid = MatRigid(mass_density=1, young_modulus=2e11) +matrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + +matthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7) + +part = ShellPart(1) +part.set_material(matrigid,matthermaliso) +part.set_element_formulation(ShellFormulation.PLANE_STRESS) +emobj.parts.add(part) + +emobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10])) +emobj.set_init_temperature(temp=25) + +emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([521,517,513,509,525])),value=500) +emobj.connect_isopotential(contype = Isopotential_ConnType.SHORT_CIRCUIT,isopotential1 = Isopotential(NodeSet([642,652,661,670,643])),isopotential2 = Isopotential(NodeSet([549,548,577,597,617])),value=0.01) +emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([653,644,626,627,662]))) +emobj.add(RogoCoil(SegmentSet(rogoseg))) + +emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + +solution.save_file() diff --git a/version/0.3/_downloads/f772d2eaa98aea077addd1d4ac381d80/icfd_plate_flow.ipynb b/version/0.3/_downloads/f772d2eaa98aea077addd1d4ac381d80/icfd_plate_flow.ipynb new file mode 100644 index 000000000..90016f418 --- /dev/null +++ b/version/0.3/_downloads/f772d2eaa98aea077addd1d4ac381d80/icfd_plate_flow.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Plate flow\n==========\n\nThis example shows a simple ICFD input deck with a coarse mesh. The\nexecutable file for LS-DYNA is\n`ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis\n)\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.plate_flow + os.sep\nfns.append(path + \"plate_flow.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=100)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep()\nicfd.add(icfdanalysis)\n\n# define model\nmat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005)\n\npart_inflow = ICFDPart(1)\npart_inflow.set_material(mat)\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1]))\npart_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_inflow)\n\npart_outflow = ICFDPart(2)\npart_outflow.set_material(mat)\npart_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0]))\nicfd.parts.add(part_outflow)\n\npart_symmetric = ICFDPart(3)\npart_symmetric.set_material(mat)\npart_symmetric.set_free_slip()\nicfd.parts.add(part_symmetric)\n\npart_wall = ICFDPart(4)\npart_wall.set_material(mat)\npart_wall.set_non_slip()\npart_wall.compute_drag_force()\npart_wall.set_boundary_layer(number=2)\nicfd.parts.add(part_wall)\n\npartvol = ICFDVolumePart(surfaces=[1, 2, 3, 4])\npartvol.set_material(mat)\nicfd.parts.add(partvol)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2, 3])\nmeshvol.embed_shell([4])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=1)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/f931ce2f3420bcc18336a610f9d61e31/icfd_sloshing.ipynb b/version/0.3/_downloads/f931ce2f3420bcc18336a610f9d61e31/icfd_sloshing.ipynb new file mode 100644 index 000000000..8c2f10291 --- /dev/null +++ b/version/0.3/_downloads/f931ce2f3420bcc18336a610f9d61e31/icfd_sloshing.ipynb @@ -0,0 +1,43 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Sloshing\n========\n\nThis example shows how to directly impose a displacement of the entire\nvolume mesh through the use of the `ICFD_CONTROL_IMPOSED_MOVE` keyword.\nThe executable file for LS-DYNA is\n`ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe`.\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "import os\nimport sys\n\n\nfrom ansys.dyna.core.pre.dynasolution import DynaSolution\nfrom ansys.dyna.core.pre.dynaicfd import (\n DynaICFD,\n MatICFD,\n ICFDPart,\n ICFDDOF,\n Curve,\n ICFDVolumePart,\n MeshedVolume,\n ICFDAnalysis,\n Curve,\n Gravity,\n GravityOption,\n Compressible\n )\nfrom ansys.dyna.core.pre import examples\n\nhostname = \"localhost\"\nif len(sys.argv) > 1:\n hostname = sys.argv[1]\n\nsolution = DynaSolution(hostname)\n# Import the initial mesh data(nodes and elements)\nfns = []\npath = examples.sloshing + os.sep\nfns.append(path + \"sloshing.k\")\nsolution.open_files(fns)\nsolution.set_termination(termination_time=1)\nicfd = DynaICFD()\nsolution.add(icfd)\n\nicfdanalysis = ICFDAnalysis()\nicfdanalysis.set_timestep(0.02)\nicfd.add(icfdanalysis)\n\n# define model\nmat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001)\nmat2 = MatICFD(flag=Compressible.VACUUM)\n\npart_bottom = ICFDPart(1)\npart_bottom.set_material(mat1)\npart_bottom.set_non_slip()\nicfd.parts.add(part_bottom)\n\npart_top = ICFDPart(2)\npart_top.set_material(mat2)\npart_top.set_non_slip()\nicfd.parts.add(part_top)\n\npart_mid = ICFDPart(3)\npart_mid.set_material(mat1)\nicfd.parts.add(part_mid)\n\ng = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 10000], y=[9.81, 9.81]))\nicfd.add(g)\n\nicfd.set_imposed_move(vx=Curve(x=[0, 0.5, 0.52, 0.8, 0.82, 2.0], y=[1, 1, -1, -1, 0, 0]))\n\npartvol_bottom = ICFDVolumePart(surfaces=[1, 3])\npartvol_bottom.set_material(mat1)\nicfd.parts.add(partvol_bottom)\n\npartvol_top = ICFDVolumePart(surfaces=[2, 3])\npartvol_top.set_material(mat2)\nicfd.parts.add(partvol_top)\n# define the volume space that will be meshed,The boundaries\n# of the volume are the surfaces \"spids\"\nmeshvol = MeshedVolume(surfaces=[1, 2])\nmeshvol.set_fluid_interfaces([3])\nicfd.add(meshvol)\n\nsolution.create_database_binary(dt=0.02)\nsolution.save_file()" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.17" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} \ No newline at end of file diff --git a/version/0.3/_downloads/fa27bef149c4f04c67f5d551cc275438/rigidtest.py b/version/0.3/_downloads/fa27bef149c4f04c67f5d551cc275438/rigidtest.py new file mode 100644 index 000000000..c073e6bac --- /dev/null +++ b/version/0.3/_downloads/fa27bef149c4f04c67f5d551cc275438/rigidtest.py @@ -0,0 +1,136 @@ +""" +Rigid test +========== + +This examples show how to use the PyDYNA ``pre`` service to create +an ISPH model. The executable file for LS-DYNA is +``ls-dyna_mpp_d_R13.0_365-gf8a97bda2a_winx64_ifort190_msmpi.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatSPHIncompressibleFluid, + MatSPHIncompressibleStructure, +) +from ansys.dyna.core.pre.dynaisph import ( + DynaISPH, + Box, + Point, + Curve, + PartSet, + ShellPart, + ShellFormulation, + ISPHStructPart, + ISPHFluidPart, + DOF, + Motion, + Gravity, + GravityOption, +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/isph/rigidtest.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] +isphsolution = DynaSolution(hostname) +fns = [] +path = examples.isph_rigidtest + os.sep +fns.append(path + "rigidtest.k") +isphsolution.open_files(fns) + +isphsolution.set_termination(0.5) + +isphobj = DynaISPH() +isphsolution.add(isphobj) + +isphobj.set_timestep( + tssfac=1, max_timestep=Curve(x=[0, 0.04, 0.05, 0.1, 100], y=[0.5, 0.5, 1, 1, 1]) +) +isphobj.isphanalysis.set_box(Box(-750, 800, -800, 800, -100, 3000)) + +platemat1 = MatRigid( + mass_density=1e-9, + young_modulus=10, + center_of_mass_constraint=1, + translational_constraint=5, + rotational_constraint=4, +) +platemat2 = MatRigid( + mass_density=1e-9, + young_modulus=10, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, +) +# platemat3 = MatRigid(mass_density=1e-9,young_modulus=10) +# matelastic = MatElastic(mass_density=1e-9,young_modulus=1) +matsphfluid = MatSPHIncompressibleFluid( + mass_density=1e-9, dynamic_viscosity=1e-9, tension_coefficient1=1e6, tension_coefficient2=1000 +) +matsphstruct = MatSPHIncompressibleStructure(mass_density=1e-9) + +sensorplane = ShellPart(1) +sensorplane.set_material(platemat2) +sensorplane.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +sensorplane.set_thickness(0.1) +isphobj.parts.add(sensorplane) + +movingcube = ShellPart(7) +movingcube.set_material(platemat1) +movingcube.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +movingcube.set_thickness(0.1) +isphobj.parts.add(movingcube) + +wallsmesh = ShellPart(8) +wallsmesh.set_material(platemat2) +wallsmesh.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) +wallsmesh.set_thickness(0.1) +isphobj.parts.add(wallsmesh) + +sphwall = ISPHStructPart(4, PartSet([8]), 12) +sphwall.set_material(matsphstruct) +sphwall.set_smoothing_length(1, 1, 1, 12) +isphobj.parts.add(sphwall) + +sphcube = ISPHStructPart(5, PartSet([7]), 12) +sphcube.set_material(matsphstruct) +sphcube.set_smoothing_length(1, 1, 1, 12) +isphobj.parts.add(sphcube) + +sphwater = ISPHFluidPart(6, Point(-588, -588, 9), Point(1176, 1176, 204), 98, 98, 17) +sphwater.set_material(matsphfluid) +sphwater.set_smoothing_length(1, 1, 1, 12) +sphwater.create_massflow_plane(PartSet([1])) +isphobj.parts.add(sphwater) + +# Constraint +isphobj.constraints.merge_two_rigid_bodies(7, 1) + +# Define boundary conddition +isphobj.boundaryconditions.create_imposed_motion( + PartSet([7]), + Curve(x=[0, 0.1, 0.11, 20], y=[3000, 3000, 0, 0]), + dof=DOF.X_TRANSLATIONAL, + motion=Motion.VELOCITY, +) +isphobj.boundaryconditions.create_imposed_motion( + PartSet([7]), + Curve(x=[0, 0.1, 0.11, 20], y=[500, 500, 500, 500]), + dof=DOF.Z_ROTATIONAL, + motion=Motion.VELOCITY, + scalefactor=0.01, +) + +# Load +g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 100], y=[9810, 9810])) +isphobj.add(g) + +isphsolution.set_output_database(glstat=0.001, sphmassflow=0.001) +isphsolution.create_database_binary(dt=0.01) +isphsolution.save_file() diff --git a/version/0.3/_downloads/fc54448b1d063bcbabcf08f2cb3771e4/icfd_driven_cavity.py b/version/0.3/_downloads/fc54448b1d063bcbabcf08f2cb3771e4/icfd_driven_cavity.py new file mode 100644 index 000000000..821b56ec6 --- /dev/null +++ b/version/0.3/_downloads/fc54448b1d063bcbabcf08f2cb3771e4/icfd_driven_cavity.py @@ -0,0 +1,71 @@ +""" +Driven cavity +============= + +This example shows the universally famous driven-cavity case tested with +the second-order steady solver and for ``Re=1000``. The executable file +for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. +""" + +import os +import sys + + +from ansys.dyna.core.pre.dynasolution import DynaSolution +from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ICFD_AnalysisType, + ICFD_MessageLevel, + ICFDDOF +) +from ansys.dyna.core.pre import examples +# sphinx_gallery_thumbnail_path = '_static/pre/icfd/driven_cavity.png' + +hostname = "localhost" +if len(sys.argv) > 1: + hostname = sys.argv[1] + +solution = DynaSolution(hostname) +# Import the initial mesh data(nodes and elements) +fns = [] +path = examples.driven_cavity + os.sep +fns.append(path + "driven_cavity.k") +solution.open_files(fns) +icfd = DynaICFD() +solution.add(icfd) + +icfdanalysis = ICFDAnalysis() +icfdanalysis.set_type(analysis_type=ICFD_AnalysisType.STEADY_STATE_ANALYSIS) +icfdanalysis.set_output(messagelevel=ICFD_MessageLevel.FULL_OUTPUT_INFORMATION,iteration_interval=250) +icfdanalysis.set_steady_state(max_iteration=2500,momentum_tol_limit=1e-8,pressure_tol_limit=1e-8,velocity_relax_param=1,pressure_relax_param=1) +icfd.add(icfdanalysis) + +# define model +mat = MatICFD(flow_density=1, dynamic_viscosity=0.001) + +part1 = ICFDPart(1) +part1.set_material(mat) +part1.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) +icfd.parts.add(part1) + +part2 = ICFDPart(2) +part2.set_material(mat) +part2.set_non_slip() +icfd.parts.add(part2) + +partvol = ICFDVolumePart(surfaces=[1, 2]) +partvol.set_material(mat) +icfd.parts.add(partvol) +# define the volume space that will be meshed,The boundaries +# of the volume are the surfaces "spids" +meshvol = MeshedVolume(surfaces=[1, 2]) +icfd.add(meshvol) + +solution.create_database_binary(dt=250) +solution.save_file() diff --git a/version/0.3/_images/sphx_glr_airbag_deploy_thumb.png b/version/0.3/_images/sphx_glr_airbag_deploy_thumb.png new file mode 100644 index 000000000..82fd57b81 Binary files /dev/null and b/version/0.3/_images/sphx_glr_airbag_deploy_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_airbag_post_thumb.png b/version/0.3/_images/sphx_glr_airbag_post_thumb.png new file mode 100644 index 000000000..93e0ffa84 Binary files /dev/null and b/version/0.3/_images/sphx_glr_airbag_post_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_ball_plate_thumb.png b/version/0.3/_images/sphx_glr_ball_plate_thumb.png new file mode 100644 index 000000000..d17969877 Binary files /dev/null and b/version/0.3/_images/sphx_glr_ball_plate_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_belted_dummy_thumb.png b/version/0.3/_images/sphx_glr_belted_dummy_thumb.png new file mode 100644 index 000000000..59777891b Binary files /dev/null and b/version/0.3/_images/sphx_glr_belted_dummy_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_camry_rc_thumb.png b/version/0.3/_images/sphx_glr_camry_rc_thumb.png new file mode 100644 index 000000000..93e0ffa84 Binary files /dev/null and b/version/0.3/_images/sphx_glr_camry_rc_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_em_resistive_heating_2d_isopots_thumb.png b/version/0.3/_images/sphx_glr_em_resistive_heating_2d_isopots_thumb.png new file mode 100644 index 000000000..fc530ccb2 Binary files /dev/null and b/version/0.3/_images/sphx_glr_em_resistive_heating_2d_isopots_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_em_resistive_heating_2d_multi_isopots_thumb.png b/version/0.3/_images/sphx_glr_em_resistive_heating_2d_multi_isopots_thumb.png new file mode 100644 index 000000000..fc530ccb2 Binary files /dev/null and b/version/0.3/_images/sphx_glr_em_resistive_heating_2d_multi_isopots_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_em_resistive_heating_2d_thumb.png b/version/0.3/_images/sphx_glr_em_resistive_heating_2d_thumb.png new file mode 100644 index 000000000..9da064563 Binary files /dev/null and b/version/0.3/_images/sphx_glr_em_resistive_heating_2d_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_em_resistive_heating_thumb.png b/version/0.3/_images/sphx_glr_em_resistive_heating_thumb.png new file mode 100644 index 000000000..4faa88898 Binary files /dev/null and b/version/0.3/_images/sphx_glr_em_resistive_heating_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_em_rlc_define_func_thumb.png b/version/0.3/_images/sphx_glr_em_rlc_define_func_thumb.png new file mode 100644 index 000000000..749e17abd Binary files /dev/null and b/version/0.3/_images/sphx_glr_em_rlc_define_func_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_em_rlc_isopotential_thumb.png b/version/0.3/_images/sphx_glr_em_rlc_isopotential_thumb.png new file mode 100644 index 000000000..749e17abd Binary files /dev/null and b/version/0.3/_images/sphx_glr_em_rlc_isopotential_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_frf_plate_damping_thumb.png b/version/0.3/_images/sphx_glr_frf_plate_damping_thumb.png new file mode 100644 index 000000000..67cf56c55 Binary files /dev/null and b/version/0.3/_images/sphx_glr_frf_plate_damping_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_cylinderflow_thumb.png b/version/0.3/_images/sphx_glr_icfd_cylinderflow_thumb.png new file mode 100644 index 000000000..a08dedbbd Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_cylinderflow_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_dam_break_thumb.png b/version/0.3/_images/sphx_glr_icfd_dam_break_thumb.png new file mode 100644 index 000000000..c8bd883ed Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_dam_break_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_dem_coupling_thumb.png b/version/0.3/_images/sphx_glr_icfd_dem_coupling_thumb.png new file mode 100644 index 000000000..4cbc141ad Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_dem_coupling_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_driven_cavity_thumb.png b/version/0.3/_images/sphx_glr_icfd_driven_cavity_thumb.png new file mode 100644 index 000000000..805b07279 Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_driven_cavity_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_free_convection_flow_thumb.png b/version/0.3/_images/sphx_glr_icfd_free_convection_flow_thumb.png new file mode 100644 index 000000000..8164be344 Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_free_convection_flow_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_imposed_move_thumb.png b/version/0.3/_images/sphx_glr_icfd_imposed_move_thumb.png new file mode 100644 index 000000000..a033a48bc Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_imposed_move_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_internal_3d_flow_thumb.png b/version/0.3/_images/sphx_glr_icfd_internal_3d_flow_thumb.png new file mode 100644 index 000000000..16a0a3418 Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_internal_3d_flow_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_mesh_adaptivity_thumb.png b/version/0.3/_images/sphx_glr_icfd_mesh_adaptivity_thumb.png new file mode 100644 index 000000000..02cf5d142 Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_mesh_adaptivity_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_mesh_morphing_thumb.png b/version/0.3/_images/sphx_glr_icfd_mesh_morphing_thumb.png new file mode 100644 index 000000000..164358867 Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_mesh_morphing_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_mesh_size_thumb.png b/version/0.3/_images/sphx_glr_icfd_mesh_size_thumb.png new file mode 100644 index 000000000..5126e35b7 Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_mesh_size_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_plate_flow_thumb.png b/version/0.3/_images/sphx_glr_icfd_plate_flow_thumb.png new file mode 100644 index 000000000..9b8d31f11 Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_plate_flow_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_sloshing_thumb.png b/version/0.3/_images/sphx_glr_icfd_sloshing_thumb.png new file mode 100644 index 000000000..0aa4a0acb Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_sloshing_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_strong_fsi_thumb.png b/version/0.3/_images/sphx_glr_icfd_strong_fsi_thumb.png new file mode 100644 index 000000000..784b9df3b Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_strong_fsi_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_thermal_flow_thumb.png b/version/0.3/_images/sphx_glr_icfd_thermal_flow_thumb.png new file mode 100644 index 000000000..f1f986e3e Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_thermal_flow_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_icfd_weak_fsi_thumb.png b/version/0.3/_images/sphx_glr_icfd_weak_fsi_thumb.png new file mode 100644 index 000000000..10f0e7d92 Binary files /dev/null and b/version/0.3/_images/sphx_glr_icfd_weak_fsi_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_nvh_frf_solid_thumb.png b/version/0.3/_images/sphx_glr_nvh_frf_solid_thumb.png new file mode 100644 index 000000000..7afcaf40d Binary files /dev/null and b/version/0.3/_images/sphx_glr_nvh_frf_solid_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_rigidtest_thumb.png b/version/0.3/_images/sphx_glr_rigidtest_thumb.png new file mode 100644 index 000000000..f7abca2a9 Binary files /dev/null and b/version/0.3/_images/sphx_glr_rigidtest_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_sale_efp_thumb.png b/version/0.3/_images/sphx_glr_sale_efp_thumb.png new file mode 100644 index 000000000..7182b6df7 Binary files /dev/null and b/version/0.3/_images/sphx_glr_sale_efp_thumb.png differ diff --git a/version/0.3/_images/sphx_glr_thermal_stress_thumb.png b/version/0.3/_images/sphx_glr_thermal_stress_thumb.png new file mode 100644 index 000000000..988cae9e4 Binary files /dev/null and b/version/0.3/_images/sphx_glr_thermal_stress_thumb.png differ diff --git a/version/0.3/_modules/ansys/dyna/core.html b/version/0.3/_modules/ansys/dyna/core.html new file mode 100644 index 000000000..2a2a68c4a --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core.html @@ -0,0 +1,516 @@ + + + + + + + + + + ansys.dyna.core — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core

+from ansys.dyna.core.solver.dynasolver import *
+import ansys.dyna.core.solver.grpc_tags
+
+# Version
+# ------------------------------------------------------------------------------
+
+try:
+    import importlib.metadata as importlib_metadata
+except ModuleNotFoundError:  # pragma: no cover
+    import importlib_metadata  # type: ignore
+
+
[docs]__version__ = importlib_metadata.version(__name__.replace(".", "-"))
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre.html b/version/0.3/_modules/ansys/dyna/core/pre.html new file mode 100644 index 000000000..da3635f3d --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre.html @@ -0,0 +1,522 @@ + + + + + + + + + + ansys.dyna.core.pre — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre

+# -*- coding: utf-8 -*-
+import logging
+import os
+
+from ansys.dyna.core.pre.dynalogging import Logger
+
+
[docs]LOG = Logger(level=logging.ERROR, to_file=False, to_stdout=True)
+LOG.debug("Loaded logging module as LOG") + +_LOCAL_PORTS = [] + +from .dynabase import * +from .dynadem import DynaDEM +from .dynaicfd import DynaICFD +from .dynaiga import DynaIGA +from .dynamaterial import * +from .dynasale import * +
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynabase.html b/version/0.3/_modules/ansys/dyna/core/pre/dynabase.html new file mode 100644 index 000000000..82728a283 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynabase.html @@ -0,0 +1,3093 @@ + + + + + + + + + + ansys.dyna.core.pre.dynabase — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynabase

+"""
+Base
+====
+
+Module for creating a DYNA input deck.
+"""
+
+# from subprocess import DETACHED_PROCESS
+
+from enum import Enum
+import logging
+
+from ansys.api.dyna.v0.kwprocess_pb2 import *  # noqa : F403
+from ansys.api.dyna.v0.kwprocess_pb2_grpc import *  # noqa : F403
+
+
+
[docs]class Motion(Enum): +
[docs] VELOCITY = 0
+
[docs] ACCELERATION = 1
+
[docs] DISPLACEMENT = 2
+ + +
[docs]class DOF(Enum): +
[docs] X_TRANSLATIONAL = 1
+
[docs] Y_TRANSLATIONAL = 2
+
[docs] Z_TRANSLATIONAL = 3
+
[docs] X_ROTATIONAL = 5
+
[docs] Y_ROTATIONAL = 6
+
[docs] Z_ROTATIONAL = 7
+ + +
[docs]class Switch(Enum): +
[docs] OFF = 0
+
[docs] ON = 1
+ + +
[docs]class InvariantNode(Enum): +
[docs] OFF = 1
+
[docs] ON_FOR_SHELL_TSHELL = 2
+
[docs] ON_FOR_SOLID = 3
+
[docs] ON_FOR_SHELL_TSHELL_SOLID = 4
+ + +
[docs]class EnergyFlag(Enum): +
[docs] NOT_COMPUTED = 1
+
[docs] COMPUTED = 2
+ + +
[docs]class HourglassControl(Enum): +
[docs] STANDARD_VISCOSITY_FORM = 1
+
[docs] FLANAGAN_BELYTSCHKO_INTEGRATION_SOLID = 2
+ + +
[docs]class BulkViscosity(Enum): +
[docs] STANDARD_BULK_VISCOSITY = 1
+
[docs] RICHARDS_WILKINS_BULK_VISCOSITY = 2
+
[docs] COMPUTE_INTERNAL_ENERGY_DISSIPATED = -2
+ + +
[docs]class CaseType(Enum): +
[docs] STRUCTURE = 1
+
[docs] ICFD = 2
+
[docs] SALE = 3
+
[docs] EM = 4
+
[docs] IGA = 5
+ + +# set_output() argument +
[docs]class OutputEcho(Enum): +
[docs] ALL_DATA_PRINTED = 0
+
[docs] SUPPRESSED_NODAL_PRINTING = 1
+
[docs] SUPPRESSED_ELEMENT_PRINTING = 2
+
[docs] SUPPRESSED_NODAL_AND_ELEMENT_PRINTING = 3
+ + +from .dynamaterial import MatAdditional +from .dynasolution import DynaSolution # noqa : F403 + + +
[docs]class Box: + """Defines a box-shaped volume.""" + + def __init__(self, xmin=0, xmax=0, ymin=0, ymax=0, zmin=0, zmax=0): + self.xmin = xmin + self.xmax = xmax + self.ymin = ymin + self.ymax = ymax + self.zmin = zmin + self.zmax = zmax + +
[docs] def create(self, stub): + """Create box.""" + ret = stub.CreateDefineBox( + DefineBoxRequest( + xmin=self.xmin, + xmax=self.xmax, + ymin=self.ymin, + ymax=self.ymax, + zmin=self.zmin, + zmax=self.zmax, + ) + ) + self.id = ret.boxid + logging.info(f"Box {self.id} defined...") + return self.id
+ + +
[docs]class Curve: + """ + Defines a curve as a function of time. + + For example, ``load (ordinate value)``. + + """ + + def __init__(self, sfo=1, x=[], y=[], func=None, title=""): + self.sfo = sfo + self.abscissa = x + self.ordinate = y + self.func = func + self.title = title + +
[docs] def create(self, stub=None): + """Create a curve.""" + if stub is None: + stub = DynaBase.get_stub() + if self.func != None: + ret = stub.CreateDefineCurveFunction(DefineCurveFunctionRequest(function=self.func, title=self.title)) + else: + ret = stub.CreateDefineCurve( + DefineCurveRequest(sfo=self.sfo, abscissa=self.abscissa, ordinate=self.ordinate, title=self.title) + ) + self.id = ret.id + logging.info(f"Curve {self.id} defined...") + return self.id
+ + +
[docs]class Function: + """Defines a function that can be referenced by a limited number of keyword options.""" + + def __init__(self, Function=None): + self.function = Function + +
[docs] def create(self, stub): + """Create function.""" + ret = stub.CreateDefineFunction(DefineFunctionRequest(function=self.function)) + self.id = ret.id + logging.info(f"Function {self.id} defined...") + return self.id
+ + +
[docs]class Table2D: + """Define a table,a curve ID is specified for each value defined in the table.""" + + def __init__(self, title=""): + self.title = title + self.valuecurvelist = [] + +
[docs] def append(self, value=0, curve=None): + self.valuecurvelist.append((value, curve))
+ +
[docs] def create(self, stub=None): + """Create Table2D.""" + if stub is None: + stub = DynaBase.get_stub() + vls = [] + cvs = [] + for obj in self.valuecurvelist: + vls.append(obj[0]) + cid = obj[1].create(stub) + cvs.append(cid) + ret = stub.CreateDefineTable2D(DefineTable2DRequest(title=self.title, values=vls, cids=cvs)) + self.id = ret.id + logging.info(f"Table2D {self.id} defined...") + return self.id
+ + +
[docs]class Point: + """Defines a point.""" + + def __init__(self, x=0, y=0, z=0): + self.x = x + self.y = y + self.z = z
+ + +
[docs]class Direction: + """Defines a direction.""" + + def __init__(self, x=0, y=0, z=0): + self.x = x + self.y = y + self.z = z
+ + +
[docs]class Transform: + """Defines a transformation.""" + + def __init__(self, option=None, param1=0, param2=0, param3=0, param4=0, param5=0, param6=0, param7=0): + param = [option, param1, param2, param3, param4, param5, param6, param7] + self.paramlist = [] + self.paramlist.append(param) + +
[docs] def add_transform(self, option=None, param1=0, param2=0, param3=0, param4=0, param5=0, param6=0, param7=0): + """Defines a transformation matrix.""" + param = [option, param1, param2, param3, param4, param5, param6, param7] + self.paramlist.append(param)
+ +
[docs] def create(self, stub): + """Create a transformation.""" + options = [] + params = [] + for obj in self.paramlist: + options.append(obj[0]) + for i in range(1, 8): + params.append(obj[i]) + ret = stub.CreateDefineTransformation(DefineTransformationRequest(option=options, param=params)) + self.id = ret.id + logging.info(f"Transformation {self.id} defined...") + return self.id
+ + +
[docs]class Velocity: + """Defines a translational velocity.""" + + def __init__(self, x=0, y=0, z=0): + self.x = x + self.y = y + self.z = z
+ + +
[docs]class RotVelocity: + """Defines a rotational velocity.""" + + def __init__(self, x=0, y=0, z=0): + self.x = x + self.y = y + self.z = z
+ + +
[docs]class DynaBase: + """Contains methods for creating a general LS-DYNA keyword.""" + + def __init__(self): + self.stub = DynaSolution.get_stub() + self.mainname = "" + DynaBase.stub = self.stub + self.implicitanalysis = ImplicitAnalysis(initial_timestep_size=0.1) + self.parts = Parts() + self.boundaryconditions = BoundaryCondition() + self.initialconditions = InitialCondition() + self.constraints = Constraint() + self.contacts = ContactGroup() + self.entities = [] + self.have_accuracy = False + self.have_energy = False + self.have_hourglass = False + self.have_bulk_viscosity = False + self.have_control_shell = False + +
[docs] def get_stub(): + """Get the stub of the ``DynaBase`` object.""" + return DynaBase.stub
+ +
[docs] def set_timestep(self, tssfac=0.9, isdo=0, timestep_size_for_mass_scaled=0.0, max_timestep=None): + """Set the structural time step size control using different options. + + Parameters + ---------- + tssfac : float, optional + Scale factor for computed time step. The default is ``0.9``. + isdo : int, optional + Basis of the time size calculation for four-node shell elements. + The default is ``0``. + timestep_size_for_mass_scaled : float, optional + Time step size for mass scaled solutions. The default is ``0.0``. + max_timestep : Curve, optional + Load curve that limits the maximum time step size. The default + is ``None``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + if max_timestep == None: + cid = 0 + else: + cid = max_timestep.create(self.stub) + ret = self.stub.CreateTimestep( + TimestepRequest(tssfac=tssfac, isdo=isdo, dt2ms=timestep_size_for_mass_scaled, lctm=cid) + ) + logging.info("Timestep Created...") + return ret
+ +
[docs] def set_accuracy( + self, + objective_stress_updates=Switch.OFF, + invariant_node_number=InvariantNode.OFF, + partsetid_for_objective_stress_updates=0, + implicit_accuracy_flag=Switch.OFF, + explicit_accuracy_flag=Switch.OFF, + ): + """Define control parameters that can improve the accuracy of the calculation. + + Parameters + ---------- + objective_stress_updates : int + Global flag for 2nd order objective stress updates. + invariant_node_number : int + Invariant node numbering for shell and solid elements. + partsetid_for_objective_stress_updates : int, optional + Part set ID for objective stress updates. The default is ``0``. + implicit_accuracy_flag : int + Implicit accuracy flag. + explicit_accuracy_flag : float + Explicit accuracy parameter. + + - EQ.0.0: Off + - GT.0.0: On + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = True + if not self.have_accuracy: + ret = self.stub.CreateControlAccuracy( + ControlAccuracyRequest( + osu=objective_stress_updates.value, + inn=invariant_node_number.value, + pidosu=partsetid_for_objective_stress_updates, + iacc=implicit_accuracy_flag.value, + exacc=explicit_accuracy_flag.value, + ) + ) + self.have_accuracy = True + logging.info("Control Accuracy Created...") + return ret
+ +
[docs] def set_energy( + self, + hourglass_energy=EnergyFlag.NOT_COMPUTED, + rigidwall_energy=EnergyFlag.COMPUTED, + sliding_interface_energy=EnergyFlag.NOT_COMPUTED, + rayleigh_energy=EnergyFlag.NOT_COMPUTED, + initial_reference_geometry_energy=EnergyFlag.COMPUTED, + ): + """Provide controls for energy dissipation options. + + Parameters + ---------- + hourglass_energy : enum + Hourglass energy calculation option. + rigidwall_energy : int + Rigidwall energy dissipation option. + + - EQ.1: Energy dissipation is not computed. + - EQ.2: Energy dissipation is computed. + + sliding_interface_energy : int + Sliding interface energy dissipation option. + + - EQ.1: Energy dissipation is not computed. + - EQ.2: Energy dissipation is computed. + + rayleigh_energy : int + Rayleigh energy dissipation option. + + - EQ.1: Energy dissipation is not computed. + - EQ.2: Energy dissipation is computed. + + initial_reference_geometry_energy : int + Initial reference geometry energy option. + + - EQ.1: Initial reference geometry energy is not computed. + - EQ.2: Initial reference geometry energy is computed. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = True + if not self.have_energy: + ret = self.stub.CreateControlEnergy( + ControlEnergyRequest( + hgen=hourglass_energy.value, + rwen=rigidwall_energy.value, + slnten=sliding_interface_energy.value, + rylen=rayleigh_energy.value, + irgen=initial_reference_geometry_energy.value, + ) + ) + self.have_energy = True + logging.info("Control Energy Created...") + return ret
+ +
[docs] def set_output( + self, + print_suppression_d3hsp=False, + print_suppression_echo=OutputEcho.ALL_DATA_PRINTED, + ): + """Set miscellaneous output parameters. + + Parameters + ---------- + print_suppression_d3hsp : bool, optional + Whether to suppress printing during the input phase flag for the D3HSP file. + The default is ``True``, which means that none of these are printed: nodal + coordinates, element connectivities, rigid wall definitions, nodal SPCs, + initial velocities, initial strains, adaptive constraints, and SPR2/SPR3 + constraints. If ``False``, no suppression occurs. + print_suppression_echo : OutputEcho + Print suppression setting during the input phase flag for the echo file. + Options are: + + - ALL_DATA_PRINTED: All data is printed. + - SUPPRESSED_NODAL_PRINTING: Nodal printing is suppressed. + - SUPPRESSED_ELEMENT_PRINTING: Element printing is suppressed. + - SUPPRESSED_NODAL_AND_ELEMENT_PRINTING : Both nodal and element printing is suppressed. + + """ + if print_suppression_d3hsp: + npopt = 1 + else: + npopt = 0 + ret = self.stub.CreateControlOutput( + ControlOutputRequest( + npopt=npopt, + neecho=print_suppression_echo.value, + ) + ) + logging.info("Control Output Created...") + return ret
+ +
[docs] def set_hourglass(self, controltype=HourglassControl.STANDARD_VISCOSITY_FORM, coefficient=0.1): + """Redefine the default values for the hourglass control type and coefficient. + + Parameters + ---------- + controltype : enum + Default hourglass control type. + coefficient : float, optional + Default hourglass coefficient. The default is ``0.``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = True + if not self.have_hourglass: + ret = self.stub.CreateControlHourgalss(ControlHourglassRequest(ihq=controltype.value, qh=coefficient)) + self.have_hourglass = True + logging.info("Control Hourglass Created...") + return ret
+ +
[docs] def set_bulk_viscosity( + self, + quadratic_viscosity_coeff=1.5, + linear_viscosity_coeff=0.06, + bulk_viscosity_type=BulkViscosity.STANDARD_BULK_VISCOSITY, + ): + """Reset the default values of the bulk viscosity coefficients globally. + + Parameters + ---------- + quadratic_viscosity_coeff : float, optional + Default quadratic viscosity coefficient. The default is ``1.5``. + linear_viscosity_coeff : float, optional + Default linear viscosity coefficient. The default is ``0.06``. + bulk_viscosity_type : enum + Default bulk viscosity type. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = True + if not self.have_bulk_viscosity: + ret = self.stub.CreateControlBulkViscosity( + ControlBulkViscosityRequest( + q1=quadratic_viscosity_coeff, + q2=linear_viscosity_coeff, + type=bulk_viscosity_type.value, + ) + ) + self.have_bulk_viscosity = True + logging.info("Control Bulk Viscosity Created...") + return ret
+ +
[docs] def set_init_temperature(self, temp=0): + """Define initial nodal point temperatures on all nodes. + + Parameters + ---------- + temp : float, optional + Temperature at node. The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateInitTemperature(InitTemperatureRequest(option="SET", nsid=0, temp=temp)) + logging.info("Initial Temperature Created...") + return ret
+ +
[docs] def create_control_shell( + self, + wrpang=20, + esort=0, + irnxx=-1, + istupd=0, + theory=2, + bwc=2, + miter=1, + proj=0, + irquad=0, + ): + """Provide controls for computing shell response. + + Parameters + ---------- + wrpang : int, optional + Shell element warpage angle in degrees. The default is ``20``. + esort : int + Sorting of triangular shell elements to automatically switch + degenerate quadrilateral shell formulations to more suitable + triangular shell formulations. The default is ``0``. + irnxx : int, optional + Shell normal update option. The default is ``1``. + istupd : int, optional + Shell thickness change option for deformable shells. The + default is ``0``. + theory : int, optional + Default shell formulation. The default is ``2``. + bwc : int, optional + Warping stiffness for Belytschko-Tsay shells. The + default is ``2``. + miter : int, optional + Plane stress plasticity option. The default is ``1``. + proj : int, optional + Projection method for the warping stiffness in the Belytschko-Tsay + shell and the Belytschko-Wong-Chiang elements. The default is + ``0``. + irquad : int, optional + In-plane integration rule for the eight-node quadratic shell element. + The default is ``0``. + + - EQ.2: 2*2 Gauss quadrature + - EQ.3: 3*3 Gauss quadrature + + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = True + if not self.have_control_shell: + ret = self.stub.CreateControlShell( + ControlShellRequest( + wrpang=wrpang, + esort=esort, + irnxx=irnxx, + istupd=istupd, + theory=theory, + bwc=bwc, + miter=miter, + proj=proj, + irquad=irquad, + ) + ) + self.have_control_shell = True + logging.info("Control Shell Created...") + return ret
+ +
[docs] def create_control_solid( + self, + esort=0, + fmatrx=0, + niptets=4, + swlocl=1, + psfail=0, + t10jtol=0.0, + icoh=0, + tet13k=0, + ): + """Provide controls for a solid element response. + + Parameters + ---------- + esort : int, optional + Automatic sorting of tetrahedral and pentahedral elements to avoid + use of degenerate formulations for these shapes. The default is ``0``. + + - EQ.0: No sorting + - EQ.1: Sort + + fmatrx : int, optional + Method to use in the calculation of the deformation gradient matrix. + The default is ``1``. + niptets : int, optional + Number of integration points used in the quadratic tetrahedron elements. + The default is ``4``. + swlocl : int, optional + Output option for stresses in solid elements used as spot welds with + material ``\*MAT_SPOTWELD``. The default is ``1``. + psfail : int, optional + Solid element erosion from negative volume is limited only to solid elements in + the part set indicated by PSFAIL. The default is ``0``. + t10jtol : float, optional + Tolerance for Jacobian in four-point, 10-noded quadratic tetrahedra. The + default is ``0.0``. + icoh : int, optional + Breaking LS-DYNA convention ICOH is interpreted digit-wise. The default + is ``0``. + tet13k : int, optional + Flag for whether to invoke a consistent tangent stiffness matrix + for the pressure averaged tetrahedron. The default is ``0``, in which + case this matrix is not invoked. If this parameter is set to ``1``, + this matrix is invoked. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateControlSolid( + ControlSolidRequest( + esort=esort, + fmatrx=fmatrx, + niptets=niptets, + swlocl=swlocl, + psfail=psfail, + t10jtol=t10jtol, + icoh=icoh, + tet13k=tet13k, + ) + ) + logging.info("Control Solid Created...") + return ret
+ +
[docs] def create_control_contact(self, rwpnal, shlthk=0, orien=1, ssthk=0, ignore=0, igactc=0): + """Change defaults for computation with contact surfaces. + + Parameters + ---------- + rwpnal : float + Scale factor for rigid wall penalties, which treat nodal points interacting + with rigid walls. + shlthk : int, optional + Flag for whether to consider shell thickness offsets in non-automatic + surface-to-surface and non-automatic nodes-to-surface type contacts. + The default is ``0``, in which case these offsets are not considered. + If this parameter is set to ``1``, these offsets are considered. + orien : int, optional + Flag for whether to automatically reorient contact interface segments + during initialization. The default is ``1``, in which case reorientation + automatically occurs. If this parameter is set to ``0``, reorientation + does not occur. + ssthk : int, optional + Flag for whether to determine default contact thickness for shells in single + surface contact types. The default is ``0``, in which case default contact + thickness is not determined. If this parameter is set to ``1``, default + contact thickness is determined. + ignore : int, optional + Flag for whether to ignore initial penetrations in the ``\*CONTACT_AUTOMATIC`` + options. The default is ``0``, in which case initial penetrations are ignored. + If this parameter is set to ``1``, initial penetrations are not ignored. + igactc : int, optional + Flag for whether to use isogeometric shells for contact detection when the + contact involves isogeometric shells. The default is ``0``, which means + isogeometric shells are not used. If this parameter is set to ``1``, isogeometric + shells are used. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateControlContact( + ControlContactRequest( + rwpnal=rwpnal, + shlthk=shlthk, + orien=orien, + ssthk=ssthk, + ignore=ignore, + igactc=igactc, + ) + ) + logging.info("Control Contact Created...") + return ret
+ +
[docs] def create_damping_global(self, lcid=0, valdmp=0.0): + """Define mass-weighted nodal damping. + + Mass-weighted nodal damping applies globally to the + nodes of deformable bodies and to the mass center of + rigid bodies. + + Parameters + ---------- + lcid : int, optional + Load curve ID, which specifies the system damping constant + versus the time. The default is ``0``. + valdmp : float, optional + System damping constant. The default is ``0.0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateDampingGlobal(DampingGlobalRequest(lcid=lcid, valdmp=valdmp)) + logging.info("Damping global Created...") + return ret
+ +
[docs] def get_solid_elements(self): + """Get solid elements. + + Returns + ------- + list + list[0],solid element connectivity,list[0] = [[n1,n2,n3,n4,n5,n6,n7,n8],[...],...] + list[1],node coordinates,list[1] = [[x1,y1,z1],[x2,y2,z2],...] + """ + cons = self.stub.GetSolidElements(GetSolidElementsRequest()) + nodes = self.stub.GetNodes(GetNodesRequest()) + num = 8 + lscons = cons.nodeids + elist = [lscons[i : i + num] for i in range(0, len(lscons), num)] + numconn = 3 + lsnodes = nodes.coords + nlist = [lsnodes[i : i + numconn] for i in range(0, len(lsnodes), numconn)] + elements = [elist, nlist] + return elements
+ +
[docs] def create_general_keyword(self, opcode, keyworddata): + """Create general keyword. + + Parameters + ---------- + opcode : string + Keyword card name. + keyworddata : string + Keyword data. + + Examples + -------- + Create a ``\*INITIAL_VELOCITY`` keyword. + + \$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ + \*INITIAL_VELOCITY + + + & vx vy vz vxr vyr vzr + 1.480E+01 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + \$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ + + opcode = "INITIAL_VELOCITY" + keyworddata = "0\\n1.480E+01,0.000E+00,0.000E+00,0.000E+00,0.000E+00,0.000E+00" + create_general_keyword(opcode = opcode,keyworddata=keyworddata) + """ + ret = self.stub.CreateGeneralKWD(GeneralKWDRequest(opcode=opcode, keyworddata=keyworddata)) + msg = opcode + " Created..." + logging.info("msg") + return ret
+ +
[docs] def add(self, obj): + """Add entities to an object.""" + self.entities.append(obj)
+ +
[docs] def set_transform(self, filename=None, idnoff=0, ideoff=0, idpoff=0, idmoff=0, idsoff=0, idfoff=0, transform=None): + """Include independent input files containing model data, allow for node, element, and set + IDs to be offset and for coordinates and constitutive parameters to be transformed and scaled. + + Parameters + ---------- + filename : string + Name of file to include in the keyword file. + idnoff : int + Offset to node ID. + ideoff : int + Offset to element ID. + idpoff : int + Offset to part ID. + idmoff : int + Offset to material ID. + idsoff : int + Offset to set ID. + idfoff : int + Offset to function ID, table ID, and curve ID. + transform : Transform + Definition for the transformation. + """ + tranid = transform.create(self.stub) + ret = self.stub.CreateIncludeTransform( + IncludeTransformRequest( + filename=filename, + idnoff=idnoff, + ideoff=ideoff, + idpoff=idpoff, + idmoff=idmoff, + idsoff=idsoff, + idfoff=idfoff, + tranid=tranid, + ) + ) + logging.info("Include transform Created...") + return ret
+ +
[docs] def save_file(self): + """Save keyword files. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + if self.contacts.num() > 0: + self.create_control_contact(rwpnal=1.0, ignore=1, igactc=0) + self.implicitanalysis.create() + self.parts.set_property() + self.initialconditions.create() + self.constraints.create() + self.boundaryconditions.create() + self.contacts.create() + for obj in self.entities: + obj.create()
+ + +# ------------------------------------------------------------------------------------------------- + + +
[docs]class BaseSet: + """Defines the base class for all set classes.""" + + def __init__(self): + self.type = "PARTSET" + self.id = 0
+ + +
[docs]class NodeSet: + """Defines a nodal set with some identical or unique attributes.""" + + def __init__(self, nodes=[]): + self.nodes = nodes + self.type = "NODESET" + +
[docs] def create(self, stub): + """Create a node set.""" + if len(self.nodes) <= 0: + return 0 + ret = stub.CreateNodeSet(NodeSetRequest(option="LIST", sid=0, genoption="NODE", entities=self.nodes)) + self.id = ret.id + if len(self.nodes) > 1: + self.type = "NODESET" + else: + self.type = "NODE" + return self.id
+ +
[docs] def num(self): + """Get the number of nodes in the node set.""" + return len(self.nodes)
+ +
[docs] def id(self, pos): + """Get the node ID by position.""" + return self.nodes[pos]
+ +
[docs] def get_nid(self): + """Get the node ID.""" + if self.type == "NODE": + return self.nodes[0] + else: + return 0
+ + +
[docs]class SetType(Enum): + """Contains the enums for setting types.""" + +
[docs] SHELL = "SET_SHELL"
+
[docs] SOLID = "SET_SOLID"
+
[docs] BEAM = "SET_BEAM"
+
[docs] TSHELL = "SET_TSHELL"
+
[docs] DISCRETE = "SET_DISCRETE"
+ + +
[docs]class NodesetGeneral(BaseSet): + """Includes nodal points of element sets. + + Element sets are defined by ``SET_XXXX_LIST``, + where ``XXXX`` can be ``SHELL``, ``SOLID``, ``BEAM``, + ``TSHELL`` or ``DISCRETE``. + """ + + def __init__(self, settype=SetType.SHELL, setids=[]): + self.settype = settype.value + self.setids = setids + +
[docs] def create(self, stub): + """Create a node set.""" + if len(self.setids) <= 0: + return 0 + ret = stub.CreateNodeSet(NodeSetRequest(option="GENERAL", sid=0, genoption=self.settype, entities=self.setids)) + self.id = ret.id + self.type = "NODESET" + return self.id
+ + +
[docs]class NodeSetBox(BaseSet): + """include the nodes inside boxes. + + Parameters + ---------- + boxes : list + A list of BOX. + """ + + def __init__(self, boxes=[]): + self.boxes = boxes + self.type = "NODESETBOX" + +
[docs] def create(self, stub): + """Create a node set.""" + if len(self.boxes) <= 0: + return 0 + boxids = [] + for box in self.boxes: + boxid = box.create(stub) + boxids.append(boxid) + ret = stub.CreateNodeSet(NodeSetRequest(option="GENERAL", sid=0, genoption="BOX", entities=boxids)) + self.id = ret.id + self.type = "NODESETBOX" + return self.id
+ + +
[docs]class PartSet(BaseSet): + """Defines a set of parts with optional attributes.""" + + def __init__(self, parts=[]): + self.parts = parts + +
[docs] def create(self, stub): + """Create a part set.""" + if len(self.parts) <= 0: + return 0 + ret = stub.CreatePartSet(PartSetRequest(sid=0, pids=self.parts)) + self.id = ret.id + if len(self.parts) > 1: + self.type = "PARTSET" + else: + self.type = "PART" + return self.id
+ +
[docs] def num(self): + """Get the number of parts in the part set.""" + return len(self.parts)
+ +
[docs] def pos(self, pos): + """Get a part ID by position.""" + return self.parts[pos]
+ +
[docs] def get_pid(self): + """Get the part ID.""" + if self.type == "PART": + return self.parts[0] + else: + return 0
+ + +
[docs]class SegmentSet(BaseSet): + """Defines a set of segments with optional identical or unique attributes. + + Parameters + ---------- + segments : list [[point1,point2,point3,point4],[point5,point6,point7,point8]...] + Define segments. + """ + + def __init__(self, segments=[]): + self.segments = segments + self.type = "SEGMENTSET" + +
[docs] def create(self, stub): + """Create a segment set.""" + if len(self.segments) <= 0: + return 0 + n1 = [] + n2 = [] + n3 = [] + n4 = [] + for i in range(len(self.segments)): + n1.append(self.segments[i][0]) + n2.append(self.segments[i][1]) + n3.append(self.segments[i][2]) + n4.append(self.segments[i][3]) + ret = stub.CreateSegmentSet(SegmentSetRequest(n1=n1, n2=n2, n3=n3, n4=n4)) + self.id = ret.id + logging.info("Segment Set Created...") + return self.id
+ + +
[docs]class BeamFormulation(Enum): +
[docs] SPOTWELD = 9
+ + +
[docs]class ShellFormulation(Enum): +
[docs] FULLY_INTEGRATED = -16
+
[docs] BELYTSCHKO_TSAY = 2
+
[docs] SR_HUGHES_LIU = 6
+
[docs] FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE = 9
+
[docs] PLANE_STRESS = 12
+ + +
[docs]class IGAFormulation(Enum): +
[docs] REISSNER_MINDLIN_FIBERS_AT_CONTROL_POINTS = 0
+
[docs] KIRCHHOFF_LOVE_FIBERS_AT_CONTROL_POINTS = 1
+
[docs] KIRCHHOFF_LOVE_FIBERS_AT_INTEGRATION_POINTS = 2
+
[docs] REISSNER_MINDLIN_FIBERS_AT_INTEGRATION_POINTS = 3
+ + +
[docs]class SolidFormulation(Enum): +
[docs] EIGHT_POINT_ENHANCED_STRAIN_SOLID_ELEMENT = -18
+
[docs] CONSTANT_STRESS_SOLID_ELEMENT = 1
+
[docs] EIGHT_POINT_HEXAHEDRON = 2
+
[docs] FULLY_INTEGRATED_QUADRATIC_EIGHT_NODE_ELEMENT = 3
+
[docs] ONE_POINT_COROTATIONAL = 0
+
[docs] IMPLICIT_9_POINT_ENHANCED_STRAIN = 18
+ + +
[docs]class HourglassType(Enum): +
[docs] STANDARD_LSDYNA_VISCOUS = 1
+
[docs] FLANAGAN_BELYTSCHKO_VISOCOUS = 2
+
[docs] FLANAGAN_BELYTSCHKO_VISOCOUS_WITH_EXTRA_VOLUME_INTEGRATION = 3
+
[docs] FLANAGAN_BELYTSCHKO_STIFFNESS = 4
+
[docs] FLANAGAN_BELYTSCHKO_STIFFNESS_WITH_EXTRA_VOLUME_INTEGRATION = 5
+
[docs] BELYTSCHKO_BINDEMAN = 6
+
[docs] ACTIVATES_FULL_PROJECTION_WARPING_STIFFNESS = 8
+ + +
[docs]class BeamSection: + """Defines cross-sectional properties for beams, trusses, discrete beams, and cable elements.""" + + def __init__( + self, + element_formulation, + shear_factor=1, + cross_section=0, + thickness_n1=0, + thickness_n2=0, + ): + stub = DynaBase.get_stub() + ret = stub.CreateSectionBeam( + SectionBeamRequest( + elform=element_formulation, + shrf=shear_factor, + cst=cross_section, + ts1=thickness_n1, + ts2=thickness_n2, + ) + ) + self.id = ret.id
+ + +
[docs]class ShellSection: + """Defines section properties for shell elements.""" + + def __init__( + self, + element_formulation, + shear_factor=1, + integration_points=5, + printout=0, + thickness1=0, + thickness2=0, + thickness3=0, + thickness4=0, + ): + stub = DynaBase.get_stub() + ret = stub.CreateSectionShell( + SectionShellRequest( + elform=element_formulation, + shrf=shear_factor, + nip=integration_points, + propt=printout, + t1=thickness1, + t2=thickness2, + t3=thickness3, + t4=thickness4, + ) + ) + self.id = ret.id
+ + +
[docs]class IGASection: + """Defines section properties for isogeometric shell elements.""" + + def __init__(self, element_formulation, shear_factor=1, thickness=1): + stub = DynaBase.get_stub() + ret = stub.CreateSectionIGAShell( + SectionIGAShellRequest(elform=element_formulation, shrf=shear_factor, thickness=thickness) + ) + self.id = ret.id
+ + +
[docs]class Part: + """Defines the part object.""" + + def __init__(self, id): + self.stub = DynaBase.get_stub() + self.type = "" + self.id = id + self.secid = 0 + self.mid = 0 + self.eosid = 0 + self.hgid = 0 + self.grav = 0 + self.adpopt = 0 + self.tmid = 0 + self.formulation = 0 + self.stiffness_damping = 0 + self.rigidbody_initial_velocity = False + self.translation = Velocity(0, 0, 0) + self.rotation = RotVelocity(0, 0, 0) + self.extra_nodes_defined = False + +
[docs] def set_material(self, mat, mat_thermal=None): + """Set the material.""" + mat.create(self.stub) + self.mid = mat.material_id + if mat_thermal is not None: + mat_thermal.create(self.stub) + self.tmid = mat_thermal.material_id + else: + self.tmid = 0 + if isinstance(mat, MatAdditional): + if mat.thermal_isotropic: + self.tmid = self.mid
+ +
[docs] def set_element_formulation(self, formulation): + """Set the element formulation.""" + self.formulation = formulation.value
+ +
[docs] def set_stiffness_damping_coefficient(self, coefficient): + """Set the stiffness damping coefficient.""" + self.stiffness_damping = coefficient
+ +
[docs] def set_extra_nodes(self, nodeset): + """Set extra nodes for the rigid body. + + Parameters + ---------- + nodeset : NodeSet + Extra nodes list. + """ + self.extra_nodes_defined = True + self.extra_nodes = nodeset
+ +
[docs] def set_rigidbody_initial_velocity(self, translation=Velocity(0, 0, 0), rotation=RotVelocity(0, 0, 0)): + """Set initial translational and rotational velocities for the rigid body. + + Initial translational and rotational velocities are set + at the center of gravity for a rigid body or a nodal rigid body. + """ + self.rigidbody_initial_velocity = True + self.translation = translation + self.rotation = rotation
+ +
[docs] def set_property(self): + """Set properties for the part.""" + if self.stiffness_damping > 0: + self.stub.CreateDampingPartStiffness( + DampingPartStiffnessRequest(isset=False, id=self.id, coef=self.stiffness_damping) + ) + logging.info(f"Assign stiffness damping coefficient to part {self.id}.") + if self.extra_nodes_defined: + nid = self.extra_nodes.create(self.stub) + option = self.extra_nodes.type + self.stub.CreateConstrainedExtraNodes( + ConstrainedExtraNodesRequest(option="SET", pid=self.id, nid=nid, iflag=0) + ) + logging.info(f"Constrained extra nodes defined for part {self.id}.") + if self.rigidbody_initial_velocity: + ret = self.stub.CreateInitVelRigidBody( + InitVelRigidBodyRequest( + pid=self.id, + vx=self.translation.x, + vy=self.translation.y, + vz=self.translation.z, + vxr=self.rotation.x, + vyr=self.rotation.y, + vzr=self.rotation.z, + lcid=0, + ) + ) + logging.info(f"Initial velocity for rigidbody {self.id}.")
+ + +
[docs]class BeamPart(Part): + """ + Defines a beam part. + + A beam part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + """ + + def __init__(self, pid): + Part.__init__(self, pid) + self.stub = DynaBase.get_stub() + self.type = "BEAM" + self.crosstype = 1 + +
[docs] def set_cross_type(self, cross): + """Set the type for the cross section.""" + self.crosstype = cross
+ +
[docs] def set_diameter(self, diameter): + """Set the outer diameter for the cross section.""" + self.diameter = diameter
+ +
[docs] def set_property(self): + """Set properties for the beam part.""" + sec = BeamSection( + element_formulation=self.formulation, + cross_section=self.crosstype, + thickness_n1=self.diameter, + thickness_n2=self.diameter, + ) + self.secid = sec.id + self.stub.SetPartProperty( + PartPropertyRequest( + pid=self.id, + secid=self.secid, + mid=self.mid, + eosid=self.eosid, + hgid=self.hgid, + grav=self.grav, + adpopt=self.adpopt, + tmid=self.tmid, + ) + )
+ + +
[docs]class ShellPart(Part): + """Defines a shell part. + + A shell part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + """ + + def __init__(self, pid): + Part.__init__(self, pid) + self.stub = DynaBase.get_stub() + self.type = "SHELL" + self.shear_factor = 1 + self.intpoints = 5 + self.print = 0 + self.thickness = 1 + self.hourglasstype = -1 + self.defined_des_surface = False + self.despid = 0 + self.desxid = 0 + self.des_nquad = 1 + self.des_nsid = 0 + self.des_rsf = 1 + +
[docs] def set_hourglass(self, type=HourglassType.STANDARD_LSDYNA_VISCOUS): + """Set the hourglass type, which identifies the bulk viscosity.""" + self.hourglasstype = type.value
+ +
[docs] def set_shear_factor(self, factor): + """Set the shear correction factor, which scales the transverse shear stress.""" + self.shear_factor = factor
+ +
[docs] def set_integration_points(self, points=5): + """Set the number of through thickness integration points.""" + self.intpoints = points
+ +
[docs] def set_printout(self, print): + """Set the printout option.""" + self.print = print
+ +
[docs] def set_thickness(self, thickness): + """Set the shell thickness.""" + self.thickness = thickness
+ +
[docs] def set_des_surface(self, despid=0, desxid=0, nquad=1, nsid=0, rsf=-1): + """Generate and place discrete element sphere (DES) elements on the surface of shell elements. + + Parameters + ---------- + despid : int, optional + Part ID for the generated DES elements. The default is ``0``. + desxid : int, optional + Section ID for the generated DES elements. The default is ``0``. + nquad : int, optional + Number of equally spaced DES elements to create on a shell element in each local shell direction. + The default is ``1``. + nsid : int, optional + If defined, this card creates a node set with ID NSID for the nodes generated by this card. + The default is ``0``. + rsf : float, optional + Scale factor for determining the DES radius. The default is ``1``. + """ + self.defined_des_surface = True + self.despid = despid + self.desxid = desxid + self.des_nquad = nquad + self.des_nsid = nsid + self.des_rsf = rsf
+ +
[docs] def set_property(self): + """Set properties for the shell part.""" + if self.defined_des_surface: + ret = self.stub.CreateDefineDEMeshSurface( + DefineDEMeshSurfaceRequest( + sid=self.id, + type=1, + despid=self.despid, + desxid=self.desxid, + nquad=self.des_nquad, + nsid=self.des_nsid, + rsf=self.des_rsf, + ) + ) + logging.info("Define discrete element mesh surface Created...") + Part.set_property(self) + sec = ShellSection( + element_formulation=self.formulation, + shear_factor=self.shear_factor, + integration_points=self.intpoints, + printout=self.print, + thickness1=self.thickness, + thickness2=self.thickness, + thickness3=self.thickness, + thickness4=self.thickness, + ) + self.secid = sec.id + if self.hourglasstype > 0: + ret = self.stub.CreateHourglass(HourglassRequest(ihq=self.hourglasstype, qm=1, q1=0, q2=0, qb=0, qw=0)) + self.hgid = ret.id + else: + self.hgid = 0 + self.stub.SetPartProperty( + PartPropertyRequest( + pid=self.id, + secid=self.secid, + mid=self.mid, + eosid=self.eosid, + hgid=self.hgid, + grav=self.grav, + adpopt=self.adpopt, + tmid=self.tmid, + ) + )
+ + +
[docs]class IGAPart(Part): + """ + Defines an isogeometric shell part. + + The part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + """ + + def __init__(self, pid): + Part.__init__(self, pid) + self.stub = DynaBase.get_stub() + self.type = "IGA" + self.shear_factor = 1 + self.thickness = 1 + +
[docs] def set_shear_factor(self, factor): + """Set the shear correction factor, which scales the transverse shear stress.""" + self.shear_factor = factor
+ +
[docs] def set_thickness(self, thickness): + """Set the shell thickness.""" + self.thickness = thickness
+ +
[docs] def set_property(self): + """Set properties for the IGA part.""" + sec = IGASection( + element_formulation=self.formulation, + shear_factor=self.shear_factor, + thickness=self.thickness, + ) + self.secid = sec.id + self.stub.SetPartProperty( + PartPropertyRequest( + pid=self.id, + secid=self.secid, + mid=self.mid, + eosid=self.eosid, + hgid=self.hgid, + grav=self.grav, + adpopt=self.adpopt, + tmid=self.tmid, + ) + )
+ + +
[docs]class SolidPart(Part): + """ + Defines a solid part. + + The part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + """ + + def __init__(self, pid): + Part.__init__(self, pid) + self.stub = DynaBase.get_stub() + self.type = "SOLID" + self.hourglasstype = -1 + +
[docs] def set_hourglass(self, type=HourglassType.STANDARD_LSDYNA_VISCOUS): + """Set the hourglass type, which identifies the bulk viscosity.""" + self.hourglasstype = type.value
+ +
[docs] def set_property(self): + """Set the properties for the solid part.""" + ret = self.stub.CreateSectionSolid(SectionSolidRequest(elform=self.formulation)) + self.secid = ret.id + if self.hourglasstype > 0: + ret = self.stub.CreateHourglass(HourglassRequest(ihq=self.hourglasstype, qm=1, q1=0, q2=0, qb=0, qw=0)) + self.hgid = ret.id + else: + self.hgid = 0 + self.stub.SetPartProperty( + PartPropertyRequest( + pid=self.id, + secid=self.secid, + mid=self.mid, + eosid=self.eosid, + hgid=self.hgid, + grav=self.grav, + adpopt=self.adpopt, + tmid=self.tmid, + ) + )
+ + +
[docs]class DRO(Enum): +
[docs] DESCRIBES_TRANSLATIONAL_SPRING = 0
+
[docs] DESCRIBES_TORSIONAL_SPRING = 1
+ + +
[docs]class DiscretePart(Part): + """Defines a discrete part. + + The part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + """ + + def __init__(self, pid): + Part.__init__(self, pid) + self.type = "DISCRETE" + self.stub = DynaBase.get_stub() + self.displacement_option = 0 + +
[docs] def set_displacement_option(self, displacement_option=DRO.DESCRIBES_TRANSLATIONAL_SPRING): + """Set the displacement, which defines the rotation.""" + self.displacement_option = displacement_option.value
+ +
[docs] def set_property(self): + """Set properties for the discrete part.""" + Part.set_property(self) + ret = self.stub.CreateSectionDiscrete( + SectionDiscreteRequest(dro=self.displacement_option, kd=0, v0=0, cl=0, fd=0, cdl=0, tdl=0) + ) + self.secid = ret.id + self.hgid = 0 + self.stub.SetPartProperty( + PartPropertyRequest( + pid=self.id, + secid=self.secid, + mid=self.mid, + eosid=self.eosid, + hgid=self.hgid, + grav=self.grav, + adpopt=self.adpopt, + tmid=self.tmid, + ) + )
+ + +
[docs]class Parts: + """Stores the part list.""" + + def __init__(self): + self.beamlist = [] + self.shelllist = [] + self.solidlist = [] + self.igalist = [] + self.icfdlist = [] + self.icfdvolumelist = [] + self.discretelist = [] + self.isphstructlist = [] + self.isphfluidlist = [] + +
[docs] def add(self, part): + """Add a part to the part list.""" + if part.type == "BEAM": + self.beamlist.append(part) + elif part.type == "SHELL": + self.shelllist.append(part) + elif part.type == "SOLID": + self.solidlist.append(part) + elif part.type == "IGA": + self.igalist.append(part) + elif part.type == "ICFD": + self.icfdlist.append(part) + elif part.type == "ICFDVOLUME": + self.icfdvolumelist.append(part) + elif part.type == "DISCRETE": + self.discretelist.append(part) + elif part.type == "ISPHSTRUCT": + self.isphstructlist.append(part) + elif part.type == "ISPHFLUID": + self.isphfluidlist.append(part) + else: + logging.info("Warning: Invalid part type!")
+ +
[docs] def get_num_shellpart(self): + """Get the number of shell parts.""" + return len(self.shelllist)
+ +
[docs] def set_property(self): + """Set properties for added parts.""" + for obj in self.beamlist: + obj.set_property() + for obj in self.shelllist: + obj.set_property() + for obj in self.solidlist: + obj.set_property() + for obj in self.igalist: + obj.set_property() + for obj in self.icfdlist: + obj.set_property() + for obj in self.icfdvolumelist: + obj.create() + for obj in self.discretelist: + obj.set_property() + for obj in self.isphstructlist: + obj.set_property() + for obj in self.isphfluidlist: + obj.set_property()
+ + +
[docs]class AnalysisType(Enum): +
[docs] EXPLICIT = 0
+
[docs] IMPLICIT = 1
+
[docs] EXPLICIT_FOLLOWED_BY_IMPLICIT = 2
+ + +
[docs]class TimestepCtrol(Enum): +
[docs] CONSTANT_TIMESTEP_SIZE = 0
+
[docs] AUTOMATICALLY_ADJUST_TIMESTEP_SIZE = 1
+ + +
[docs]class Integration(Enum): +
[docs] NEWMARK_TIME_INTEGRATION = 1
+
[docs] MODAL_SUPERPOSITION_FOLLOWING_EIGENVALUE = 2
+ + +
[docs]class ImplicitAnalysis: + """Activates implicit analysis and defines associated control parameters.""" + + def __init__(self, analysis_type=AnalysisType.IMPLICIT, initial_timestep_size=0): + self.defined = False + self.defined_auto = False + self.defined_dynamic = False + self.defined_eigenvalue = False + self.defined_solution = False + self.defined_mass_matrix = False + self.imflag = analysis_type.value + self.dt0 = initial_timestep_size + self.stub = DynaBase.get_stub() + +
[docs] def set_initial_timestep_size(self, size=0): + """Define the initial time step size.""" + self.defined = True + self.dt0 = size
+ +
[docs] def set_timestep( + self, + control_flag=TimestepCtrol.CONSTANT_TIMESTEP_SIZE, + Optimum_equilibrium_iteration_count=11, + ): + """Define parameters for automatic time step control during implicit analysis. + + Parameters + ---------- + control_flag : int + Automatic time step control flag. + Optimum_equilibrium_iteration_count : int, optional + Optimum equilibrium iteration count per time step. The default is ``11``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.defined_auto = True + self.iauto = control_flag.value + self.iteopt = Optimum_equilibrium_iteration_count
+ +
[docs] def set_dynamic( + self, + integration_method=Integration.NEWMARK_TIME_INTEGRATION, + gamma=0.5, + beta=0.25, + ): + """Activate implicit dynamic analysis and define time integration constants. + + Parameters + ---------- + integration_method : enum + Implicit analysis type. + gamma : float, optional + Newmark time integration constant. The default is ``0.5``. + beta : float, optional + Newmark time integration constant. The default is ``0.25``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.defined_dynamic = True + self.imass = integration_method.value + self.gamma = gamma + self.beta = beta
+ +
[docs] def set_eigenvalue(self, number_eigenvalues=0, shift_scale=0): + """Activate implicit eigenvalue analysis and define associated input parameters. + + Parameters + ---------- + number_eigenvalues : int, optional + Number of eigenvalues to extract. The default is ``0``. + shift_scale : float, optional + Shift scale. The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.defined_eigenvalue = True + self.neig = number_eigenvalues + self.shfscl = shift_scale
+ +
[docs] def set_solution( + self, + solution_method=12, + iteration_limit=11, + stiffness_reformation_limit=55, + absolute_convergence_tolerance=1e-10, + ): + """Specify whether a linear or nonlinear solution is desired. + + Parameters + ---------- + solution_method : int, optional + Solution method for implicit analysis. The default is ``12``. + iteration_limit : int, optional + Iteration limit between automatic stiffness reformations. + The default is ``11``. + stiffness_reformation_limit : int, optional + Stiffness reformation limit per time step. The default is + ``55``. + absolute_convergence_tolerance : float, optional + Absolute convergence tolerance. The default is ``1e-10``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.defined_solution = True + self.nsolver = solution_method + self.ilimit = iteration_limit + self.maxref = stiffness_reformation_limit + self.abstol = absolute_convergence_tolerance
+ +
[docs] def set_consistent_mass_matrix(self): + """Use the consistent mass matrix in implicit dynamics and eigenvalue solutions.""" + self.defined_mass_matrix = True
+ +
[docs] def create(self): + """Create an implicit analysis.""" + if self.defined == False: + return + if self.defined: + self.stub.CreateControlImplicitGeneral(ControlImplicitGeneralRequest(imflag=self.imflag, dt0=self.dt0)) + if self.defined_auto: + self.stub.CreateControlImplicitAuto(ControlImplicitAutoRequest(iauto=self.iauto, iteopt=self.iteopt)) + if self.defined_dynamic: + self.stub.CreateControlImplicitDynamic( + ControlImplicitDynamicRequest(imass=self.imass, gamma=self.gamma, beta=self.beta) + ) + if self.defined_eigenvalue: + self.stub.CreateControlImplicitEigenvalue( + ControlImplicitEigenvalueRequest(neig=self.neig, shfscl=self.shfscl) + ) + if self.defined_solution: + self.stub.CreateControlImplicitSolution( + ControlImplicitSolutionRequest( + nsolver=self.nsolver, ilimit=self.ilimit, maxref=self.maxref, abstol=self.abstol + ) + ) + if self.defined_mass_matrix: + self.stub.CreateControlImplicitConsistentMass(ControlImplicitConsistentMassRequest(iflag=1))
+ + +
[docs]class ThermalAnalysisType(Enum): +
[docs] STEADY_STATE = 0
+
[docs] TRANSIENT = 1
+ + +
[docs]class ThermalAnalysisTimestep(Enum): +
[docs] FIXED = 0
+
[docs] VARIABLE = 1
+ + +
[docs]class ThermalAnalysis: + """Activates thermal analysis and defines associated control parameters.""" + + def __init__(self): + self.defined_solver = False + self.defined_timestep = False + self.stub = DynaBase.get_stub() + +
[docs] def set_timestep(self, timestep_control=ThermalAnalysisTimestep.FIXED, initial_timestep=0): + """Set time step controls for the thermal solution in a thermal only or coupled structural/thermal analysis. + + Parameters + ---------- + timestep_control : ThermalAnalysisTimestep + Time step control. + initial_timestep : float, optional + Initial thermal time step. The default is ``0``. + """ + self.defined_timestep = True + self.ts = timestep_control.value + self.its = initial_timestep
+ +
[docs] def set_solver(self, analysis_type=ThermalAnalysisType.STEADY_STATE): + """Set options for the thermal solution in a thermal only or coupled structural-thermal analysis. + + Parameters + ---------- + analysis_type : ImplicitAnalysis + Thermal analysis type. + """ + self.defined_solver = True + self.atype = analysis_type.value
+ +
[docs] def create(self): + """Create a thermal analysis.""" + if self.defined_timestep: + self.stub.CreateControlThermalTimestep(ControlThermalTimestepRequest(its=self.its)) + if self.defined_solver: + self.stub.CreateControlThermalSolver(ControlThermalSolverRequest(atype=self.atype)) + if self.defined_timestep or self.defined_solver: + self.stub.CreateControlSolution(ControlSolutionRequest(soln=2))
+ + +
[docs]class ContactCategory(Enum): +
[docs] SURFACE_TO_SURFACE_CONTACT = 2
+
[docs] SINGLE_SURFACE_CONTACT = 3
+
[docs] SHELL_EDGE_TO_SURFACE_CONTACT = 4
+
[docs] NODES_TO_SURFACE = 5
+ + +
[docs]class ContactType(Enum): +
[docs] NULL = 0
+
[docs] AUTOMATIC = 1
+
[docs] GENERAL = 2
+
[docs] RIGID = 3
+
[docs] TIED = 4
+
[docs] TIED_WITH_FAILURE = 5
+
[docs] ERODING = 6
+
[docs] EDGE = 7
+ + +# class ContactAlgorithm(Enum): +# PENALTY_BASED = 1 +# CONSTRAINT_BASED = 2 + + +
[docs]class OffsetType(Enum): +
[docs] NULL = ""
+
[docs] OFFSET = "OFFSET"
+
[docs] BEAM_OFFSET = "BEAM_OFFSET"
+
[docs] CONSTRAINED_OFFSET = "CONSTRAINED_OFFSET"
+ + +
[docs]class ContactFormulation(Enum): +
[docs] STANDARD_PENALTY = 0
+
[docs] SOFT_CONSTRAINT_PENALTY = 1
+
[docs] SEGMENT_BASED_CONTACT_PENALTY = 2
+ + +
[docs]class SBOPT(Enum): +
[docs] ASSUME_PLANER_SEGMENTS = 2
+
[docs] WRAPED_SEGMENT_CHECKING = 3
+
[docs] SLDING_OPTION = 4
+ + +
[docs]class ContactSurface: + """Defines a contact interface.""" + + def __init__(self, set): + self.stub = DynaBase.get_stub() + self.id = set.create(self.stub) + self.thickness = 0 + if set.type.upper() == "PART": + self.type = 3 + self.id = set.pos(0) + elif set.type.upper() == "PARTSET": + self.type = 2 + elif set.type.upper() == "NODESET" or set.type.upper() == "NODE": + self.type = 4 + else: + self.type = 0 + self.penalty_stiffness = 1.0 + +
[docs] def set_contact_region(self, box): + """Include in the contact definition only those SURFA nodes/segments within a box. + + Parameters + ---------- + box : Box + Box-shaped volume. + """ + self.id = box.id + return self.id
+ +
[docs] def set_contact_thickness(self, thickness): + """Set the contact thickness for the SURFA surface. + + Parameters + ---------- + thickness : float + Contact thickness. + """ + self.thickness = thickness
+ +
[docs] def set_penalty_stiffness_scale_factor(self, scalefactor=1.0): + """Set the scale factor on the default surface penalty stiffness. + + Parameters + ---------- + scalefactor : int, optional + Scale factor. The default is ``1.0``. + """ + self.penalty_stiffness = scalefactor
+ + +
[docs]class Contact: + """Provide a way of treating interaction between disjoint parts.""" + + def __init__( + self, + type=ContactType.NULL, + category=ContactCategory.SINGLE_SURFACE_CONTACT, + offset=OffsetType.NULL, + ): + self.stub = DynaBase.get_stub() + self.rigidwall_penalties_scale_factor = 1 + self.max_penetration_check_multiplier = 4 + self.initial_penetrations = 0 + self.rigidwall_gap_stiffness = 0 + self.category = category + self.type = type + self.mortar = False + self.ignore = 0 + self.offset = offset.value + self.static_friction_coeff = 0 + self.dynamic_friction_coeff = 0 + self.birth_time = 0 + self.death_time = 1e20 + self.option_tiebreak = False + self.optionres = 0 + self.contact_formulation = 0 + self.segment_based_contact_option = 2 + +
[docs] def set_mortar(self): + """Set the mortar contact. + + A mort contact is a segment-to-segment, penalty-based contact. + """ + self.mortar = True
+ + # def set_algorithm(self, algorithm=ContactAlgorithm.PENALTY_BASED): + # self.algorithm = algorithm.value + +
[docs] def set_tiebreak(self): + """Set the contact allow for failure. + + A tieback is a special case of this. After failure, the contact + usually becomes a normal one-way, two-way, or single surface version. + """ + self.option_tiebreak = True + self.optionres = 2
+ +
[docs] def set_friction_coefficient(self, static=0, dynamic=0): + """Set the coefficient of friction. + + Parameters + ---------- + static : float, optional + Static coefficient of friction. The default is ``0``. + dynamic : float, optional + Dynamic coefficient of friction. The default is ``0``. + """ + self.static_friction_coeff = static + self.dynamic_friction_coeff = dynamic
+ +
[docs] def set_active_time(self, birth_time=0, death_time=1e20): + """Set the birth and death time to active and deactivate the contact. + + Parameters + ---------- + birth_time : int, optional + Time to activate the contact. The default is ``0``. + death_time : float, optional + Time to deactivate the contact. The default is ``1e20``. + """ + self.birth_time = birth_time + self.death_time = death_time
+ +
[docs] def set_initial_penetration(self): + """Ignore initial penetrations.""" + self.ignore = 1
+ +
[docs] def set_slave_surface(self, surface): + """Set the slave contact interface.""" + self.slavesurface = surface
+ +
[docs] def set_master_surface(self, surface): + """Set the master contact interface.""" + self.mastersurface = surface
+ +
[docs] def set_penalty_algorithm( + self, + formulation=ContactFormulation.STANDARD_PENALTY, + segment_based_contact_option=SBOPT.ASSUME_PLANER_SEGMENTS, + ): + """Set the contact formulation.""" + self.contact_formulation = formulation.value + self.segment_based_contact_option = segment_based_contact_option.value
+ +
[docs] def create(self): + """Create a contact.""" + opcode = "" + if self.type == ContactType.AUTOMATIC: + opcode += "AUTOMATIC_" + elif self.type == ContactType.TIED: + opcode += "TIED_" + else: + opcode += "" + if self.category != ContactCategory.SINGLE_SURFACE_CONTACT: + msid = self.mastersurface.id + mstyp = self.mastersurface.type + mst = self.mastersurface.thickness + penalty_stiffness = self.mastersurface.penalty_stiffness + if self.category == ContactCategory.SURFACE_TO_SURFACE_CONTACT: + opcode += "SURFACE_TO_SURFACE" + elif self.category == ContactCategory.SINGLE_SURFACE_CONTACT: + opcode += "SINGLE_SURFACE" + msid = 0 + mstyp = 0 + mst = 0 + penalty_stiffness = 0 + elif self.category == ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT: + opcode += "SHELL_EDGE_TO_SURFACE" + elif self.category == ContactCategory.NODES_TO_SURFACE: + opcode += "NODES_TO_SURFACE" + else: + opcode += "" + + if self.offset == OffsetType.OFFSET: + opcode += "_OFFSET" + elif self.offset == OffsetType.BEAM_OFFSET: + opcode += "_BEAM_OFFSET" + elif self.offset == OffsetType.CONSTRAINED_OFFSET: + opcode += "_CONSTRAINED_OFFSET" + else: + opcode += "" + + if self.option_tiebreak: + opcode += "_TIEBREAK" + + if self.mortar == True: + option2 = "MORTAR" + else: + option2 = "" + ret = self.stub.CreateContact( + ContactRequest( + cid=0, + title="", + option1=opcode, + option2=option2, + option3=False, + offset=self.offset, + ssid=self.slavesurface.id, + msid=msid, + sstyp=self.slavesurface.type, + mstyp=mstyp, + sapr=0, + sbpr=0, + fs=self.static_friction_coeff, + fd=self.dynamic_friction_coeff, + vdc=0, + penchk=0, + birthtime=self.birth_time, + sfsa=self.slavesurface.penalty_stiffness, + sfsb=penalty_stiffness, + sst=self.slavesurface.thickness, + mst=mst, + optionres=0, + nfls=0, + sfls=0, + param=0, + ct2cn=1, + soft=self.contact_formulation, + sofscl=0.1, + lcidab=0, + maxpar=1.025, + sbopt=self.segment_based_contact_option, + depth=2, + bsort=100, + frcfrq=1, + ignore=self.ignore, + igap=1, + ) + ) + logging.info("Contact Created...") + return ret
+ + +
[docs]class ContactGroup: + """Create a contact group.""" + + def __init__(self): + self.stub = DynaBase.get_stub() + self.contactlist = [] + +
[docs] def add(self, contact): + """Add a contact in the group.""" + self.contactlist.append(contact)
+ +
[docs] def create(self): + """Create contacts.""" + for obj in self.contactlist: + obj.create()
+ +
[docs] def num(self): + """Get the number of contact objects.""" + return len(self.contactlist)
+ + +
[docs]class Constraint: + """Provides a way of constraining degrees of freedom to move together in some way.""" + + def __init__(self): + self.stub = stub = DynaBase.get_stub() + self.spotweldlist = [] + self.cnrbsetidlist = [] + self.jointsphericallist = [] + self.mergerigidlist = [] + +
[docs] def create_spotweld(self, nodeid1, nodeid2): + """Define massless spot welds between non-contiguous nodal pairs. + + Parameters + ---------- + nodeid1 : int + ID for the first node. + nodeid2 : int + ID for the second node. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + param = [nodeid1, nodeid2] + self.spotweldlist.append(param)
+ +
[docs] def create_cnrb(self, nodeset): + """Create a nodal rigid body, which is a rigid body that consists of defined nodes. + + Parameters + ---------- + nodeset : NodeSet + Node set that defines the rigid body. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + nodeset.create(self.stub) + nsid = nodeset.id + self.cnrbsetidlist.append(nsid)
+ +
[docs] def create_joint_spherical(self, nodes, relative_penalty_stiffness=1.0, damping_scale_factor=1.0): + """Create a joint between two rigid bodies. + + Parameters + ---------- + nodes : list + List of nodes for creating the joint. + relative_penalty_stiffness : int, optional + Relative penalty stiffness. The default is ``1.0``. + damping_scale_factor : int, optional + Damping scale factor on the default damping value. + The default is ``1.0``. + """ + self.jointsphericallist.append([nodes, relative_penalty_stiffness, damping_scale_factor])
+ +
[docs] def merge_two_rigid_bodies(self, lead_rigidbody=0, constrained_rigidbody=0): + """Merge two rigid bodies. + + One rigid body, called the constrained rigid body, + is merged into another rigid body, called the lead rigid body. + + Parameters + ---------- + lead_rigidbody : int, optional + Part ID for the lead rigid body. The default is ``0``. + constrained_rigidbody : int + Part ID for the constrained rigid body. The default is ``0``. + """ + self.mergerigidlist.append([lead_rigidbody, constrained_rigidbody])
+ +
[docs] def create(self): + """Create a constraint.""" + for obj in self.spotweldlist: + self.stub.CreateConstrainedSpotWeld(ConstrainedSpotWeldRequest(node1=obj[0], node2=obj[1])) + logging.info("Spotweld Created...") + + for i in range(len(self.cnrbsetidlist)): + self.stub.CreateConstrainedNodalRigidBody( + ConstrainedNodalRigidBodyRequest(pid=i, nsid=self.cnrbsetidlist[i]) + ) + logging.info("CNRB Created...") + for i in range(len(self.jointsphericallist)): + self.stub.CreateConstrainedJoint( + ConstrainedJointRequest( + type="SPHERICAL", + nodes=self.jointsphericallist[i][0], + rps=self.jointsphericallist[i][1], + damp=self.jointsphericallist[i][2], + ) + ) + logging.info("joint spherical Created...") + for i in range(len(self.mergerigidlist)): + self.stub.CreateConstrainedRigidBodies( + ConstrainedRigidBodiesRequest(pidl=self.mergerigidlist[i][0], pidc=self.mergerigidlist[i][1]) + ) + logging.info("constrained rigid bodies Created...")
+ + +
[docs]class BoundaryCondition: + """Provides a way of defining imposed motions on boundary nodes.""" + + def __init__(self): + self.stub = DynaBase.get_stub() + self.spclist = [] + self.imposedmotionlist = [] + self.templist = [] + +
[docs] def create_spc( + self, + nodeset, + tx=True, + ty=True, + tz=True, + rx=True, + ry=True, + rz=True, + cid=0, + birth=0, + death=1e20, + ): + """Define nodal single point constraints. + + Parameters + ---------- + nodeset : NodeSet. + Node set. + contraint_x/y/z_direction : int + Translational constraint in local x/y/z-direction. + contraint_x/y/zaxis_rotate : int + Rotational constraint about local x/y/z-axis. + + """ + param = [nodeset, tx, ty, tz, rx, ry, rz, cid, birth, death] + self.spclist.append(param)
+ +
[docs] def create_imposed_motion( + self, + set, + curve, + motion=Motion.DISPLACEMENT, + dof=DOF.X_TRANSLATIONAL, + scalefactor=1, + birthtime=0, + ): + """Create an imposed nodal motion on a node or set of nodes. + + An imposed nodal motion can be a velocity, acceleration, or displacement. + + Parameters + ---------- + partset : PartSet. + Part set. + curve : Curve + Curve ID or function ID to describe the motion value as a function of time. + motion : enum + Velocity/Acceleration/Displacement flag. + dof : enum + Applicable degrees of freedom. + scalefactor : int, optional + Load curve scale factor. The default is ``1``. + birthtime : int, optional + + """ + param = [set, curve, motion, dof, scalefactor, birthtime] + self.imposedmotionlist.append(param)
+ +
[docs] def create_temperature( + self, + nodeset, + curve=None, + scalefactor=1, + ): + """Create temperature boundary conditions for a thermal or coupled thermal/structural analysis. + + Parameters + ---------- + nodeset : NodeSet. + Node set. + curve : Curve, optional + Temperature, T, specification. The default is ``None``. + scalefactor : float, optional + Temperature, T, curve multiplier. The default is ``1``. + + """ + param = [nodeset, curve, scalefactor] + self.templist.append(param)
+ +
[docs] def create(self): + """Create a boundary condition.""" + for obj in self.imposedmotionlist: + set = obj[0] + curve = obj[1] + motion = obj[2] + dof = obj[3] + scalefactor = obj[4] + birthtime = obj[5] + set.create(self.stub) + curve.create(self.stub) + if set.type == "PARTSET" or set.type == "PART": + for id in set.parts: + ret = self.stub.CreateBdyPrescribedMotion( + BdyPrescribedMotionRequest( + id=0, + heading="", + option="RIGID", + typeid=id, + dof=dof.value, + vad=motion.value, + lcid=curve.id, + sf=scalefactor, + vid=0, + birth=birthtime, + death=0, + ) + ) + elif set.type == "NODESET": + self.stub.CreateBdyPrescribedMotion( + BdyPrescribedMotionRequest( + id=0, + heading="", + option="SET", + typeid=set.id, + dof=dof.value, + vad=motion.value, + lcid=curve.id, + sf=scalefactor, + vid=0, + birth=birthtime, + death=0, + ) + ) + else: + pass + logging.info("Boundary prescribed motion Created...") + for obj in self.spclist: + nodeset = obj[0] + tx = obj[1] + ty = obj[2] + tz = obj[3] + rx = obj[4] + ry = obj[5] + rz = obj[6] + cid = obj[7] + birth = obj[8] + death = obj[9] + if birth == 0 and death == 1e20: + birthdeath = False + else: + birthdeath = True + if nodeset.num() == 1: + nid = nodeset.pos(pos=0) + option1 = "NODE" + else: + nid = nodeset.create(self.stub) + option1 = "SET" + self.stub.CreateBdySpc( + BdySpcRequest( + option1=option1, + birthdeath=birthdeath, + nid=nid, + cid=cid, + dofx=tx, + dofy=ty, + dofz=tz, + dofrx=rx, + dofry=ry, + dofrz=rz, + birth=birth, + death=death, + ) + ) + logging.info("Boundary spc Created...") + for obj in self.templist: + nodeset, curve, scalefactor = obj[0], obj[1], obj[2] + if nodeset.num() == 1: + nid = nodeset.pos(pos=0) + option = "NODE" + else: + nid = nodeset.create(self.stub) + option = "SET" + if curve is not None: + cid = curve.id + else: + cid = 0 + self.stub.CreateBdyTemp( + BdyTempRequest( + option=option, + nid=nid, + tlcid=cid, + tmult=scalefactor, + ) + ) + logging.info("Boundary Temperature Created...")
+ + +
[docs]class InitialCondition: + """Provides a way of initializing velocities and detonation points.""" + + def __init__(self): + self.stub = DynaBase.get_stub() + self.velocitylist = [] + self.velocitynodelist = [] + self.temperaturelist = [] + +
[docs] def create_velocity( + self, + velocityset, + angular_velocity=0, + velocity=Velocity(0, 0, 0), + direction=Direction(0, 0, 0), + stime=0, + ): + """Create initial velocities for rotating and/or translating bodies.""" + self.velocitylist.append([velocityset, angular_velocity, velocity, direction, stime])
+ +
[docs] def create_velocity_node(self, nodeid, trans=Velocity(0, 0, 0), rot=RotVelocity(0, 0, 0)): + """Define initial nodal point velocities for a node.""" + self.velocitynodelist.append([nodeid, trans, rot])
+ +
[docs] def create_temperature(self, nodeset=None, temperature=0): + """Create an initial nodal point temperature.""" + self.temperaturelist.append((nodeset, temperature))
+ +
[docs] def create(self): + """Create an initial condition.""" + for obj in self.velocitylist: + velocityset = obj[0] + angular_velocity = obj[1] + velocity = obj[2] + direction = obj[3] + stime = obj[4] + id = velocityset.create(self.stub) + if velocityset.type.upper() == "PARTSET": + type = 1 + elif velocityset.type.upper() == "PART": + type = 2 + else: + type = 3 + phase = 0 + if stime != 0: + phase = 1 + self.stub.CreateInitVelGenerationStartTime(InitVelGenerationStartTimeRequest(stime=stime)) + self.stub.CreateInitVelGeneration( + InitVelGenerationRequest( + id=id, + styp=type, + omega=angular_velocity, + vx=velocity.x, + vy=velocity.y, + vz=velocity.z, + xc=0, + yc=0, + zc=0, + nx=direction.x, + ny=direction.y, + nz=direction.z, + phase=phase, + ) + ) + logging.info(f"Define initial velocities for {type} {id}.") + for obj in self.velocitynodelist: + nid = obj[0] + trans = obj[1] + rot = obj[2] + velocity = [trans.x, trans.y, trans.z, rot.x, rot.y, rot.z] + self.stub.CreateInitVel(InitVelRequest(nsid=nid, velocity=velocity)) + logging.info(f"Define initial velocities for node {nid}.") + for obj in self.temperaturelist: + nset = obj[0] + temp = obj[1] + id = nset.create(self.stub) + type = nset.type.upper() + if type == "NODESET": + option = "SET" + elif type == "NODE": + option = "NODE" + id = nset.get_nid() + else: + print("Error:Invalid set type!") + self.stub.CreateInitTemperature(InitTemperatureRequest(option=option, nsid=id, temp=temp)) + logging.info(f"Define temperature at {type} {id}.")
+ + +
[docs]class RigidwallCylinder: + """Defines a rigid wall with a cylinder form. + + Parameters + ---------- + tail : Point, optional + Coordinates of the tail of the normal vector. + The default is ``(0, 0, 0)``. + head : Point, optional + Coordinates of the head of the normal vector. + The default is ``(0, 0, 0)``. + radius : float, optional + Radius of the cylinder. The default is ``1``. + length : float, optional + Length of cylinder. The default is ``10``. + """ + + def __init__(self, tail=Point(0, 0, 0), head=Point(0, 0, 0), radius=1, length=10): + self.stub = DynaBase.get_stub() + self.tail = tail + self.head = head + self.radius = radius + self.length = length + self.motion = -1 + self.lcid = 0 + self.dir = Direction(1, 0, 0) + +
[docs] def set_motion(self, curve, motion=Motion.VELOCITY, dir=Direction(1, 0, 0)): + """Set the prescribed motion.""" + curve.create(self.stub) + self.lcid = curve.id + self.motion = motion.value + if self.motion == Motion.DISPLACEMENT: + self.motion = 1 + self.dir = dir
+ +
[docs] def create(self): + """Create a rigidwall cylinder.""" + parameter = [ + self.tail.x, + self.tail.y, + self.tail.z, + self.head.x, + self.head.y, + self.head.z, + self.radius, + self.length, + ] + self.stub.CreateRigidWallGeom( + RigidWallGeomRequest( + geomtype=3, + motion=self.motion, + display=1, + parameter=parameter, + lcid=self.lcid, + vx=self.dir.x, + vy=self.dir.y, + vz=self.dir.z, + ) + ) + logging.info("Cylinder Rigidwall Created...")
+ + +
[docs]class RigidwallPlanar: + """Defines planar rigid walls with either finite or infinite size. + + Parameters + ---------- + tail : Point + Coordinate of the tail of the normal vector. + The default is ``(0, 0, 0)``. + head : Point + Coordinate of the head of the normal vector. + The default is ``(0, 0, 0)``. + coulomb_friction_coefficient : float, optional + Friction coefficieint in coulomb units. The default is ``0.5``. + """ + + def __init__(self, tail=Point(0, 0, 0), head=Point(0, 0, 0), coulomb_friction_coefficient=0.5): + self.stub = DynaBase.get_stub() + self.tail = tail + self.head = head + self.fric = coulomb_friction_coefficient + +
[docs] def create(self): + """Create planar rigid walls.""" + normal = [ + self.tail.x, + self.tail.y, + self.tail.z, + self.head.x, + self.head.y, + self.head.z, + ] + self.stub.CreateRigidWallPlanar( + RigidWallPlanarRequest(nsid=0, nsidex=0, boxid=0, fric=self.fric, normal=normal) + ) + logging.info("Rigidwall Planar Created...")
+ + +
[docs]class GravityOption(Enum): +
[docs] DIR_X = "X"
+
[docs] DIR_Y = "Y"
+
[docs] DIR_Z = "Z"
+ + +
[docs]class Gravity: + """Defines body force loads using global axes directions. + + Body force loads are due to a prescribed base acceleration or + angular velocity. + """ + + def __init__(self, dir=GravityOption.DIR_Z, load=Curve(x=[0, 0], y=[0, 0])): + self.stub = DynaBase.get_stub() + self.dir = dir.value + self.load = load + +
[docs] def create(self): + """Define a body force.""" + id = self.load.create(self.stub) + ret = self.stub.CreateLoadBody(LoadBodyRequest(option=self.dir, lcid=id)) + logging.info("Load body Created...")
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynadem.html b/version/0.3/_modules/ansys/dyna/core/pre/dynadem.html new file mode 100644 index 000000000..c6e4d9c65 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynadem.html @@ -0,0 +1,674 @@ + + + + + + + + + + ansys.dyna.core.pre.dynadem — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynadem

+"""
+DEM API
+=======
+
+Module for creating a DEM DYNA input deck.
+"""
+
+import logging
+
+from .dynabase import *  # noqa : F403
+
+
+
[docs]class DynaDEM(DynaBase): + """Contains methods for creating a keyword related to a discrete element method.""" + + def __init__(self): + DynaBase.__init__(self) + +
[docs] def set_des(self, ndamp=0.0, tdamp=0.0, frics=0.0, fricr=0.0, normk=0.01, sheark=0.2857): + """Set global control parameters for discrete element spheres. + + Parameters + ---------- + ndamp : float, optional + Normal damping coefficient. The default is ``0.0``. + tdamp : float, optional + Tangential damping coefficient. The default is ``0.0``. + frics : float, optional + Static coefficient of friction. The default is ``0.0``. + + - EQ.0: 3 DOF + - NE.0: 6 DOF + + fricr : float, optional + Rolling friction coefficient. The default is ``0.0``. + normk : float, optional + Scale factor of the normal spring constant. The default is ``0.01``. + sheark : float, optional + Ratio between the sheark/normk. The default is ``0.2857``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateControlDiscreteElement( + ControlDiscreteElementRequest( + ndamp=ndamp, + tdamp=tdamp, + frics=frics, + fricr=fricr, + normk=normk, + sheark=sheark, + ) + ) + logging.info("Control DES Created...") + return ret
+ +
[docs] def create_define_de_mesh_surface(self, sid, type, despid, desxid, nquad=1, nsid=0, rsf=1.0): + """Create discrete element sphere (DES) elements on the surface of shell elements. + + Parameters + ---------- + sid : int + Part or part set ID for the region of the mesh to place DES elements on. + type : int + SID type: + + - type=0: Part set ID + - type=1: Part ID + + despid : int + Part ID for the generated DES elements. + desxid : int + Section ID for the generated DES elements. + nquad : int, optional + Number of equally spaced DES elements created on a shell element in each + local shell direction. The default is ``1``. + nsid : int, optional + If defined, this card creates a node set with ID NSID for the nodes generated + by this card. The default is ``0``. + rsf : float, optional + Scale factor for determining the DES radius. The default is ``1.0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateDefineDEMeshSurface( + DefineDEMeshSurfaceRequest( + sid=sid, + type=type, + despid=despid, + desxid=desxid, + nquad=nquad, + nsid=nsid, + rsf=rsf, + ) + ) + logging.info("Define discrete element mesh surface Created...") + return ret
+ +
[docs] def save_file(self): + """Save keyword files. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + DynaBase.save_file(self)
+ + +
[docs]class DEMAnalysis: + """Activates DEM analysis and defines associated control parameters.""" + + def __init__(self): + self.defined_des = False + self.stub = DynaBase.get_stub() + +
[docs] def set_des( + self, + normal_damping_coeff=0.0, + tangential_damping_coeff=0.0, + static_friction_coeff=0.0, + rolling_friction_coeff=0.0, + normal_spring_constant_sf=0.01, + ratio=0.2857, + ): + """Set global control parameters for discrete element spheres. + + Parameters + ---------- + normal_damping_coeff : float, optional + Normal damping coefficient. The default value is ``0.0``. + tangential_damping_coeff : float, optional + Tangential damping coefficient. The default value is ``0.0``. + static_friction_coeff : float, optional + Static coefficient of friction. The default is ``0.0``. + rolling_friction_coeff : float, optional + Rolling coefficient of friction. The default is ``0.0``. + normal_spring_constant_sf : float, optional + Normal spring constant. The default is ``0.01``. + ratio : float, optional + Ratio. The default is ``0.2857``. + """ + self.defined_des = True + self.ndamp = normal_damping_coeff + self.tdamp = tangential_damping_coeff + self.frics = static_friction_coeff + self.fricr = rolling_friction_coeff + self.normk = normal_spring_constant_sf + self.sheark = ratio
+ +
[docs] def create(self): + """Create a DEM analysis.""" + if self.defined_des: + self.stub.CreateControlDiscreteElement( + ControlDiscreteElementRequest( + ndamp=self.ndamp, + tdamp=self.tdamp, + frics=self.frics, + fricr=self.fricr, + normk=self.normk, + sheark=self.sheark, + ) + )
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynaem.html b/version/0.3/_modules/ansys/dyna/core/pre/dynaem.html new file mode 100644 index 000000000..2c3a58eb2 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynaem.html @@ -0,0 +1,1318 @@ + + + + + + + + + + ansys.dyna.core.pre.dynaem — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynaem

+"""
+EM API
+======
+
+Module for creating an electromagnetism (EM) input deck.
+"""
+
+import logging
+
+from .dynabase import *  # noqa : F403
+
+
+
[docs]class Isopotential_ConnType(Enum): +
[docs] SHORT_CIRCUIT = 1
+
[docs] RESISTANCE = 2
+
[docs] VOLTAGE_SOURCE = 3
+
[docs] CURRENT_SOURCE = 4
+
[docs] RLC_CIRCUIT = 6
+ + +
[docs]class DynaEM(DynaBase): + """Contains methods for creating keywords related to EM.""" + + def __init__(self): + DynaBase.__init__(self) + self.analysis = EMAnalysis() + +
[docs] def create_em_control(self, emsol=0, numls=100, macrodt=0, ncylfem=5000, ncylbem=5000): + """Enable the EM solver and set its options. + + Parameters + ---------- + emsol : int, optional + EM solver. The default is ``0``. Options are: + + - EQ.-1: Turn off the EM solver after reading the EM keywords. + - EQ.1: Eddy current solver. + - EQ.2: Induced heating solver. + - EQ.3: Resistive heating solver. + - EQ.11: Electrophysiology monodomain. + - EQ.12: Electrophysiology bidomain. + - EQ.13: Electrophysiology monodomain coupled with bidomain. + + numls : int, optional + Number of local EM steps in a whole period for when ``emsol = 2``. + The default is ``100``. + macrodt : int, optional + Macro time step for when ``emsol = 2``. The default is ``0``. + ncylfem : int, optional + Number of electromagnetism cycles between the recalculation of FEM matrices. + The default is ``5000``. + ncylbem : int, optional + Number of electromagnetism cycles between the recalculation of BEM matrices. + The default is ``5000``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMControl( + EMControlRequest( + emsol=emsol, + numls=numls, + macrodt=macrodt, + ncylfem=ncylfem, + ncylbem=ncylbem, + ) + ) + logging.info("EM Control Created...") + return ret
+ +
[docs] def create_em_timestep(self, tstype, dtconst): + """Control the EM time step and its evolution. + + Parameters + ---------- + tstype : int + Time step type. Options are: + + - EQ.1: Constant time step given in DTCONST + - EQ.2: Time step as a function of time given by a load curve specified in LCID + - EQ.3: Automatic time step computation, depending on the solver type + + This time step is then multiplied by FACTOR. + dtconst : float + Constant value for the time step for when ``tstype = 1``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMTimestep(EMTimestepRequest(tstype=tstype, dtconst=dtconst)) + logging.info("EM Timestep Created...") + return ret
+ +
[docs] def create_em_contact(self, contid=0, dtype=0, psidm=0, psids=0, eps1=0.3, eps2=0.3, eps3=0.3, d0=0): + """Create an optional card for defining options on electromagnetic contacts between two sets of parts. + + Parameters + ---------- + contid : int, optional + Electromagnetic contact ID. The default is ``0``. + dtype : int, optional + Detection type. The default is ``0``. Options are: + + - EQ.0: Contact type 0 + - EQ.1: Contact type 1 + + psidm : int, optional + Master part set ID. The default is ``0``. + psids : int + Slave part set ID. The default is ``0``. + eps1 : float, optional + First contact coefficient for contact detection conditions. + The default is ``0.3``. + eps2 : float, optional + Second contact coefficient for contact detection conditions. + The default is ``0.3``. + eps3 : float, optional + Third contact coefficient for contact detection conditions. + The default is ``0.3``. + d0 : float, optional + Contact condition 3 when ``dtype = 1``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMContact( + EMContactRequest( + contid=contid, + dtype=dtype, + psidm=psidm, + psids=psids, + eps1=eps1, + eps2=eps2, + eps3=eps3, + d0=d0, + ) + ) + logging.info("EM Contact Created...") + return ret
+ +
[docs] def set_rogowsky_coil_to_output_current(self, segmentset=SegmentSet([[]]), settype=1, curtyp=1): + """Define Rogowsky coils to measure a global current versus time through a segment set or a node set. + + Parameters + ---------- + rogid : int + Rogowsky coil ID. + setid : int + Segment or node set ID. + settype : int, optional + Type of set. The default is ``1``. Options are: + + - EQ.1: Segment set + - EQ.2: Node set + + curtyp : int + Type of current measured. The default is ``1``. Options are: + + - EQ.1: Volume current + - EQ.2: Surface current (not available yet} + - EQ.3: Magnetic field flow (B field times area) + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + segmentset.create(self.stub) + setid = segmentset.id + ret = self.stub.CreateEMCircuitRogo(EMCircuitRogoRequest(setid=setid, settype=settype, curtyp=curtyp)) + logging.info("EM Circuit Rogo Created...") + return ret.id
+ +
[docs] def create_em_mat001(self, mid, mtype, sigma): + """Create an electromagnetic material type and set properties + for a material whose permeability equals the free space permeability. + + Parameters + ---------- + mid : int + Material ID. + mtype : int + Electromagnetism type of the material. Options are: + + - EQ.0: Air or vacuum + - EQ.1: Insulator material (These materials have the same electromagnetism behavior as EQ.0.) + - EQ.2: Conductor carrying a source + - EQ.3: Fluid conductor + - EQ.4: Conductor not connected to any current or voltage source, where the eddy current problem is solved + + sigma : float + Initial electrical conductivity of the material. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMMat001(EMMat001Request(mid=mid, mtype=mtype, sigma=sigma)) + logging.info("EM Material 001 Created...") + return ret
+ +
[docs] def create_em_mat002(self, mid, mtype, sigma, eosid, murel): + """Create an electromagnetic material type and set properties + whose permeability is different than the free space permeability. + + Parameters + ---------- + mid : int + Material ID. + mtype : int + Electromagnetism type of the material. Options are: + + - EQ.0: Air or vacuum + - EQ.1: Insulator material (These materials have the same electromagnetism behavior as EQ.0.) + - EQ.2: Conductor carrying a source + - EQ.4: Conductor not connected to any current or voltage source, where the wddy current problem is solved + + sigma : float + Initial electrical conductivity of the material. + eosid : int + ID of the EOS to use for the electrical conductivity. + murel : float + Relative permeability, which is the ratio of the permeability of a specific + medium to the permeability of the free space. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMMat002(EMMat002Request(mid=mid, mtype=mtype, sigma=sigma, eosid=eosid, murel=murel)) + logging.info("EM Material 002 Created...") + return ret
+ +
[docs] def create_em_solver_fembem_monolithic(self, mtype=0, stype=0, abstol=1e-6, reltol=1e-4, maxit=500): + """Turn on the monolithic FEM-BEM solver. + + Parameters + ---------- + mtype : int, optional + Monolithic solver type. The default is ``0``. The only option is EQ.0: Direct symmetric solver. + stype : int + Solver type. The default is ``0``. Options are: + + - EQ.0: MINRES iterative solver + - EQ.1: GMRES iterative solver + + abstol : float, optional + Absolute tolerance. The default is ``1e-6``. + reltol : float, optional + Relative tolerance. The default is ``1e-4``. + maxit : int, optional. + Maximum number of iterations. The default is 500. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMSolverFemBemMonolithic( + EMSolverFemBemMonolithicRequest(mtype=mtype, stype=stype, abstol=abstol, reltol=reltol, maxit=maxit) + ) + logging.info("EM Solver FEMBEM Monolithic Created...") + return ret
+ +
[docs] def create_em_output(self, mats=0, matf=0, sols=0, solf=0): + """Define the level of EM-related output on the screen and in the message file. + + Parameters + ---------- + mats : int, optional + Level of matrix assembly output to show on the screen. The default is ``0``. + Options are: + + - EQ.0: No output + - EQ.1: Basic assembly steps + - EQ.2: Basic assembly steps + percentage completed + final statistics + - EQ.3: Basic assembly steps + percentage completed + statistics at each percentage of completion + + matf : int, optional + Level of matrix assembly output to write to the message file. The default + is ``0``. Options are: + + - EQ.0: No output + - EQ.1: Basic assembly steps + - EQ.2: Basic assembly steps + percentage completed + final statistics + - EQ.3: Vasic assembly steps + percentage completed + statistics at each percentage of completion + + sols : int + Level of solver output to show on the screen. The default is ``0``. Options are: + + - EQ.0: No output + - EQ.1: Global information at each FEM iteration + - EQ.2: Detailed information at each FEM iteration + + solf : int, optional + Level of solver output to write to the message file. The default is ``0``. + Options are: + + - EQ.0: No output + - EQ.1: Global information at each FEM iteration + 0 EQ.2: Detailed information at each FEM iteration + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMOutput(EMOutputRequest(mats=mats, matf=matf, sols=sols, solf=solf)) + logging.info("EM Output Created...") + return ret
+ +
[docs] def connect_isopotential( + self, + contype=Isopotential_ConnType.SHORT_CIRCUIT, + isopotential1=None, + isopotential2=None, + value=0, + func=None, + curve=None, + inductance=0, + capacity=0, + initial_voltage=0, + ): + """Define a connection between two isopotentials or between an isopotential and the ground. + + Parameters + ---------- + contype : Isopotential_ConnType + Isopotential connection type. The default is ``SHORT_CIRCUIT``. + isopotential1 : Isopotential + First isopotential to connect. + isopotential2 : Isopotential + Second isopotential to connect. + value : float, optional + Value of the resistance, voltage, or current depending on the isopotential + connection type. The default is ``0``. + func : + curve : + inductance : + capacity : + initial voltage : + + Returns + ------- + int + Connection ID. + """ + contype = contype.value + if contype == 6: + l, c, v0 = inductance, capacity, initial_voltage + else: + l, c, v0 = 0, 0, 0 + if func is not None: + lcid = -func.create(self.stub) + elif curve is not None: + lcid = curve.create(self.stub) + else: + lcid = 0 + if isopotential1 is not None: + isoid1 = isopotential1.create() + else: + isoid1 = 0 + if isopotential2 is not None: + isoid2 = isopotential2.create() + else: + isoid2 = 0 + ret = self.stub.CreateEMIsopotentialConnect( + EMIsopotentialConnectRequest( + contype=contype, isoid1=isoid1, isoid2=isoid2, val=value, lcid=lcid, l=l, c=c, v0=v0 + ) + ) + logging.info("Isopotential connection Created...") + return ret.id
+ +
[docs] def create_em_database_globalenergy(self, outlv=0): + """Enable the output of global EM. + + Parameters + ---------- + outlv : int, optional + Flag for whether to generate the output file. The default is ``0``. + Options are: + + - EQ.0: No output file is generated. + - EQ.1: The output file is generated. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMDatabaseGlobalEnergy(EMDatabaseGlobalEnergyRequest(outlv=outlv)) + logging.info("EM Database Global Energy Created...") + return ret
+ +
[docs] def create_Permanent_magnet(self, id, partid, mtype, north, sourth, hc): + """Create a permanent magnet. + + Parameters + ---------- + id : int + ID of the magnet. + partid : int + Part ID. + mtype : int, optional + Magnet definition type. Options are: + + - EQ.0: Magnet defined by two node set for the north and south poles + - EQ.1: Magnet defined by two segments set for the north and south poles + - EQ.3: Magnet defined by a global vector orientation + - EQ.4: Magnet defined by a global vector orientation given by two node IDs + + north : int + ID of the magnet's north face for ``mtype = 0`` and ``mtype = 1``. + sourth : int + ID of the magnet's south face for ``mtype = 0`` and ``mtype = 1``. + hc : int + Coercive force. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMPermanentMagnet( + EMPermanentMagnetRequest(id=id, partid=partid, mtype=mtype, north=north, sourth=sourth, hc=hc) + ) + logging.info("EM Permanent Magnet Created...") + return ret
+ +
[docs] def create_em_eos_permeability(self, eosid, eostype, lcid): + """Define the parameters for the behavior of a material's permeability. + + Parameters + ---------- + eosid : int + EM EOS ID. + eostype : int + Define the type of EOS. Options are: + + - EQ.1: Permeability defined by a B function of the H curve + - EQ.2: Permeability defined by an H function of the B curve + + lcid : int + Load curve ID. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateEMEOSPermeability(EMEOSPermeabilityRequest(eosid=eosid, eostype=eostype, lcid=lcid)) + logging.info("EM EOS Permeability Created...") + return ret
+ +
[docs] def save_file(self): + """Save keyword files.""" + self.analysis.create() + DynaBase.save_file(self)
+ + +
[docs]class EMType(Enum): +
[docs] EDDY_CURRENT = 1
+
[docs] INDUCTIVE_HEATING = 2
+
[docs] RESISTIVE_HEATING = 3
+
[docs] ELECTROPHYSIOLOGY = 11
+ + +
[docs]class EMDimension(Enum): +
[docs] SOLVER_3D = 0
+
[docs] PLANAR_2D = 1
+
[docs] AXISYMMETRIC_2D = 3
+ + +
[docs]class BEMSOLVER(Enum): +
[docs] DIRECT_SOLVER = 1
+
[docs] PCG = 2
+ + +
[docs]class FEMSOLVER(Enum): +
[docs] DIRECT_SOLVER = 1
+
[docs] PCG = 2
+ + +
[docs]class EMAnalysis: + """Enables the EM solver and sets its options. + + Parameters + ---------- + type : int + Electromagnetism solver. The default is ``EDDY_CURRENT``. Options are: + + - EQ.1: Eddy current solver + - EQ.2: Induced heating solver + - EQ.3: Resistive heating solver + - EQ.11: Electrophysiology monodomain + """ + +
[docs] p_matrix_tol = 1e-6
+
[docs] q_matrix_tol = 1e-6
+
[docs] w_matrix_tol = 1e-6
+ + def __init__(self, type=EMType.EDDY_CURRENT): + self.defined = False + self.stub = DynaBase.get_stub() + self.type = type.value + self.dimtype = 0 + self.defined_bem = False + self.defined_fem = False + +
[docs] def set_timestep(self, timestep): + """Set the EM time step and its evolution.""" + self.defined = True + self.timestep = timestep
+ +
[docs] def set_em_solver(self, type=EMType.EDDY_CURRENT, dimtype=EMDimension.SOLVER_3D): + """Set the EM solver.""" + self.type = type.value + self.dimtype = dimtype.value
+ +
[docs] def set_solver_bem(self, solver=BEMSOLVER.PCG, relative_tol=1e-6, max_iteration=1000): + """Set the type of linear solver, pre-conditioner, and tolerance for the EM BEM solver.""" + self.defined_bem = True + self.bem_relative_tol = relative_tol + self.max_iteration = max_iteration + self.bemsolver = solver.value
+ +
[docs] def set_solver_fem(self, solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-6, max_iteration=1000): + """Set some parameters for the EM FEM solver.""" + self.defined_fem = True + self.femsolver = solver.value + self.fem_relative_tol = relative_tol + self.max_iteration = max_iteration
+ +
[docs] def set_bem_matrix_tol(self, p_matrix_tol=1e-6, q_matrix_tol=1e-6, w_matrix_tol=1e-6): + """Set the type of BEM matrices and the way that they are assembled.""" + EMAnalysis.p_matrix_tol = p_matrix_tol + EMAnalysis.q_matrix_tol = q_matrix_tol + EMAnalysis.w_matrix_tol = w_matrix_tol
+ +
[docs] def create(self): + """Create an EM analysis.""" + if self.defined == False: + return + self.stub.CreateEMControl( + EMControlRequest(emsol=self.type, numls=100, macrodt=0, dimtype=self.dimtype, ncylfem=5000, ncylbem=5000) + ) + self.stub.CreateEMTimestep(EMTimestepRequest(tstype=1, dtconst=self.timestep)) + logging.info("EM Timestep Created...") + if self.defined_bem: + self.stub.CreateEMSolverBem( + EMSolverBemRequest( + reltol=self.bem_relative_tol, + maxite=self.max_iteration, + stype=self.bemsolver, + precon=1, + uselast=1, + ncylbem=3, + ) + ) + logging.info("EM Solver BEM Created...") + if self.defined_fem: + self.stub.CreateEMSolverFem( + EMSolverFemRequest( + reltol=self.fem_relative_tol, + maxite=self.max_iteration, + stype=self.femsolver, + precon=1, + uselast=1, + ncylbem=3, + ) + ) + logging.info("EM Solver FEM Created...") + if self.defined_bem: + self.stub.CreateEMSolverBemMat(EMSolverBemMatRequest(matid=1, reltol=EMAnalysis.p_matrix_tol)) + self.stub.CreateEMSolverBemMat(EMSolverBemMatRequest(matid=2, reltol=EMAnalysis.q_matrix_tol)) + self.stub.CreateEMSolverBemMat(EMSolverBemMatRequest(matid=3, reltol=EMAnalysis.w_matrix_tol)) + logging.info("EM Solver BEMMAT Created...")
+ + +
[docs]class CircuitType(Enum): +
[docs] IMPOSED_CURRENT_VS_TIME = 1
+
[docs] IMPOSED_VOLTAGE_VS_TIME = 2
+ + +
[docs]class Circuit: + """Defines an electrical circuit. + + Parameters + ---------- + circtyp : int + Circuit type. Options are: + + - EQ.1: Imposed current vs time defined by a load curve + - EQ.2: Imposed voltage vs time defined by a load curve + + loadcurve : Curve + Load curve for when the ``circtyp`` parameter is set to ``1``, + ``2``, ``21`` or ``22``. + """ + + def __init__(self, loadcurve, circuit_type=CircuitType.IMPOSED_CURRENT_VS_TIME): + self.stub = DynaBase.get_stub() + self.circuit_type = circuit_type.value + loadcurve.create(self.stub) + self.lcid = loadcurve.id + +
[docs] def set_current(self, current, current_inlet, current_outlet): + """Define the segment set for the current. + + Parameters + ---------- + current : SegmentSet + Segment set for the current. + current_inlet : SegmentSet + Segment set for input voltage or input current + for CIRCTYP.EQ.2/3/12/22 and CIRCTYP.EQ 1/11/21 respectively. + current_outlet : SegmentSet + Segment set for the output voltage or output current for + CIRCTYP = 2/3/12/22 and CIRCTYP = 1/11/21 respectively. + """ + self.current_id = current.create(self.stub) + self.inlet_id = current_inlet.create(self.stub) + self.outlet_id = current_outlet.create(self.stub)
+ +
[docs] def create(self): + """Create a circuit.""" + ret = self.stub.CreateEMCircuit( + EMCircuitRequest( + circtyp=self.circuit_type, + lcid=self.lcid, + sidcurr=self.current_id, + sidvin=self.inlet_id, + sidvout=self.outlet_id, + ) + ) + self.id = ret.id + logging.info(f"EM Circuit {self.id} Created...")
+ + +
[docs]class EMContactType(Enum): +
[docs] NODE_TO_NODE_BASED_ON_CONSTRAINTS = -1
+
[docs] NODE_TO_NODE_PENALTY_BASED_CONTACT = 0
+
[docs] DISCRETE_MORTAR_PENALTY_CONTACT = 1
+ + +
[docs]class EMContact: + """Detects contact between conductors. + + If no contact parts are defined, this method detects contact between + all active parts associated with a conducting material. + """ + + def __init__(self, contact_type=EMContactType.NODE_TO_NODE_PENALTY_BASED_CONTACT): + self.stub = DynaBase.get_stub() + self.contacttype = contact_type.value + +
[docs] def create(self): + """Create an EM contact.""" + self.stub.CreateEMControlContact(EMControlContactRequest(emct=1, cconly=0, ctype=self.contacttype, dtype=0)) + logging.info("EM Contact Created...")
+ + +
[docs]class EMRandlesLayer(Enum): +
[docs] DEFAULT = 0
+
[docs] CURRENT_COLLECTOR_POSITIVE = 1
+
[docs] POSITIVE_ELECTRODE = 2
+
[docs] SEPARATOR = 3
+
[docs] NEGATIVE_ELECTRODE = 4
+
[docs] CURRENT_COLLECTOR_NEGATIVE = 5
+ + +
[docs]class Isopotential: + """Defines an isopotential. + + This method constrain nodes so that they have the same scalar potential value. + + Parameters + ---------- + set : Set + Segment set or node set. + """ + +
[docs] isopotlist = []
+ + def __init__(self, set=None, layer=EMRandlesLayer.DEFAULT): + self.stub = DynaBase.get_stub() + self.set = set + self.id = 0 + self.rdltype = layer.value + +
[docs] def create(self): + """Create an isopotential.""" + if self.set.type == "NODESETBOX": + isoinfo = [self.set.type, self.set.boxes] + else: + isoinfo = [self.set.type, self.set.nodes] + if isoinfo in Isopotential.isopotlist: + pass + id, settype = 0, 1 + if self.set is not None: + id = self.set.create(self.stub) + type = self.set.type + if type == "NODESET" or type == "NODESETBOX": + settype = 2 + elif type == "SEGMENTSET": + settype = 1 + ret = self.stub.CreateEMIsopotential(EMIsopotentialRequest(settype=settype, setid=id, rdltype=self.rdltype)) + self.id = ret.id + logging.info(f"EM Isopotential {self.id} Created...") + return self.id
+ + +
[docs]class RogoCoil: + """Measures the total current flowing through a given section of the conductor. + + Parameters + ---------- + set : Set + Segment set. + """ + + def __init__(self, set=None): + self.stub = DynaBase.get_stub() + self.set = set + self.id = 0 + +
[docs] def create(self): + """Create a Rogowsky coil.""" + id, settype = 0, 1 + if self.set is not None: + id = self.set.create(self.stub) + type = self.set.type + if type != "SEGMENTSET": + return self.id + ret = self.stub.CreateEMIsopotentialRogo(EMIsopotentialRogoRequest(settype=1, setid=id)) + self.id = ret.id + logging.info(f"EM Isopotential Rogo {self.id} Created...") + return self.id
+ + +
[docs]class RandlesCellType(Enum): +
[docs] USER_DEFINED_EQUIVALENT_CIRCUIT_MODEL = -1
+
[docs] RANDLES_CELL_0_ORDER = 0
+
[docs] RANDLES_CELL_1_ORDER = 1
+
[docs] RANDLES_CELL_2_ORDER = 2
+
[docs] RANDLES_CELL_3_ORDER = 3
+ + +
[docs]class RandlesCell: + """Define parameters for a Randles Cell.""" + + def __init__(self, set=None): + self.stub = DynaBase.get_stub() + self.define_batmac = False + +
[docs] def set_batmac_model( + self, + cell_type=RandlesCellType.RANDLES_CELL_1_ORDER, + cell_parts=None, + area=2, + cell_capacity=0, + soc_conversion_factor=0, + charge_init_state=0, + circuit_parameter=None, + constant_temperature=0, + temperature_from_thermal_solver=False, + add_heating_to_thermal_solver=False, + ): + """define the distributed Randles circuit parameters for a Randles cell when using the batmac model.""" + self.define_batmac = True + self.rdltype = cell_type.value + self.rdlarea = area + self.psid = cell_parts + self.q = cell_capacity + self.cq = soc_conversion_factor + self.socinit = charge_init_state + self.prm = circuit_parameter + self.temp = constant_temperature + self.frther = temperature_from_thermal_solver + self.r0toth = add_heating_to_thermal_solver
+ +
[docs] def create(self): + """Set parameter for Randles Cell.""" + if self.define_batmac: + sid = 0 + if self.psid is not None: + sid = self.psid.create(self.stub) + ret = self.stub.CreateEMRandlesBatmac( + EMRandlesBatmacRequest( + rdltype=self.rdltype, + rdlarea=self.rdlarea, + psid=sid, + q=self.q, + cq=self.cq, + socinit=self.socinit, + chargedirparam=self.prm, + temp=self.temp, + frther=self.frther, + r0toth=self.r0toth, + ) + ) + self.id = ret.rdlid + logging.info(f"EM Randles Batmac {self.id} Created...")
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynaicfd.html b/version/0.3/_modules/ansys/dyna/core/pre/dynaicfd.html new file mode 100644 index 000000000..ff21adf1e --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynaicfd.html @@ -0,0 +1,1326 @@ + + + + + + + + + + ansys.dyna.core.pre.dynaicfd — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynaicfd

+"""
+ICFD API
+========
+
+Module for creating an ICFD (incompressible computational fluid dynamics) DYNA input deck.
+"""
+
+import logging
+
+from .dynabase import *  # noqa : F403
+
+
+
[docs]class DynaICFD(DynaBase): + """Contains methods for create a keyword related to an ICFD analysis.""" + + def __init__(self): + DynaBase.__init__(self) + self.create_section_icfd(1) + self.timestep = 0 + self.termination = 1e28 + +
[docs] def set_termination(self, termination_time): + """Set the total time of the simulation for the fluid problem. + + Parameters + ---------- + termination_time : float + Total time of the simulation for the fluid problem. + """ + self.termination = termination_time
+ +
[docs] def create_control_general(self, atype=0, mtype=0, dvcl=0, rdvcl=0): + """Specify the type of CFD analysis. + + Parameters + ---------- + atype : int, optional + Analysis type. The default is ``0``. + mtype : int, optional + Solving method type. The default is ``0``. + dvcl : int, optional + Flag for divergence cleaning. The default is ``0``. + rdvcl : int, optional + Flag for remeshing divergence cleaning. The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.ICFDCreateControlGeneral( + ICFDControlGeneralRequest(atype=atype, mtype=mtype, dvcl=dvcl, rdvcl=rdvcl) + ) + logging.info("ICFD control general Created...") + return ret
+ +
[docs] def create_control_output(self, msgl): + """Modify default values for screen and file outputs related to the fluid solver only. + + Parameters + ---------- + msgl : int + Message level. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.ICFDCreateControlOutput(ICFDControlOutputRequest(msgl=msgl)) + logging.info("ICFD control output Created...") + return ret
+ +
[docs] def create_control_turbulence(self, tmod): + """Modify the default values for the turbulence model. + + Parameters + ---------- + tmod : int + Turbulence model to use. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.ICFDCreateControlTurbulence(ICFDControlTurbulenceRequest(tmod=tmod)) + logging.info("ICFD control turbulence Created...") + return ret
+ +
[docs] def create_control_dem_coupling(self, ctype=0, bt=0, dt=1e28, sf=1): + """Activate coupling between the ICFD and DEM solvers. + + Parameters + ---------- + ctype : int, optional + Coupling direction to the solver. The default is ``0``. + bt : float, optional + Birth time for the DEM coupling. The default is ``0``. + dt : float, optional + Death time for the DEM coupling. The default is ``1e28``. + sf : float, optional + Scale factor to apply to the force transmitted by the fluid to the structure. + The default is ``1``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.ICFDCreateControlDEMCoupling(ICFDControlDEMCouplingRequest(ctype=ctype, bt=bt, dt=dt, sf=sf)) + logging.info("ICFD control dem coupling Created...") + return ret
+ +
[docs] def create_section_icfd(self, sid): + """Define a section for the ICFD solver. + + Parameters + ---------- + sid : int + Section ID. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.ICFDCreateSection(ICFDSectionRequest(sid=sid)) + logging.info("ICFD Section Created...") + return ret
+ +
[docs] def create_part_icfd(self, pid, secid, mid): + """Define parts for the ICFD solver. + + Parameters + ---------- + pid : int + Part ID for fluid surfaces. + secid : int + Section ID defined with the ``\*ICFD_SECTION`` card. + mid : int + Material ID defined with the ``\*ICFD_MAT`` card. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.ICFDCreatePart(ICFDPartRequest(pid=pid, secid=secid, mid=mid)) + logging.info("ICFD part Created...") + return ret
+ +
[docs] def create_solver_tol_mmov(self, atol=1e-8, rtol=1e-8): + """Change the default tolerance values for the mesh movement algorithm. + + Parameters + ---------- + atol : float, optional + Absolute convergence criteria. The default is ``1e-8``. + rtol : float, optional + Relative convergence criteria. The default is ``1e-8``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.ICFDCreateSolverTolMMOV(ICFDSolverTolMMOVRequest(atol=atol, rtol=rtol)) + logging.info("tolerance values for the mesh movement algorithm changed...") + return ret
+ +
[docs] def set_initial(self, velocity=Velocity(0, 0, 0), temperature=0, pressure=0): + """Assign the initial condition to all nodes at once. + + Parameters + ---------- + velocity : Velocity, optional + Initial velocity. The default is ``(0, 0, 0)``, + temperature : float, optional + Initial temperature. The default is ``0``. + pressure : float, optional + Initial pressure. The default is ``0``. + + """ + ret = self.stub.ICFDCreateInit( + ICFDInitRequest(pid=0, vx=velocity.x, vy=velocity.y, vz=velocity.z, t=temperature, p=pressure) + ) + logging.info("ICFD_INIT Created...") + return ret
+ +
[docs] def set_imposed_move(self, vx=None, vy=None, vz=None): + """Impose a velocity on the whole volume mesh. + + Parameters + ---------- + vx : + vy : + + """ + lcvx, lcvy, lcvz = 0, 0, 0 + if vx != None: + vx.create(self.stub) + lcvx = vx.id + if vy != None: + vy.create(self.stub) + lcvy = vy.id + if vz != None: + vz.create(self.stub) + lcvz = vz.id + ret = self.stub.ICFDCreateControlImposedMove( + ICFDControlImposedMoveRequest(pid=0, lcvx=lcvx, lcvy=lcvy, lcvz=lcvz) + ) + return ret
+ +
[docs] def save_file(self): + """Save keyword files.""" + self.create_section_icfd(1) + DynaBase.save_file(self)
+ + +
[docs]class ICFD_SurfRemeshMethod(Enum): +
[docs] LAPLACIAN_SMOOTHING = 1
+
[docs] CURVATURE_PRESERVING = 2
+ + +
[docs]class ICFD_AnalysisType(Enum): +
[docs] TURNOFF_ICFD_SOLVER = -1
+
[docs] TRANSIENT_ANALYSIS = 0
+
[docs] STEADY_STATE_ANALYSIS = 1
+ + +
[docs]class ICFD_MessageLevel(Enum): +
[docs] TIMESTEP_INFORMATION = 0
+
[docs] FULL_OUTPUT_INFORMATION = 4
+ + +
[docs]class ICFD_CouplingForm(Enum): +
[docs] FORCE_BASED_ON_VELOCITY_DRAG_VALUE = 0
+
[docs] FORCE_USING_FLUID_PRESSURE_GRADIENT = 1
+ + +
[docs]class ICFD_CouplingDirection(Enum): +
[docs] TWO_WAY_COUPLING = 0
+
[docs] ONE_WAY_COUPLING_MECHANICS_TRANS_DISPLACEMENT_TO_FLUID = 1
+
[docs] ONE_WAY_COUPLING_FLUID_TRANS_STRESS_TO_SOLID = 2
+
[docs] TWO_WAY_WEAK_COUPLING = 3
+ + +
[docs]class ICFDAnalysis: + """Activates an ICFD analysis and defines associated control parameters.""" + + def __init__(self): + self.defined_timestep = False + self.defined_volumemesh = False + self.defined_surfmesh = False + self.defined_type = False + self.defined_output = False + self.defined_fsi = False + self.defined_steady_state = False + self.defined_coupling_dem = False + self.defined_mesh_adapt = False + self.stub = DynaBase.get_stub() + +
[docs] def set_type(self, analysis_type=ICFD_AnalysisType.TRANSIENT_ANALYSIS): + """Set the type of the CFD analysis. + + Parameters + ---------- + analysis_type : ICFD_AnalysisType + Analysis type. The default is ``TRANSIENT_ANALYSIS``. + """ + self.defined_type = True + self.atype = analysis_type.value
+ +
[docs] def set_output(self, messagelevel=ICFD_MessageLevel.TIMESTEP_INFORMATION, iteration_interval=0): + """Modify default values for screen and file outputs related to the fluid solver only. + + Parameters + ---------- + messagelevel : ICFD_MessageLevel, optional + Message level. The default is ``TIMESTEP_INFORMATION``. + iteration_interval : int, optional + Iteration interval to print the output at. The default is ``0``. + """ + self.defined_output = True + self.msgl = messagelevel.value + self.itout = iteration_interval
+ +
[docs] def set_fsi(self, couplingdir=ICFD_CouplingDirection.TWO_WAY_COUPLING): + """Modify default values for the fluid-structure interaction coupling algorithm. + + Parameters + ---------- + couplingdir : ICFD_CouplingDirection, optional + Coupling direction to the solver. The default is ``TWO_WAY_COUPLING``. + """ + self.defined_fsi = True + self.owc = couplingdir.value
+ +
[docs] def set_steady_state( + self, + max_iteration=1e6, + momentum_tol_limit=1e-3, + pressure_tol_limit=1e-3, + temperature_tol_limit=1e-3, + velocity_relax_param=0.3, + pressure_relax_param=0.7, + ): + """Set convergence options for the steady state solver. + + Parameters + ---------- + max_iteration : int, optional + Maximum number of iterations to reach convergence. The default is + ``1000000.0``. + momentum_tol_limit : float, optional + Tolerance limits for the momentum equations. The default is ``0.001``. + pressure_tol_limit : float, optional + Tolerance limits for the pressure equations. The default is ``0.001``. + temperature_tol_limit : float, optional + Tolerance limits for the temperature equations. The default is ``0.001``. + velocity_relax_param : float, optional + Relaxation parameters for the velocity. The default is ``0.3``. + pressure_relax_param : float, optional + Relaxation parameters for the pressure. The default is ``0.7``. + """ + self.defined_steady_state = True + self.its = max_iteration + self.tol1 = momentum_tol_limit + self.tol2 = pressure_tol_limit + self.tol3 = temperature_tol_limit + self.rel1 = velocity_relax_param + self.rel2 = pressure_relax_param
+ +
[docs] def set_timestep(self, timestep=0): + """Set the time step for the fluid problem. + + Parameters + ---------- + dt : float, optional + Time step for the fluid problem. The default is ``0``. + """ + self.defined_timestep = True + self.timestep = timestep
+ +
[docs] def set_volume_mesh(self, mesh_growth_scale_factor=1.41): + """Modify the default value for automatic volume mesh generation. + + Parameters + ---------- + mesh_growth_scale_factor : float, optional + Maximum mesh size that the volume mesher is allowed to use when generating + the volume mesh. The default is ``1.41``. + """ + self.defined_volumemesh = True + self.mgsf = mesh_growth_scale_factor
+ +
[docs] def set_mesh_adaptivity(self, min_mesh_size=0, max_mesh_size=0, max_perceptual_error=0, num_iteration=0): + """Activate the adaptive mesh refinement feature. + + Parameters + ---------- + min_mesh_size : float, optional + Minimum mesh size for the mesh generator. The default is ``0``. + max_mesh_size : float, optional + Maximum mesh size. The default is ``0``. + max_perceptual_error : float, optional + Maximum perceptual error allowed in the whole domain. The default + is ``0``. + num_iteration : int, optional + Number of iterations before a forced remeshing. The default is + ``0``. + """ + self.defined_mesh_adapt = True + self.minh = min_mesh_size + self.maxh = max_mesh_size + self.err = max_perceptual_error + self.nit = num_iteration
+ +
[docs] def set_surface_mesh(self, remesh_method=ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING): + """Enable automatic surface remeshing. + + Parameters + ---------- + remesh_method : ICFD_SurfRemeshMethod, optional + Whether to perform a surface remeshing. The default is ``LAPLACIAN_SMOOTHING``. + """ + self.defined_surfmesh = True + self.rsrf = remesh_method.value
+ +
[docs] def set_coupling_dem( + self, + coupling_type=0, + birth_time=0, + death_time=1e28, + scale_factor=1, + formulation=ICFD_CouplingForm.FORCE_BASED_ON_VELOCITY_DRAG_VALUE, + ): + """Activate coupling between the ICFD and DEM solvers. + + Parameters + ---------- + coupling_type : int, optional + Coupling direction to the solver. The default is ``0``. + birth_time : float, optional + Birth time for the DEM coupling. The default is ``0``. + death_time : float, optional + Death time for the DEM coupling. The default is ``1e+28``. + scale_factor : float, optional + Scale factor applied to the force transmitted by the fluid to + the structure. The default is ``1``. + formulation : int, optional + Type of formulation to use in the coupling. The default is + ``FORCE_BASED_ON_VELOCITY_DRAG_VALUE``. + """ + self.defined_coupling_dem = True + self.ctype = coupling_type + self.bt = birth_time + self.dt = death_time + self.sf = scale_factor + self.form = formulation.value
+ +
[docs] def create(self): + """Create ICFD analysis.""" + if self.defined_timestep: + self.stub.ICFDCreateControlTime(ICFDControlTimeRequest(tim=DynaSolution.termination_time, dt=self.timestep)) + if self.defined_volumemesh: + self.stub.ICFDCreateControlMesh(ICFDControlMeshRequest(mgsf=self.mgsf)) + if self.defined_surfmesh: + self.stub.ICFDCreateControlSurfMesh(ICFDControlSurfMeshRequest(rsrf=self.rsrf)) + if self.defined_type: + self.stub.ICFDCreateControlGeneral(ICFDControlGeneralRequest(atype=self.atype, mtype=0, dvcl=0, rdvcl=0)) + if self.defined_output: + self.stub.ICFDCreateControlOutput(ICFDControlOutputRequest(msgl=self.msgl, itout=self.itout)) + if self.defined_fsi: + self.stub.ICFDCreateControlFSI(ICFDControlFSIRequest(owc=self.owc)) + if self.defined_steady_state: + self.stub.ICFDCreateControlSteady( + ICFDControlSteadyRequest( + its=self.its, tol1=self.tol1, tol2=self.tol2, tol3=self.tol3, rel1=self.rel1, rel2=self.rel2 + ) + ) + if self.defined_coupling_dem: + self.stub.ICFDCreateControlDEMCoupling( + ICFDControlDEMCouplingRequest(ctype=self.ctype, bt=self.bt, dt=self.dt, sf=self.sf, form=self.form) + ) + if self.defined_mesh_adapt: + self.stub.ICFDCreateControlAdapt( + ICFDControlAdaptRequest(minh=self.minh, maxh=self.maxh, err=self.err, nit=self.nit) + )
+ + +
[docs]class Compressible(Enum): +
[docs] VACUUM = 0
+
[docs] FULLY_INCOMPRESSIBLE_FLUID = 1
+ + +
[docs]class MatICFD: + """Defines physical properties for the fluid material. + + Parameters + ---------- + flag : int + Flag for chooseing between fully incompressible, slightly compressible, or barotropic flows. + The default is ``FULLY_INCOMPRESSIBLE_FLUID``. Options are: + + - EQ.0: Vacuum (free surface problems only) + - EQ.1: Fully incompressible fluid + + flow_density : float, optional + Flow density. The default is ``0``. + dynamic_viscosity : float, optional + Dynamic viscosity. The default is ``0``. + heat_capacity : + thermal_conductivity : + thremal_expansion_coefficent : + """ + + def __init__( + self, + flag=Compressible.FULLY_INCOMPRESSIBLE_FLUID, + flow_density=0, + dynamic_viscosity=0, + heat_capacity=0, + thermal_conductivity=0, + thermal_expansion_coefficient=0, + ): + self.stub = DynaBase.get_stub() + self.flag = flag.value + self.flow_density = flow_density + self.dynamic_viscosity = dynamic_viscosity + self.hc = heat_capacity + self.tc = thermal_conductivity + self.beta = thermal_expansion_coefficient + +
[docs] def create(self, stub): + """Create an ICFD material.""" + ret = self.stub.ICFDCreateMat( + ICFDMatRequest( + flg=self.flag, ro=self.flow_density, vis=self.dynamic_viscosity, hc=self.hc, tc=self.tc, beta=self.beta + ) + ) + self.material_id = ret.id + logging.info(f"ICFD material {self.material_id} Created...")
+ + +
[docs]class ICFDDOF(Enum): +
[docs] X = 1
+
[docs] Y = 2
+
[docs] Z = 3
+ + +
[docs]class Vel(Enum): +
[docs] LINEAR_VELOCITY = 1
+
[docs] ANGULAR_VELOCITY = 2
+ + +
[docs]class ICFDPart: + """Defines a part for the ICFD solver.""" + + def __init__(self, id): + self.stub = DynaBase.get_stub() + self.type = "ICFD" + self.id = id + self.secid = 1 + self.mid = 0 + +
[docs] def set_material(self, mat): + """Set a material.""" + mat.create(self.stub) + self.mid = mat.material_id
+ +
[docs] def set_prescribed_velocity(self, motion, dof=ICFDDOF.X, velocity_flag=Vel.LINEAR_VELOCITY): + """Impose the fluid velocity on the boundary. + + Parameters + ---------- + dof : int, optional + Applicable degrees of freedom. The default is ``ICFDDOF.X``. + Options are: + + - EQ.1: x-degree of freedom + - EQ.2: y-degree of freedom + - EQ.3: z-degree of freedom + - EQ.4: Normal direction degree of freedom + + velocity_flag : int, optional + Velocity flag. The default is ``LINEAR_VELOCITY``. Options are: + + - EQ.1: Linear velocity + - EQ.2: Angular velocity + - EQ.3: Parabolic velocity profile + - EQ.4: Activates synthetic turbulent field on part + + """ + motion.create(self.stub) + lcid = motion.id + ret = self.stub.ICFDCreateBdyPrescribedVel( + ICFDBdyPrescribedVelRequest(pid=self.id, dof=dof.value, vad=velocity_flag.value, lcid=lcid) + ) + logging.info("ICFD boundary prescribed velocity Created...")
+ +
[docs] def set_prescribed_pressure(self, pressure): + """Impose a fluid pressure on the boundary. + + Parameters + ---------- + pressure : Curve + Load curve to describe the pressure value versus time. + """ + pressure.create(self.stub) + lcid = pressure.id + ret = self.stub.ICFDCreateBdyPrescribedPre(ICFDBdyPrescribedPreRequest(pid=self.id, lcid=lcid)) + logging.info("ICFD boundary prescribed pressure Created...") + return ret
+ +
[docs] def set_prescribed_temperature(self, temperature): + """Impose a fluid temperature on the boundary. + + Parameters + ---------- + temperature : Curve + Load curve to describe the temperature value versus time. + """ + temperature.create(self.stub) + lcid = temperature.id + ret = self.stub.ICFDCreateBdyPrescribedTemp(ICFDBdyPrescribedTempRequest(pid=self.id, lcid=lcid)) + logging.info("ICFD boundary prescribed temperature Created...") + return ret
+ +
[docs] def set_free_slip(self): + """Specify the fluid boundary with a free-slip boundary condition.""" + ret = self.stub.ICFDCreateBdyFreeSlip(ICFDBdyFreeSlipRequest(pid=self.id)) + logging.info("ICFD boundary freeslip Created...") + return ret
+ +
[docs] def set_non_slip(self): + """Specify the fluid boundary with a non-slip boundary condition.""" + ret = self.stub.ICFDCreateBdyNonSlip(ICFDBdyNonSlipRequest(pid=self.id)) + logging.info("ICFD boundary nonslip Created...") + return ret
+ +
[docs] def set_fsi(self): + """Define the fluid surface to consider in contact with the solid surfaces + for fluid-structure interaction (FSI) analysis.""" + ret = self.stub.ICFDCreateBdyFSI(ICFDBdyFSIRequest(pid=self.id)) + logging.info("ICFD boundary FSI Created...") + return ret
+ +
[docs] def compute_drag_force(self): + """Enable the computation of drag forces over given surface parts of the model.""" + ret = self.stub.ICFDCreateDBDrag(ICFDDBDragRequest(pid=self.id)) + logging.info("ICFD database drag Created...") + return ret
+ +
[docs] def compute_flux(self): + """Enable the computation of the flow rate and average pressure over given parts of the model.""" + ret = self.stub.ICFDCreateDBFlux(ICFDDBFluxRequest(pid=self.id)) + logging.info("ICFD database flux Created...") + return ret
+ +
[docs] def compute_temperature(self): + """Enable the computation of the average temperature and the heat flux over given parts of the model.""" + ret = self.stub.ICFDCreateDBTemp(ICFDDBTempRequest(pid=self.id)) + logging.info("ICFD database temperature Created...") + return ret
+ +
[docs] def set_boundary_layer(self, number=3): + """Define a boundary layer mesh as a refinement on the volume mesh. + + Parameters + ---------- + number : int, optional + Number of elements normal to the surface (in the boundary layer). + The default is ``3.`` + """ + ret = self.stub.MESHCreateBl(MeshBlRequest(pid=self.id, nelth=number - 1)) + logging.info("MESH boundary-layer Created...") + return ret
+ +
[docs] def set_boundary_layer_symmetry_condition(self): + """Specify the part that is to have symmetry conditions for the boundary layer.""" + ret = self.stub.MESHCreateBlSym(MeshBlSymRequest(pid=self.id)) + return ret
+ +
[docs] def set_imposed_move(self, vx=None, vy=None, vz=None): + """Impose a velocity on a specific ICFD part. + + Parameters + ---------- + vx : + vy : + vz : + + """ + lcvx, lcvy, lcvz = 0, 0, 0 + if vx != None: + vx.create(self.stub) + lcvx = vx.id + if vy != None: + vy.create(self.stub) + lcvy = vy.id + if vz != None: + vz.create(self.stub) + lcvz = vz.id + ret = self.stub.ICFDCreateControlImposedMove( + ICFDControlImposedMoveRequest(pid=self.id, lcvx=lcvx, lcvy=lcvy, lcvz=lcvz) + ) + return ret
+ +
[docs] def set_property(self): + """Set properties for an ICFD part.""" + secid = 1 + self.stub.SetICFDPartProperty(ICFDPartPropertyRequest(pid=self.id, secid=secid, mid=self.mid))
+ + +
[docs]class ICFDVolumePart: + """Assigns material properties to the nodes enclosed by surface ICFD parts. + + Parameters + ---------- + surfaces : list + List of part IDs for the surface elements that define the volume mesh. + """ + + def __init__(self, surfaces): + self.stub = DynaBase.get_stub() + self.type = "ICFDVOLUME" + self.id = id + self.secid = 1 + self.mid = 0 + self.surfaces = surfaces + self.defined_imposed_move = False + +
[docs] def set_material(self, mat): + """Set a material.""" + self.mid = mat.material_id
+ +
[docs] def set_imposed_move(self, vx=None, vy=None, vz=None): + """Impose a velocity on a specific ICFD part. + + Parameters + ---------- + vx : + vy : + vz : + + """ + self.defined_imposed_move = True + self.vx = vx + self.vy = vy + self.vz = vz
+ +
[docs] def create(self): + """Create an ICFD volume part.""" + ret = self.stub.ICFDCreatePartVol(ICFDPartVolRequest(secid=1, mid=self.mid, spids=self.surfaces)) + self.id = ret.id + if self.defined_imposed_move: + lcvx, lcvy, lcvz = 0, 0, 0 + if self.vx != None: + self.vx.create(self.stub) + lcvx = self.vx.id + if self.vy != None: + self.vy.create(self.stub) + lcvy = self.vy.id + if self.vz != None: + self.vz.create(self.stub) + lcvz = self.vz.id + ret = self.stub.ICFDCreateControlImposedMove( + ICFDControlImposedMoveRequest(pid=self.id, lcvx=lcvx, lcvy=lcvy, lcvz=lcvz) + ) + logging.info(f"ICFD part volume {self.id} Created...") + return ret
+ + +
[docs]class MeshedVolume: + """Defines the volume space to mesh. + + Parameters + ---------- + surfaces : list + List of part IDs for the surface elements to use to define the volume. + """ + + def __init__(self, surfaces): + self.surfaces = surfaces + self.stub = DynaBase.get_stub() + self.meshsizeshape = [] + self.embeded_surf = [] + self.meshsize_surf = [] + self.fluid_interfaces = [] + +
[docs] def embed_shell(self, embeded): + """Define surfaces that the mesher is to embed inside the volume mesh. + + Parameters + ---------- + embeded : list + List of part IDs for the surface elements. + """ + self.embeded_surf = embeded
+ +
[docs] def meshsize_box(self, size, min_point, max_point): + """Define a local mesh size in specific zones corresponding to given geometrical shapes. + + Parameters + ---------- + size : float + Mesh size to apply in the zone of the shape defined by ``SNAME``. + parameter : list + List of the parameters that define the shape. + """ + parameter = [min_point.x, min_point.y, min_point.z, max_point.x, max_point.y, max_point.z] + self.meshsizeshape.append(["BOX", size, parameter])
+ +
[docs] def set_meshsize(self, surfaces): + """Define the surfaces that the mesher is to use to specify a local mesh size inside the volume. + + Parameters + ---------- + surfaces : list + List of part IDs for the surface elements. + """ + self.meshsize_surf = surfaces
+ +
[docs] def set_fluid_interfaces(self, surfaces): + """Define the surfaces that the mesher is to use to specify fluid interfaces in multi-fluid simulations. + + Parameters + ---------- + surfaces : list + List of part IDs for the surface elements. + """ + self.fluid_interfaces = surfaces
+ +
[docs] def create(self): + """Create mesh volume.""" + ret = self.stub.MESHCreateVolume(MeshVolumeRequest(pids=self.surfaces)) + self.id = ret.id + logging.info(f"MESH volume {self.id} Created...") + if len(self.embeded_surf) > 0: + self.stub.MESHCreateEmbedShell(MeshEmbedShellRequest(volid=self.id, pids=self.embeded_surf)) + logging.info("Embed surfaces Created...") + if len(self.meshsize_surf) > 0: + self.stub.MESHCreateSize(MeshSizeRequest(volid=self.id, pids=self.meshsize_surf)) + logging.info("Mesh size surfaces Created...") + if len(self.fluid_interfaces) > 0: + self.stub.MESHCreateInterf(MeshInterfRequest(volid=self.id, pids=self.fluid_interfaces)) + logging.info("Mesh fluid interfaces Created...") + for i in range(len(self.meshsizeshape)): + self.stub.MESHCreateSizeShape( + MeshSizeShapeRequest( + sname=self.meshsizeshape[i][0], + force=1, + method=0, + msize=self.meshsizeshape[i][1], + parameter=self.meshsizeshape[i][2], + ) + ) + logging.info("MESH size shape Created...")
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynaiga.html b/version/0.3/_modules/ansys/dyna/core/pre/dynaiga.html new file mode 100644 index 000000000..74d2add5b --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynaiga.html @@ -0,0 +1,561 @@ + + + + + + + + + + ansys.dyna.core.pre.dynaiga — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynaiga

+"""
+IGA API
+==========
+
+Module for creating an IGA DYNA input deck.
+"""
+
+import logging
+
+from .dynabase import *  # noqa : F403
+
+
+
[docs]class DynaIGA(DynaBase): + """Contains methods for creating a keyword related to IGA.""" + + def __init__(self): + DynaBase.__init__(self) + self.casetype = CaseType.IGA + +
[docs] def create_section_igashell(self, secid, elform, shrf, thickness): + """Define section properties for isogeometric shell elements. + + Parameters + ---------- + secid : int + Section ID. ``SECID`` is referenced on the ``\*PART`` card. + A unique number or label must be specified. + elform : int + Element formulation. + shrf : float + Shear correction factor, which scales the transverse shear stress. + thickness : float + Shell thickness. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateSectionIGAShell( + SectionIGAShellRequest(secid=secid, elform=elform, shrf=shrf, thickness=thickness) + ) + logging.info("Section IGAShell 1 Created...") + return ret
+ +
[docs] def save_file(self): + """Save keyword files. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + DynaBase.save_file(self) + self.create_control_contact(rwpnal=1.0, ignore=1, igactc=1)
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynaisph.html b/version/0.3/_modules/ansys/dyna/core/pre/dynaisph.html new file mode 100644 index 000000000..7c032c6d9 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynaisph.html @@ -0,0 +1,907 @@ + + + + + + + + + + ansys.dyna.core.pre.dynaisph — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynaisph

+"""
+ISPH API
+==========
+
+Module for creating an ISPH (incompressible smooth particle hydrodynamics) DYNA input deck.
+"""
+
+import logging
+
+from .dynabase import *  # noqa : F403
+
+
+
[docs]class DynaISPH(DynaBase): + """Contains methods for creating a keyword related to ISPH.""" + + def __init__(self): + DynaBase.__init__(self) + self.isphanalysis = ISPHAnalysis() + +
[docs] def set_des( + self, + num_timestep=1, + boxid=0, + space_dimension=3, + neighbors=150, + approximation_theory=0, + max_velocty=1e15, + ): + """Provide controls related to ISPH. + + Parameters + ---------- + num_timestep : int, optional + Number of time steps between particle sorting. The default + is ``1``. + boxid : int, optional + Box ID. The default is ``0``. ISPH approximations are computed + inside the specified box. When a particle has gone outside this + box, it is deactivated. + space_dimension : int, optional + Space dimension for ISPH particles. The default is ``3``. Options + are: + + - EQ.3: 3D problems + - EQ.2: 2D plane strain problems + - EQ.-2: 2D axisymmetric problems + + neighbors : int, optional + Initial number of neighbors per particle. The default is ``150``. + approximation_theory : int, optional + Particle approximation theory. The default is ``0``. + max_velocty : float, optional + Maximum value for velocity for the ISPH particles. The default + is ``1000000000000000.0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateControlSPH( + CreateControlSPHRequest( + ncbs=num_timestep, + boxid=boxid, + idim=space_dimension, + nmneigh=neighbors, + form=approximation_theory, + maxv=max_velocty, + ) + ) + logging.info("Control SPH Created...") + return ret
+ +
[docs] def save_file(self): + """Save keyword files. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.isphanalysis.create() + DynaBase.save_file(self)
+ + +
[docs]class ISPHAnalysis: + """Provide controls related to ISPH.""" + + def __init__(self, num_timestep=1): + self.stub = DynaBase.get_stub() + self.num_timestep = num_timestep + self.box = None + self.space_dimension = 3 + self.neighbors = 150 + self.approximation_theory = 13 + self.particle_deactivation = 1e15 + self.velocity_scaling = 0 + +
[docs] def set_num_timestep(self, num_timestep): + """Set the number of time steps between particle sorting. + + Parameters + ---------- + num_timestep : int, optional + Number of time steps between particle sorting. The default + is ``1``. + """ + self.num_timestep = num_timestep
+ +
[docs] def set_box(self, box): + """Set the box. ISPH approximations are computed inside a specified box. + + Parameters + ---------- + box : Box + Box for computing ISHPH approximattions. When a particle has gone + outside this box, it is deactivated. + """ + self.box = box
+ +
[docs] def set_neighbors(self, neighbors): + """Set the initial number of neighbors per particle. + + Parameters + ---------- + neighbors : int, optional + Initial number of neighbors per particle. + """ + self.neighbors = neighbors
+ +
[docs] def set_particle_deactivation(self, deactivation): + """Set the type of BEM matrices and the way they are assembled. + + Parameters + ---------- + deactivation : + """ + self.particle_deactivation = deactivation
+ +
[docs] def set_velocity_scaling(self, scaling): + """Set the type of BEM matrices and the way they are assembled. + + Parameters + ---------- + scaling : + """ + self.velocity_scaling = scaling
+ +
[docs] def create(self): + """Create an ISPH analysis.""" + if self.box == None: + boxid = 0 + else: + boxid = self.box.create(self.stub) + if self.velocity_scaling != 0: + maxv = -self.velocity_scaling + else: + maxv = self.particle_deactivation + ret = self.stub.CreateControlSPH( + ControlSPHRequest( + ncbs=self.num_timestep, + boxid=boxid, + idim=self.space_dimension, + nmneigh=self.neighbors, + form=self.approximation_theory, + maxv=maxv, + ) + ) + logging.info("Control SPH Created...")
+ + +
[docs]class SPHSection: + """Defines section properties for ISPH particles. + + Parameters + ---------- + cslh : float, optional + hmin : float, optional + hmax : float, optional + sphini : int, optional + + """ + + def __init__(self, cslh=1.2, hmin=0.2, hmax=2.0, sphini=0): + stub = DynaBase.get_stub() + ret = stub.CreateSectionSPH(SectionSPHRequest(cslh=cslh, hmin=hmin, hmax=hmax, sphini=sphini)) + self.id = ret.id
+ + +
[docs]class MassflowPlane: + """Measures ISPH mass flow rate across a defined plane. + + Parameters + ---------- + particles : NodeSet, PartSet + Node set or part set specifying the ISPH particles to measure. + surface : PartSet + Part set ID or part ID defining the surface across which to measure the flow rate. + """ + + def __init__(self, particles, surface): + self.particles = particles + self.surface = surface + +
[docs] def create(self, stub): + """Create a mass flow plane.""" + self.particles.create(stub) + self.surface.create(stub) + pid = self.particles.id + sid = self.surface.id + if self.particles.type == "NODESET": + ptype = 0 + elif self.particles.type == "NODE": + ptype = 1 + elif self.particles.type == "PARTSET": + ptype = 2 + elif self.particles.type == "PART": + ptype = 3 + pid = self.particles.get_pid() + else: + print("invalid set type.") + if self.surface.type == "PARTSET": + stype = 0 + elif self.surface.type == "PART": + stype = 1 + sid = self.surface.get_pid() + stub.CreateDefineSPHMassflowPlane( + DefineSPHMassflowPlaneRequest(prtclsid=pid, surfsid=sid, ptype=ptype, stype=stype) + )
+ + +
[docs]class ISPHFluidPart(Part): + """Generates ISPH particles inside a box. + + Parameters + ---------- + pid : int + Part ID. + minpoint : Point + Minimum x,y,z-coordinate. + length : Point + Box length in the x,y,z-direction. + numdirx : int + Number of ISPH particles in the x-direction. + numdiry : int + Number of ISPH particles in the y-direction. + numdirz : int + Number of ISPH particles in the z-direction. + """ + + def __init__(self, pid, minpoint, length, numdirx, numdiry, numdirz): + Part.__init__(self, pid) + self.stub = DynaBase.get_stub() + self.type = "ISPHFLUID" + self.minpoint = minpoint + self.length = length + self.numdirx = numdirx + self.numdiry = numdiry + self.numdirz = numdirz + # section + self.cslh = 1.2 + self.hmin = 0.2 + self.hmax = 2.0 + self.sphini = 0 + # massflow plane + self.massflowplane = None + +
[docs] def set_smoothing_length(self, initial, min, max, optional): + """Calculate the smoothing length of the particles. + + Parameters + ---------- + initial : float + Constant for calculating the initial smoothing length of the particles. + min : float + Scale factor for the minimum smoothing length. + max : float + Scale factor for the maximum smoothing length. + optional : float, optional + Initial smoothing length, which overrides the true smoothing length. + """ + self.cslh = initial + self.hmin = min + self.hmax = max + self.sphini = optional
+ +
[docs] def create_particles(self): + """Create ISPH particles inside the box.""" + coords = ( + self.minpoint.x, + self.minpoint.y, + self.minpoint.z, + self.length.x, + self.length.y, + self.length.z, + ) + numparticles = (self.numdirx, self.numdiry, self.numdirz) + self.stub.CreateDefineSPHMeshBox( + DefineSPHMeshBoxRequest(ipid=self.id, coords=coords, numparticles=numparticles) + )
+ +
[docs] def create_massflow_plane(self, surfaces): + """Measure ISPH mass flow rate across a defined plane.""" + self.massflowplane = MassflowPlane(PartSet([self.id]), surfaces)
+ +
[docs] def set_property(self): + """Set properties for an ISPH fluid part.""" + self.create_particles() + self.massflowplane.create(self.stub) + sec = SPHSection(cslh=self.cslh, hmin=self.hmin, hmax=self.hmax, sphini=self.sphini) + self.secid = sec.id + self.stub.SetPartProperty( + PartPropertyRequest( + pid=self.id, + secid=self.secid, + mid=self.mid, + eosid=self.eosid, + hgid=self.hgid, + grav=self.grav, + adpopt=self.adpopt, + tmid=self.tmid, + ) + )
+ + +
[docs]class ISPHStructPart(Part): + """Generates and places ISPH elements on the surface of triangular shell elements. + + Parameters + ---------- + pid : int + Part ID. + couple_partset : PartSet + Part or part set ID for the region of the mesh to place the ISPH elements on. + space : float + Maximum space between ISPH elements. + """ + + def __init__(self, pid, couple_partset, space): + Part.__init__(self, pid) + self.stub = DynaBase.get_stub() + self.type = "ISPHSTRUCT" + self.couple_partset = couple_partset + self.space = space + # section + self.cslh = 1.2 + self.hmin = 0.2 + self.hmax = 2.0 + self.sphini = 0 + +
[docs] def set_smoothing_length(self, initial, min, max, optional): + """Calculate the smoothing length of the particles. + + Parameters + ---------- + Parameters + ---------- + initial : float + Constant for calculating the initial smoothing length of the particles. + min : float + Scale factor for the minimum smoothing length. + max : float + Scale factor for the maximum smoothing length. + optional : float, optional + Initial smoothing length, which overrides the true smoothing length. + + """ + self.cslh = initial + self.hmin = min + self.hmax = max + self.sphini = optional
+ +
[docs] def create_particles(self): + """Create ISPH elements on the surface of triangular shell elements.""" + sid = self.couple_partset.create(self.stub) + if self.couple_partset.type == "PARTSET": + type = 0 + else: + type = 1 + sid = self.couple_partset.get_pid() + self.stub.CreateDefineSPHMeshSurface( + DefineSPHMeshSurfaceRequest(sid=sid, type=type, sphpid=self.id, space=self.space) + )
+ +
[docs] def set_property(self): + """Set properties for the ISPH structural part.""" + self.create_particles() + sec = SPHSection(cslh=self.cslh, hmin=self.hmin, hmax=self.hmax, sphini=self.sphini) + self.secid = sec.id + self.stub.SetPartProperty( + PartPropertyRequest( + pid=self.id, + secid=self.secid, + mid=self.mid, + eosid=self.eosid, + hgid=self.hgid, + grav=self.grav, + adpopt=self.adpopt, + tmid=self.tmid, + ) + )
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynalogging.html b/version/0.3/_modules/ansys/dyna/core/pre/dynalogging.html new file mode 100644 index 000000000..52d97ae52 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynalogging.html @@ -0,0 +1,1111 @@ + + + + + + + + + + ansys.dyna.core.pre.dynalogging — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynalogging

+"""Logging module supplying a general framework for logging in the PyDYNA
+``pre`` service.
+
+This module is built upon the `Python logging <https://docs.python.org/3/library/logging.html>`_
+module. It is not intended to replace this Python module but rather to provide a way
+for it and the PyDyna ``pre`` service to interact.
+
+The loggers used in this PyDyna logging mdoule include the name of the instance,
+which is intended to be unique. This name is printed in all the active
+outputs and is used to track the different instances of the PyDyNA ``pre``
+service.
+
+Global logger
+-------------
+The global logger, named ``pydyna_global``, is created at
+``ansys.dyna.core.__init__``.  If you want to use the global logger,
+you must call it at the top of your module:
+
+.. code:: python
+
+   from ansys.dyna.core.pre import LOG
+
+You can rename the global logger to avoid conflicts with other loggers (if any):
+
+.. code:: python
+
+   from ansys.dyna.core.pre import LOG as logger
+
+
+The default logging level of ``LOG`` is ``ERROR``. To change this to output
+lower-level messages, you can use this code:
+
+.. code:: python
+
+   LOG.logger.setLevel("DEBUG")
+   LOG.file_handler.setLevel("DEBUG")  # If present.
+   LOG.stdout_handler.setLevel("DEBUG")  # If present.
+
+
+Alternatively, you can set the logging level of ``LOG`` to ``DEBUG``
+with one line of code::
+
+.. code:: python
+
+   LOG.setLevel("DEBUG")
+
+Using the preceding line ensures that all the handlers are set to the input log level.
+
+By default, this logger does not log to a file. If you want to log to a file,
+you can add a file handler:
+
+.. code:: python
+
+   import os
+
+   file_path = os.path.join(os.getcwd(), "pydyna.log")
+   LOG.log_to_file(file_path)
+
+The preceding code sets the logger to also redirect to a file. If you want
+to change the characteristics of the global logger from the beginning
+of the execution, you must edit the ``__init__`` file in the
+``ansys.dyna.core.pre`` directory.
+
+To log using this logger, call the desired method as a normal logger.
+
+
+Instance loggers
+----------------
+Every time an instance of the :class:`Mapdl <ansys.mapdl.core.mapdl._MapdlCore>`
+class is created, a logger is created and stored in two places:
+
+* ``_MapdlCore._log``: For backward compatibility.
+* ``LOG._instances``: This field is a dictionary  where the key is the name
+  of the created logger.
+
+Instance loggers inheritate the ``pydyna_global`` output handlers and
+logging level unless otherwise specified. Instance loggers work in a
+similar way to the global logger. You can use the
+:func:`log_to_file() <PymapdlCustomAdapter.log_to_file>` method to add
+a file handler or the :func:`logger.Logging.setLevel` method to change
+the log level.
+
+Other loggers
+~~~~~~~~~~~~~
+You can create your own loggers using the Python ``logging`` module as
+you would do in any other script. No conflicts between these loggers exist.
+
+"""
+
+from copy import copy
+from datetime import datetime
+import logging
+import sys
+import weakref
+
+## Default configuration
+
[docs]LOG_LEVEL = logging.DEBUG
+
[docs]FILE_NAME = "pydyna.log"
+ +# For convenience +
[docs]DEBUG = logging.DEBUG
+
[docs]INFO = logging.INFO
+
[docs]WARN = logging.WARN
+
[docs]ERROR = logging.ERROR
+
[docs]CRITICAL = logging.CRITICAL
+ +## Formatting + +
[docs]STDOUT_MSG_FORMAT = "%(levelname)s - %(instance_name)s - %(module)s - %(funcName)s - %(message)s"
+ +
[docs]FILE_MSG_FORMAT = STDOUT_MSG_FORMAT
+ +
[docs]DEFAULT_STDOUT_HEADER = """ +LEVEL - INSTANCE NAME - MODULE - FUNCTION - MESSAGE +"""
+
[docs]DEFAULT_FILE_HEADER = DEFAULT_STDOUT_HEADER
+ +
[docs]NEW_SESSION_HEADER = f""" +=============================================================================== + NEW SESSION - {datetime.now().strftime("%m/%d/%Y, %H:%M:%S")} +==============================================================================="""
+ +
[docs]string_to_loglevel = { + "DEBUG": DEBUG, + "INFO": INFO, + "WARN": WARN, + "WARNING": WARN, + "ERROR": ERROR, + "CRITICAL": CRITICAL, +}
+ + +
[docs]class PymapdlCustomAdapter(logging.LoggerAdapter): + """Adapter for keeping the reference to an MAPDL instance name dynamic. + + Using the standard approach, extra parameters must be supplied + to the logger to indicate the MAPDL instance for which messages + must be logged. + + With this class, you only have to specify the MAPDL instance + that you are referring to once. + """ + +
[docs] level = None # This is maintained for compatibility with the ``supress_logging`` method, but it does nothing.
+
[docs] file_handler = None
+
[docs] stdout_handler = None
+ + def __init__(self, logger, extra=None): + self.logger = logger + if extra is not None: + self.extra = weakref.proxy(extra) + else: + self.extra = None + self.file_handler = logger.file_handler + self.std_out_handler = logger.std_out_handler + +
[docs] def process(self, msg, kwargs): + kwargs["extra"] = {} + # These are the extra parameters sent to the log + kwargs["extra"]["instance_name"] = self.extra.name # here self.extra is the argument passed to the log records. + return msg, kwargs
+ +
[docs] def log_to_file(self, filename=FILE_NAME, level=LOG_LEVEL): + """Add a file handler to the logger. + + Parameters + ---------- + filename : str, optional + Name of the file where logs are recorded. The default is ``FILE_NAME``. + level : str, optional + Level of logging. The default is ``LOG_LEVEL``, which causes all messages + to be recorded. For example, you can set the level of logging to ``DEBUG``. + """ + + self.logger = addfile_handler(self.logger, filename=filename, level=level, write_headers=True) + self.file_handler = self.logger.file_handler
+ +
[docs] def log_to_stdout(self, level=LOG_LEVEL): + """Add a standard output handler to the logger. + + Parameters + ---------- + level : str, optional + Level of logging record. The default is ``LOG_LEVEL``, which causes all messages + to be recorded. For example, you can set the level of logging to ``"DEBUG"``. + """ + if self.std_out_handler: + raise Exception("Stdout logger already defined.") + + self.logger = add_stdout_handler(self.logger, level=level) + self.std_out_handler = self.logger.std_out_handler
+ +
[docs] def setLevel(self, level="DEBUG"): + """Change the log level of the object and the attached handlers. + + Parameters + ---------- + level : str, optional + Level of logging record. The default is ``"DEBUG``. + + """ + self.logger.setLevel(level) + for each_handler in self.logger.handlers: + each_handler.setLevel(level) + self.level = level
+ + +
[docs]class PymapdlPercentStyle(logging.PercentStyle): + def __init__(self, fmt, *, defaults=None): + self._fmt = fmt or self.default_format + self._defaults = defaults + + def _format(self, record): + defaults = self._defaults + if defaults: + values = defaults | record.__dict__ + else: + values = record.__dict__ + + # You can do here any changes that you want in record, such as adding a key. + + # You could create an if here if you want conditional formatting, and even + # change the record.__dict__. + # Since we don't want to create conditional fields currently, it is fine to keep + # the same MSG_FORMAT for all of them. + + # For the case of logging exceptions to the logger. + values.setdefault("instance_name", "") + + return STDOUT_MSG_FORMAT % values
+ + +
[docs]class PymapdlFormatter(logging.Formatter): + """Provides a customized ``Formatter`` class for overwriting the default format styles.""" + + def __init__( + self, + fmt=STDOUT_MSG_FORMAT, + datefmt=None, + style="%", + validate=True, + defaults=None, + ): + if sys.version_info[1] < 8: + super().__init__(fmt, datefmt, style) + else: + # 3.8: The validate parameter was added + super().__init__(fmt, datefmt, style, validate) + self._style = PymapdlPercentStyle(fmt, defaults=defaults) # overwriting
+ + +
[docs]class InstanceFilter(logging.Filter): + """Ensures that the ``instance_name`` record always exists.""" + +
[docs] def filter(self, record): + if not hasattr(record, "instance_name"): + record.instance_name = "" + return True
+ + +
[docs]class Logger: + """Provides the logger used for each PyDyna ``pre`` session. + + This class allows you to add handlers to the logger to output to a file or + standard output. + + Parameters + ---------- + level : int, optional + Logging level to filter the message severity allowed in the logger. + The default is ``logging.DEBUG``. + to_file : bool, optional + Whether to write log messages to a file. The default is ``False``. + to_stdout : bool, optional + Whether to write log messages to the standard output. The default is + ``True``. + filename : str, optional + Name of the file to write log messages to if ``to_file=True``. The default + is ``FILE_NAME``. + + Examples + -------- + Demonstrate logger usage from an MAPDL instance mapdl. This logger is + automatically created when an MAPDL instance is created. + + >>> from ansys.mapdl.core import launch_mapdl + >>> mapdl = launch_mapdl(loglevel='DEBUG') + >>> mapdl._log.info('This is a useful message') + INFO - - <ipython-input-24-80df150fe31f> - <module> - This is LOG debug message. + + Import the global PYMAPDL logger and add a file output handler. + + >>> import os + >>> from ansys.mapdl.core import LOG + >>> file_path = os.path.join(os.getcwd(), 'pymapdl.log') + >>> LOG.log_to_file(file_path) + + """ + +
[docs] file_handler = None
+
[docs] std_out_handler = None
+ _level = logging.DEBUG + _instances = {} + + def __init__(self, level=logging.DEBUG, to_file=False, to_stdout=True, filename=FILE_NAME): + """Customized the logger for the PyDYNA ``pre`` service. + + Parameters + ---------- + level : str, optional + Level of logging as defined in the ``logging`` package. The default is ``DEBUG``. + to_file : bool, optional + Whether to record the logs in a file. The default is ``False``. + to_stdout : bool, optional + Whether to output the logs to the standard output, which is the + command line. The default is ``True``. + filename : str, optional + Name of the file where the logs are recorded if ``to_file=True``. The default + is ``FILE_NAME``, in which case they are recorded in the + ``'pymapdl.log'`` file. + """ + + # create default main logger + self.logger = logging.getLogger("pydyna_global") + self.logger.addFilter(InstanceFilter()) + self.logger.setLevel(level) + self.logger.propagate = True + self.level = self.logger.level # TODO: TO REMOVE + + # Writing logging methods. + self.debug = self.logger.debug + self.info = self.logger.info + self.warning = self.logger.warning + self.error = self.logger.error + self.critical = self.logger.critical + self.log = self.logger.log + + if to_file or filename != FILE_NAME: + # We record to file + self.log_to_file(filename=filename, level=level) + + if to_stdout: + self.log_to_stdout(level=level) + + # Using logger to record unhandled exceptions + self.add_handling_uncaught_expections(self.logger) + +
[docs] def log_to_file(self, filename=FILE_NAME, level=LOG_LEVEL): + """Add a file handler to logger. + + Parameters + ---------- + filename : str, optional + Name of the file where the logs are recorded. The default + is ``FILE_NAME``, in which case they are recorded in the + ``'pymapdl.log'`` file. + level : str, optional + Level of logging. The default is ``LOG_LEVEL``, in which + case ``'DEBUG'`` is used. + + Examples + -------- + Write to the ``pymapdl.log`` file in the current working directory. + + >>> from ansys.mapdl.core import LOG + >>> import os + >>> file_path = os.path.join(os.getcwd(), 'pymapdl.log') + >>> LOG.log_to_file(file_path) + + """ + + self = addfile_handler(self, filename=filename, level=level, write_headers=True)
+ +
[docs] def log_to_stdout(self, level=LOG_LEVEL): + """Add a standard output handler to the logger. + + Parameters + ---------- + filename : str, optional + Name of the file where the logs are recorded. The default + is ``FILE_NAME``, in which case they are recorded in the + ``'pymapdl.log'`` file. + level : str, optional + Level of logging. The default is ``LOG_LEVEL``, in which + case ``'DEBUG'`` is used. + write_headers : bool, optional + Whether to write the headers to the file. The default is ``True``. + """ + + self = add_stdout_handler(self, level=level)
+ +
[docs] def setLevel(self, level="DEBUG"): + """Change the log level of the object and the attached handlers. + + Parameters + ---------- + level : str, optional + Level of logging. The default is ``'DEBUG'``. + """ + self.logger.setLevel(level) + for each_handler in self.logger.handlers: + each_handler.setLevel(level) + self._level = level
+ + def _make_child_logger(self, sufix, level): + """Create a child logger. + + This method uses the ``getChild`` method or copies attributes between the + ``pymapdl_global`` logger and the new one. + """ + logger = logging.getLogger(sufix) + logger.std_out_handler = None + logger.file_handler = None + + if self.logger.hasHandlers: + for each_handler in self.logger.handlers: + new_handler = copy(each_handler) + + if each_handler == self.file_handler: + logger.file_handler = new_handler + elif each_handler == self.std_out_handler: + logger.std_out_handler = new_handler + + if level: + # The logger handlers are copied and changed the loglevel is + # the specified log level is lower than the one of the + # global. + if each_handler.level > string_to_loglevel[level.upper()]: + new_handler.setLevel(level) + + logger.addHandler(new_handler) + + if level: + if isinstance(level, str): + level = string_to_loglevel[level.upper()] + logger.setLevel(level) + + else: + logger.setLevel(self.logger.level) + + logger.propagate = True + return logger + +
[docs] def add_child_logger(self, sufix, level=None): + """Add a child logger to the main logger. + + This child logger is more general than an instance logger, which is designed to + track the state of MAPDL instances. + + If the logging level is in the arguments, a new logger with a reference + to the ``_global`` logger handlers is created instead of a child logger. + + Parameters + ---------- + sufix : str + Name of the logger. + level : str, optional + Level of logging. The default is ``None``. + + Returns + ------- + logging.logger + Logger class. + """ + name = self.logger.name + "." + sufix + self._instances[name] = self._make_child_logger(self, name, level) + return self._instances[name]
+ + def _add_mapdl_instance_logger(self, name, mapdl_instance, level): + if isinstance(name, str): + instance_logger = PymapdlCustomAdapter(self._make_child_logger(name, level), mapdl_instance) + elif not name: # pragma: no cover + instance_logger = PymapdlCustomAdapter(self._make_child_logger("NO_NAMED_YET", level), mapdl_instance) + else: + raise ValueError("You can only input 'str' classes to this method.") + + return instance_logger + +
[docs] def add_instance_logger(self, name, mapdl_instance, level=None): + """Create a logger for an MAPDL instance. + + The MAPDL instance logger is a logger with an adapter that adds + contextual information, such as the MAPDL instance name. This logger is + returned, and you can use it to log events as a normal logger. It is also + stored in the ``_instances`` field. + + Parameters + ---------- + name : str + Name for the new logger. + mapdl_instance : ansys.mapdl.core.mapdl._MapdlCore + MAPDL instance object. This should contain the ``name`` attribute. + + Returns + ------- + ansys.mapdl.core.logging.PymapdlCustomAdapter + Logger adapter customized to add MAPDL information to the + logs. You can use this class to log events in the same + way you use the ``logger`` class. + + Raises + ------ + Exception + You can only input strings as ``name`` to this method. + """ + count_ = 0 + new_name = name + while new_name in logging.root.manager.__dict__.keys(): + count_ += 1 + new_name = name + "_" + str(count_) + + self._instances[new_name] = self._add_mapdl_instance_logger(new_name, mapdl_instance, level) + return self._instances[new_name]
+ +
[docs] def __getitem__(self, key): + if key in self._instances.keys(): + return self._instances[key] + else: + raise KeyError(f"There is no instances with name {key}")
+ +
[docs] def add_handling_uncaught_expections(self, logger): + """Redirect the output of an exception to the logger.""" + + def handle_exception(exc_type, exc_value, exc_traceback): + if issubclass(exc_type, KeyboardInterrupt): + sys.__excepthook__(exc_type, exc_value, exc_traceback) + return + logger.critical("Uncaught exception", exc_info=(exc_type, exc_value, exc_traceback)) + + sys.excepthook = handle_exception
+ + +
[docs]def addfile_handler(logger, filename=FILE_NAME, level=LOG_LEVEL, write_headers=False): + """Add a file handler to the input. + + Parameters + ---------- + logger : logging.Logger or logging.Logger + Logger to add the file handler to. + filename : str, optional + Name of the output file. The default is ``FILE_NAME``. + level : str, optional + Level of logging. The default is ``LOG_LEVEL``. + write_headers : bool, optional + Whether to write the headers to the file. The default is ``False``. + + Returns + ------- + logger + Logger or Logger object. + """ + + file_handler = logging.FileHandler(filename) + file_handler.setLevel(level) + file_handler.setFormatter(logging.Formatter(FILE_MSG_FORMAT)) + + if isinstance(logger, Logger): + logger.file_handler = file_handler + logger.logger.addHandler(file_handler) + + elif isinstance(logger, logging.Logger): + logger.file_handler = file_handler + logger.addHandler(file_handler) + + if write_headers: + file_handler.stream.write(NEW_SESSION_HEADER) + file_handler.stream.write(DEFAULT_FILE_HEADER) + + return logger
+ + +
[docs]def add_stdout_handler(logger, level=LOG_LEVEL, write_headers=False): + """Add a file handler to the logger. + + Parameters + ---------- + logger : logging.Logger or logging.Logger + Logger to add the file handler to. + level : str, optional + Level of logging. The default is ``LOG_LEVEL``, in which + case ``""DEBUG" is used``. + write_headers : bool, optional + Whether to write the headers to the file. The default is ``False``. + + Returns + ------- + logger + Logger or Logger object. + """ + + std_out_handler = logging.StreamHandler() + std_out_handler.setLevel(level) + std_out_handler.setFormatter(PymapdlFormatter(STDOUT_MSG_FORMAT)) + + if isinstance(logger, Logger): + logger.std_out_handler = std_out_handler + logger.logger.addHandler(std_out_handler) + + elif isinstance(logger, logging.Logger): + logger.addHandler(std_out_handler) + + if write_headers: + std_out_handler.stream.write(DEFAULT_STDOUT_HEADER) + + return logger
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynamaterial.html b/version/0.3/_modules/ansys/dyna/core/pre/dynamaterial.html new file mode 100644 index 000000000..c9f889ea0 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynamaterial.html @@ -0,0 +1,1534 @@ + + + + + + + + + + ansys.dyna.core.pre.dynamaterial — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynamaterial

+"""
+Material API
+=============
+
+Module for creating a material.
+"""
+
+from enum import Enum
+import logging
+
+from .dynabase import *  # noqa : F403
+
+
+
[docs]class Air: + """Defines an air material. + + Parameters + ---------- + name : string + Material name. + mass_density : float, optional + Mass density. The default is ``0.00128``. + pressure_cutoff : float, optional + pressure cutoff. The default is ``1e-09``. + initial_internal_energy : float, optional + Initial internal energy per unit reference volume. + The default is ``2.5331e-06``. + initial_relative_volume : float, optional + Initial relative volume. The default is ``1.0``. + equation_coefficient : list, optional + Six polynomial equation coefficient. The default is + ``[0, 0, 0, 0, 0.4, 0.4, 0])``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + + def __init__( + self, + mass_density=1.280e-03, + pressure_cutoff=-1.0e-9, + initial_internal_energy=2.5331e-6, + initial_relative_volume=1.0, + equation_coefficient=[0, 0, 0, 0, 0.4, 0.4, 0], + ): + self.mass_density = mass_density + self.pressure_cutoff = pressure_cutoff + self.initial_internal_energy = initial_internal_energy + self.initial_relative_volume = initial_relative_volume + self.equation_coefficient = equation_coefficient + +
[docs] def create(self, stub): + """Create an air material.""" + ret = stub.CreateEOSLinearPolynomial( + EOSLinearPolynomialRequest( + ci=self.equation_coefficient, + e0=self.initial_internal_energy, + v0=self.initial_relative_volume, + ) + ) + self.eos_id = ret.eosid + ret = stub.CreateMatNull(MatNullRequest(ro=self.mass_density, pc=self.pressure_cutoff)) + self.material_id = ret.mid + self.name = "air" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class Liner: + """Defines a liner material. + + Parameters + ---------- + mass_density : float, optional + Mass density. The default is ``8.96``. + shear_modulus : float, optional + youngs_modulus : float, optional + poissons_ratio : float optional + constants : list, optional + melt_temperature : int, optional + room_temperature : int, optional + strain_rate : float, optional + specific_heat : float, optional + tensile_failure_stress : float, optional + spall_type, int, optional + iteration_option ; int, optional + failure_parameters : list, optional + equation_constants, list, optional + volume_correction_coefficient : float, optional + initial_internal_energy : float, optional + Initial internal energy per unit reference volume. + The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + + def __init__( + self, + mass_density=8.96, + shear_modulus=0.46, + youngs_modulus=0, + poissons_ratio=0.34, + constants=[90e-5, 292e-5, 0.31, 0.025, 1.09], + melt_temperature=1356, + room_temperature=293, + strain_rate=1e-6, + specific_heat=383.0e-8, + tensile_failure_stress=-1.2e-2, + spall_type=2, + iteration_option=0, + failure_parameters=[0.54, 4.89, 3.03, 0.014, 1.12], + equation_constants=[0.394, 1.489, 0, 0, 2.02], + volume_correction_coefficient=0.47, + initial_internal_energy=0, + ): + self.mass_density = mass_density + self.shear_modulus = shear_modulus + self.youngs_modulus = youngs_modulus + self.poissons_ratio = poissons_ratio + self.constants = constants + self.melt_temperature = melt_temperature + self.room_temperature = room_temperature + self.strain_rate = strain_rate + self.specific_heat = specific_heat + self.tensile_failure_stress = tensile_failure_stress + self.spall_type = spall_type + self.iteration_option = iteration_option + self.failure_parameters = failure_parameters + self.equation_constants = equation_constants + self.volume_correction_coefficient = volume_correction_coefficient + self.initial_internal_energy = initial_internal_energy + +
[docs] def create(self, stub): + """Create a liner material.""" + ret = stub.CreateMatJohnsonCook( + MatJohnsonCookRequest( + ro=self.mass_density, + g=self.shear_modulus, + e=self.youngs_modulus, + pr=self.poissons_ratio, + constants=self.constants, + tm=self.melt_temperature, + tr=self.room_temperature, + eps0=self.strain_rate, + cp=self.specific_heat, + pc=self.tensile_failure_stress, + spall=self.spall_type, + it=self.iteration_option, + failure=self.failure_parameters, + ) + ) + self.material_id = ret.mid + ret = stub.CreateEOSGruneisen( + EOSGruneisenRequest( + constants=self.equation_constants, + a=self.volume_correction_coefficient, + e0=self.initial_internal_energy, + ) + ) + self.eos_id = ret.eosid + self.name = "liner" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class HighExplosive: + """Defines a high-explosive material. + + Parameters + ---------- + mass_density : float, optional + Mass density. The default is ``8.96``. + detonation_velocity : float, optional + chapman_jouget_pressure : float, optional + jwl_equation_parameters : list, optional + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + + def __init__( + self, + mass_density=1.835, + detonation_velocity=0.88, + chapman_jouget_pressure=0.37, + jwl_equation_parameters=[8.261, 0.1724, 4.55, 1.32, 0.38, 0.102, 1.0], + ): + self.mass_density = mass_density + self.detonation_velocity = detonation_velocity + self.chapman_jouget_pressure = chapman_jouget_pressure + self.jwl_equation_parameters = jwl_equation_parameters + +
[docs] def create(self, stub): + """Create a high-explosive material.""" + ret = stub.CreateMatHighExplosiveBurn( + MatHighExplosiveBurnRequest( + ro=self.mass_density, + d=self.detonation_velocity, + pcj=self.chapman_jouget_pressure, + ) + ) + self.material_id = ret.mid + ret = stub.CreateEOSJWL(EOSJWLRequest(jwl_equation=self.jwl_equation_parameters)) + self.eos_id = ret.eosid + self.name = "HE" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class Vacuum: + """Defines a vacuum material. + + Parameters + ---------- + estimated_material_density : float + Estimated material density. The default is ``1e-09``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + + def __init__(self, estimated_material_density=1e-9): + self.estimated_material_density = estimated_material_density + +
[docs] def create(self, stub): + """Create a null material.""" + ret = stub.CreateMatVacuum(MatVacuumRequest(rho=self.estimated_material_density)) + self.material_id = ret.mid + self.eos_id = 0 + self.name = "vacuum" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatNull: + """Defines a null material. + + Young's modulus and Poisson's ratio are used to set the contact stiffness. + + Parameters + ---------- + mass_density : float, optional + Mass density. The default is ``0``. + pressure_cutoff : + + """ + + def __init__(self, mass_density=0, pressure_cutoff=0): + self.ro = mass_density + self.pc = pressure_cutoff + +
[docs] def create(self, stub): + """Create a null material.""" + ret = stub.CreateMatNull(MatNullRequest(ro=self.ro, pc=self.pc)) + self.material_id = ret.mid + self.name = "NULL" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class EMEOSTabulated1: + """Defines electrical conductivity or permeability. + + Parameters + ---------- + curve : Curve + + """ + + def __init__(self, curve=None): + self.curve = curve + +
[docs] def create(self, stub): + """Create an EM EOS tabulated1.""" + lcid = self.curve.create(stub) + ret = stub.CreateEMEOSTabulated1( + EMEOSTabulated1Request( + lcid=lcid, + ) + ) + self.id = ret.id + self.name = "tabulated1" + logging.info(f"EOS {self.name} Created...") + return self.id
+ + +
[docs]class EMMATTYPE(Enum): +
[docs] AIR_OR_VACUUM = 0
+
[docs] INSULATOR = 1
+
[docs] CONDUCTOR = 2
+ + +
[docs]class MatAdditional: + """Defines additional properties for a material.""" + + def __init__(self): + self.em = False + self.em_mat_type = 0 + self.em_eos = None + self.thermal_isotropic = False + +
[docs] def set_electromagnetic_property(self, material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0, eos=None): + """Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + Parameters + ---------- + material_type : + initial_conductivity : + eos : + + """ + self.em = True + self.em_material_type = material_type.value + self.em_initial_conductivity = initial_conductivity + self.em_eos = eos
+ +
[docs] def set_em_permeability_equal(self, material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0, eos=None): + """Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + Parameters + ---------- + material_type : + initial_conductivity : + eos : + + """ + self.em_mat_type = 1 + self.em_material_type = material_type.value + self.em_initial_conductivity = initial_conductivity + self.em_eos = eos
+ +
[docs] def set_em_permeability_different( + self, material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0, eos=None, murel=0 + ): + """Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + Parameters + ---------- + material_type : + initial_conductivity : + eos : + murel : + + """ + self.em_mat_type = 2 + self.em_material_type = material_type.value + self.em_initial_conductivity = initial_conductivity + self.em_eos = eos + self.murel = murel
+ +
[docs] def set_em_conducting_shells_3d(self, material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0): + """Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + Parameters + ---------- + material_type : + initial_conductivity : + + """ + self.em_mat_type = 4 + self.em_material_type = material_type.value + self.em_initial_conductivity = initial_conductivity
+ +
[docs] def set_em_resistive_heating_2d(self, material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0): + """Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + Parameters + ---------- + material_type : + initial_conductivity : + + """ + self.em_mat_type = 4 + self.em_material_type = material_type.value + self.em_initial_conductivity = initial_conductivity
+ +
[docs] def set_em_randles_batmac( + self, positive_current_collector_conductivity=0, negative_current_collector_conductivity=0 + ): + """Define two conductivities per EM node for special applications (Randles Batmac). + + Parameters + ---------- + positive_current_collector_conductivity : float + conductivities of the positive current collector materials + negative_current_collector_conductivity : float + conductivities of the negative current collector materials + + """ + self.em_mat_type = 6 + self.em_material_type = 5 + self.sigp = positive_current_collector_conductivity + self.sign = negative_current_collector_conductivity
+ +
[docs] def set_thermal_isotropic( + self, density=0, generation_rate=0, generation_rate_multiplier=0, specific_heat=0, conductivity=0 + ): + """Define isotropic thermal properties. + + Parameters + ---------- + density : + generation_rate : + generation_rate_multiplier : + specific_heat : + conductivity : + """ + self.thermal_isotropic = True + self.tro = density + self.tgrlc = generation_rate + self.tgmult = generation_rate_multiplier + self.hc = specific_heat + self.tc = conductivity
+ +
[docs] def create(self, stub, matid): + """Define additional properties for a material. + + Parameters + ---------- + matid : + Material ID. + """ + if self.em_mat_type: + if self.em_eos is not None: + eosid = self.em_eos.create(stub) + else: + eosid = 0 + if self.em_mat_type == 1: + stub.CreateEMMat001( + EMMat001Request( + mid=matid, mtype=self.em_material_type, sigma=self.em_initial_conductivity, eosid=eosid + ) + ) + elif self.em_mat_type == 2: + stub.CreateEMMat002( + EMMat002Request( + mid=matid, + mtype=self.em_material_type, + sigma=self.em_initial_conductivity, + eosid=eosid, + murel=self.murel, + ) + ) + elif self.em_mat_type == 4: + stub.CreateEMMat004( + EMMat004Request(mid=matid, mtype=self.em_material_type, sigma=self.em_initial_conductivity) + ) + elif self.em_mat_type == 6: + stub.CreateEMMat006( + EMMat006Request(mid=matid, mtype=self.em_material_type, sigp=self.sigp, sign=self.sign) + ) + if self.em: + if self.em_eos is not None: + eosid = self.em_eos.create(stub) + else: + eosid = 0 + stub.CreateMatEM( + MatEMRequest(mid=matid, mtype=self.em_material_type, sigma=self.em_initial_conductivity, eosid=eosid) + ) + logging.info(f"Material EM Created...") + if self.thermal_isotropic: + stub.CreateMatThermalIsotropic( + MatThermalIsotropicRequest( + mid=matid, + tro=self.tro, + tgrlc=self.tgrlc, + tgmult=self.tgmult, + hc=self.hc, + tc=self.tc, + ) + ) + logging.info(f"Material thermal isotropic Created...")
+ + +
[docs]class MatElastic(MatAdditional): + """Defines an isotropic hypoelastic material.""" + + def __init__(self, mass_density=0, young_modulus=0, poisson_ratio=0.3): + MatAdditional.__init__(self) + self.ro = mass_density + self.e = young_modulus + self.pr = poisson_ratio + +
[docs] def create(self, stub): + """Create an elastic material.""" + ret = stub.CreateMatElastic(MatElasticRequest(ro=self.ro, e=self.e, pr=self.pr)) + self.material_id = ret.mid + self.name = "Elastic" + MatAdditional.create(self, stub, self.material_id) + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatPlasticKinematic: + """Define material of modelling isotropic and kinematic hardening plasticity.""" + + def __init__( + self, mass_density=0, young_modulus=0, poisson_ratio=0.3, yield_stress=0, tangent_modulus=0, hardening=0 + ): + self.ro = mass_density + self.e = young_modulus + self.pr = poisson_ratio + self.sigy = yield_stress + self.etan = tangent_modulus + self.beta = hardening + +
[docs] def create(self, stub): + """Create plastic kinematic material.""" + ret = stub.CreateMatPlasticKinematic( + MatPlasticKinematicRequest(ro=self.ro, e=self.e, pr=self.pr, sigy=self.sigy, etan=self.etan, beta=self.beta) + ) + self.material_id = ret.mid + self.name = "Plastic Kinematic" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatElasticPlasticThermal(MatAdditional): + """Defines temperature-dependent material coefficients.""" + + def __init__( + self, + mass_density=0, + temperatures=None, + young_modulus=None, + poisson_ratio=None, + thermal_expansion=None, + yield_stress=None, + ): + MatAdditional.__init__(self) + self.ro = mass_density + self.ti = temperatures + self.ei = young_modulus + self.pri = poisson_ratio + self.alphai = thermal_expansion + self.sigyi = yield_stress + +
[docs] def create(self, stub): + """Create elastic plastic thermal material.""" + ret = stub.CreateMatElasticPlasticThermal( + MatElasticPlasticThermalRequest( + ro=self.ro, + ti=self.ti, + ei=self.ei, + pri=self.pri, + alphai=self.alphai, + sigyi=self.sigyi, + ) + ) + self.material_id = ret.mid + self.name = "ElasticPlasticThermal" + MatAdditional.create(self, stub, self.material_id) + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatRigid(MatAdditional): + """Defines a rigid material. + + Parts made from a rigid material are considered to belong to a rigid body.""" + + def __init__( + self, + mass_density=0, + young_modulus=0, + poisson_ratio=0.3, + center_of_mass_constraint=0, + translational_constraint=0, + rotational_constraint=0, + ): + MatAdditional.__init__(self) + self.ro = mass_density + self.e = young_modulus + self.pr = poisson_ratio + self.cmo = center_of_mass_constraint + self.con1 = translational_constraint + self.con2 = rotational_constraint + +
[docs] def create(self, stub): + """Create rigid material.""" + ret = stub.CreateMatRigid( + MatRigidRequest( + ro=self.ro, + e=self.e, + pr=self.pr, + cmo=self.cmo, + con1=self.con1, + con2=self.con2, + ) + ) + self.material_id = ret.mid + self.name = "RIGID" + MatAdditional.create(self, stub, self.material_id) + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatCrushableFoam(MatAdditional): + """Define material of modelling crushable foam.""" + + def __init__( + self, mass_density=0, young_modulus=0, poisson_ratio=0.3, yield_stress_curve=None, tensile_stress_cutoff=0 + ): + MatAdditional.__init__(self) + self.ro = mass_density + self.e = young_modulus + self.pr = poisson_ratio + self.lcid = yield_stress_curve + self.tsl = tensile_stress_cutoff + +
[docs] def create(self, stub): + """Create crushable foam material.""" + if self.lcid is not None: + cid = self.lcid.create(stub) + else: + cid = 0 + ret = stub.CreateMatCrushableFoam( + MatCrushableFoamRequest(ro=self.ro, e=self.e, pr=self.pr, lcid=cid, tsl=self.tsl) + ) + self.material_id = ret.mid + self.name = "Crushable Foam" + MatAdditional.create(self, stub, self.material_id) + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatThermalIsotropic: + """Defines isotropic thermal properties.""" + + def __init__(self, density=0, generation_rate=0, generation_rate_multiplier=0, specific_heat=0, conductivity=0): + self.tro = density + self.tgrlc = generation_rate + self.tgmult = generation_rate_multiplier + self.hc = specific_heat + self.tc = conductivity + +
[docs] def create(self, stub): + """Create isotropic thermal material.""" + ret = stub.CreateMatThermalIsotropic( + MatThermalIsotropicRequest( + tro=self.tro, + tgrlc=self.tgrlc, + tgmult=self.tgmult, + hc=self.hc, + tc=self.tc, + ) + ) + self.material_id = ret.mid + self.name = "Isotropic thermal" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatThermalOrthotropic: + """Defines orthotropic thermal properties.""" + + def __init__(self, specific_heat=0, conductivity_x=0, conductivity_y=0, conductivity_z=0): + self.hc = specific_heat + self.k1 = conductivity_x + self.k2 = conductivity_y + self.k3 = conductivity_z + +
[docs] def create(self, stub): + """Create orthotropic thermal material.""" + ret = stub.CreateMatThermalOrthotropic( + MatThermalOrthotropicRequest( + hc=self.hc, + k1=self.k1, + k2=self.k2, + k3=self.k3, + ) + ) + self.material_id = ret.mid + self.name = "Orthotropic thermal" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatRigidDiscrete: + """Defines a rigid material for shells or solids. + + Parameters + ---------- + mass_density : + young_modulus : + poisson_ratio : + + """ + + def __init__(self, mass_density=0, young_modulus=0, poisson_ratio=0.3): + self.ro = mass_density + self.e = young_modulus + self.pr = poisson_ratio + +
[docs] def create(self, stub): + """Create a rigid material.""" + ret = stub.CreateMatRigidDiscrete(MatRigidDiscreteRequest(ro=self.ro, e=self.e, pr=self.pr)) + self.material_id = ret.mid + self.name = "RIGID Discrete" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatPiecewiseLinearPlasticity: + """Defines an elasto-plastic material with an arbitrary stress. + + The arbitrary stress is defined as a function of strain curve + that can also have an arbitrary strain rate dependency. + + Parameters + ---------- + mass_density : + young_modulus : + poisson_ratio : + yield_stress : + tangent_modulus : + + """ + + def __init__( + self, + mass_density=0, + young_modulus=0, + poisson_ratio=0.3, + yield_stress=0, + tangent_modulus=0, + ): + self.ro = mass_density + self.e = young_modulus + self.pr = poisson_ratio + self.sigy = yield_stress + self.etan = tangent_modulus + +
[docs] def create(self, stub): + """Create a piecewise linear plasticity material.""" + ret = stub.CreateMatPiecewiseLinearPlasticity( + MatPiecewiseLinearPlasticityRequest(ro=self.ro, e=self.e, pr=self.pr, sigy=self.sigy, etan=self.etan) + ) + self.material_id = ret.mid + self.name = "Piecewise Linear Plasticity" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatModifiedPiecewiseLinearPlasticity: + """Defines an elasto-plastic material supporting an arbitrary stress. + + The arbitrary stress is defined as a function of strain curve and arbitrary + strain rate dependency. + + Parameters + ---------- + mass_density : + young_modulus : + poisson_ratio : + yield_stress : + tangent_modulus : + plastic_strain_to_failure : + integration_points_number : + + """ + + def __init__( + self, + mass_density=0, + young_modulus=0, + poisson_ratio=0, + yield_stress=0, + tangent_modulus=0, + plastic_strain_to_failure=0, + integration_points_number=0, + ): + self.ro = mass_density + self.e = young_modulus + self.pr = poisson_ratio + self.sigy = yield_stress + self.etan = tangent_modulus + self.fail = plastic_strain_to_failure + self.numint = integration_points_number + +
[docs] def create(self, stub): + """Create a modified piecewise linear plasticity.""" + ret = stub.CreateMatModifiedPiecewiseLinearPlasticity( + MatModifiedPiecewiseLinearPlasticityRequest( + ro=self.ro, + e=self.e, + pr=self.pr, + sigy=self.sigy, + etan=self.etan, + fail=self.fail, + numint=self.numint, + ) + ) + self.material_id = ret.mid + self.name = "Modified Piecewise Linear Plasticity" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatSpotweld: + """Defines a spotweld material. + + Parameters + ---------- + mass_density : + young_modulus : + poisson_ratio : + yield_stress : + plastic_hardening_modulus : + axial_force_resultant_at_failure : + force_resultant_nrs_at_failure : + force_resultant_nrt_at_failure : + """ + + def __init__( + self, + mass_density=0, + young_modulus=0, + poisson_ratio=0, + yield_stress=0, + plastic_hardening_modulus=0, + axial_force_resultant_at_failure=0, + force_resultant_nrs_at_failure=0, + force_resultant_nrt_at_failure=0, + ): + self.ro = mass_density + self.e = young_modulus + self.pr = poisson_ratio + self.sigy = yield_stress + self.eh = plastic_hardening_modulus + self.nrr = axial_force_resultant_at_failure + self.nrs = force_resultant_nrs_at_failure + self.nrt = force_resultant_nrt_at_failure + +
[docs] def create(self, stub): + """Create a spotweld material.""" + ret = stub.CreateMatSpotweld( + MatSpotweldRequest( + ro=self.ro, + e=self.e, + pr=self.pr, + sigy=self.sigy, + eh=self.eh, + nrr=self.nrr, + nrs=self.nrs, + nrt=self.nrt, + ) + ) + self.material_id = ret.mid + self.name = "Spotweld" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatFabric: + """Define an airbag material. + + Parameters + ---------- + mass_density : float, optional + Mass density. The default is ``0``. + young_modulus_longitudinal_direction : float, optional + Young's modulus-longitudinal direction. The default is ``0``. + young_modulus_transverse_direction : float, optional + Young's modulus-transverse direction. The default is ``0``. + minor_poisson_ratio : float, optional + Minor Poisson's ratio ba direction. The default is ``0.35``. + major_poisson_ratio : float, optional + Major Poisson's ratio ab direction. The default is ``0.35``. + shear_modulus : float, optional + Shear modulus in the ab direction. The default is ``0``. + """ + + def __init__( + self, + mass_density=0, + young_modulus_longitudinal_direction=0, + young_modulus_transverse_direction=0, + minor_poisson_ratio=0.35, + major_poisson_ratio=0.35, + shear_modulus=0, + ): + self.ro = mass_density + self.ea = young_modulus_longitudinal_direction + self.eb = young_modulus_transverse_direction + self.prba = minor_poisson_ratio + self.prab = major_poisson_ratio + self.gab = shear_modulus + +
[docs] def create(self, stub): + """Create an airbag material.""" + ret = stub.CreateMatFabric( + MatFabricRequest( + ro=self.ro, + ea=self.ea, + eb=self.eb, + prba=self.prba, + prab=self.prab, + gab=self.gab, + ) + ) + self.material_id = ret.mid + logging.info("Material Fabric Created...")
+ + +
[docs]class MatSpringNonlinearElastic: + """Provides a nonlinear elastic translational and rotational spring with an arbitrary force. + + The arbitrary force is defined as a function of displacement. The moment is defined + as a function of rotation. + + Parameters + ---------- + curve : Curve + Load curve describing force as a function of displacement or moment as a function of rotation relationship. + """ + + def __init__(self, curve): + self.curve = curve + +
[docs] def create(self, stub): + """Create material spring nonlinear elastic.""" + lcid = self.curve.create(stub) + ret = stub.CreateMatSpringNonlinearElastic(MatSpringNonlinearElasticRequest(lcid=lcid)) + self.material_id = ret.mid + logging.info("Material Spring Nonlinear Elastic Created...")
+ + +
[docs]class MatDamperViscous: + """Provides a linear translational or rotational damper located between two nodes. + + Parameters + ---------- + damping_constant : + """ + + def __init__(self, damping_constant=0): + self.dc = damping_constant + +
[docs] def create(self, stub): + """Create a material damper viscous.""" + ret = stub.CreateMatDamperViscous(MatDamperViscousRequest(dc=self.dc)) + self.material_id = ret.mid + logging.info("Material damper viscous Created...")
+ + +
[docs]class MatDamperNonlinearViscous: + """Provides a viscous translational damper with an arbitrary force. + + The arbitrary force is defined as a function of velocity dependency or a rotational + damper with an arbitrary moment as a function of rotational velocity dependency. + + Parameters + ---------- + curve : Curve + Load curve defining force as a function of rate-of-displacement + relationship or a moment as a function of rate-of-rotation relationship. + """ + + def __init__(self, curve): + self.curve = curve + +
[docs] def create(self, stub): + """Create a material damper nonlinear viscous.""" + lcdr = self.curve.create(stub) + ret = stub.CreateMatDamperNonlinearViscous(MatDamperNonlinearViscousRequest(lcdr=lcdr)) + self.material_id = ret.mid + logging.info("Material damper viscous Created...")
+ + +
[docs]class MatSPHIncompressibleFluid: + """Defines an ISPH (incompressible smooth particle hyrodynamics) fluid material. + + Parameters + ---------- + mass_density : float, optional + Mass density. The default is ``0``. + dynamic_viscosity : + tension_coefficient1 : + tension_coefficient2 : + """ + + def __init__(self, mass_density=0, dynamic_viscosity=0, tension_coefficient1=0, tension_coefficient2=0): + self.ro = mass_density + self.mu = dynamic_viscosity + self.gamma1 = tension_coefficient1 + self.gamma2 = tension_coefficient2 + +
[docs] def create(self, stub): + """Create an ISPH fluid material.""" + ret = stub.CreateMatSPHIncompressibleFluid( + MatSPHIncompressibleFluidRequest(ro=self.ro, mu=self.mu, gamma1=self.gamma1, gamma2=self.gamma2) + ) + self.material_id = ret.mid + self.name = "SPH incompressible fluid" + logging.info(f"Material {self.name} Created...")
+ + +
[docs]class MatSPHIncompressibleStructure: + """Defines an ISPH structure material. + + Parameters + ---------- + mass_density : float, optional + Mass density. The default is ``0``. + adhension_coefficient : + roughness_coefficient : + adhesion_scaling_coefficient : + """ + + def __init__( + self, + mass_density=0, + adhesion_coefficient=0, + roughness_coefficient=0, + adhesion_scaling_coefficient=0, + ): + self.ro = mass_density + self.beta = adhesion_coefficient + self.rough = roughness_coefficient + self.adh = adhesion_scaling_coefficient + +
[docs] def create(self, stub): + """Create an ISPH structure material.""" + ret = stub.CreateMatSPHIncompressibleStructure( + MatSPHIncompressibleStructureRequest(ro=self.ro, beta=self.beta, rough=self.rough, adh=self.adh) + ) + self.material_id = ret.mid + self.name = "SPH incompressible structure" + logging.info(f"Material {self.name} Created...")
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynamech.html b/version/0.3/_modules/ansys/dyna/core/pre/dynamech.html new file mode 100644 index 000000000..3e7d53a9c --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynamech.html @@ -0,0 +1,904 @@ + + + + + + + + + + ansys.dyna.core.pre.dynamech — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynamech

+"""
+Mechanical API
+==============
+
+Module for setting up explicit or implicit analysis.
+"""
+
+from .dynabase import *  # noqa : F403
+
+
+class AnalysisType(Enum):
+
[docs] EXPLICIT = 1
+
[docs] IMPLICIT = 2
+
[docs] NONE = 3
+ + +
[docs]class DynaMech(DynaBase): + """Defines a Mechanical analysis.""" + + def __init__(self, analysis=AnalysisType.EXPLICIT): + DynaBase.__init__(self) + self.casetype = CaseType.STRUCTURE + self.analysis = analysis.value + +
[docs] def create_control_output(self, npopt=0, neecho=0): + """Set miscellaneous output parameters. + + Parameters + ---------- + npopt : int, optional + Print suppression during the input phase flag for the D3HSP file. + The default is ``0``. Options are: + + - EQ.0: No suppression. + - EQ.1: Nodal coordinates, element connectivities, rigid wall definitions, + nodal SPCs, initial velocities, initial strains, adaptive constraints, and + SPR2/SPR3 constraints are not printed. + + neecho : int, optional + Print suppression during the input phase flag for the echo file. + The default is ``0``. Options are: + + - EQ.0: All data is printed. + - EQ.1: Nodal printing is suppressed. + - EQ.2: Element printing is suppressed. + - EQ.3: Both nodal and element printing is suppressed. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateControlOutput(ControlOutputRequest(npopt=npopt, neecho=neecho)) + logging.info("Control Output Created...") + return ret
+ +
[docs] def set_init_velocity(self, translational=Velocity(0, 0, 0), rotational=RotVelocity(0, 0, 0)): + """Define initial nodal point velocities using a nodal set ID. + + Parameters + ---------- + nsid : int + Nodal set ID. + translational : Velocity + Initial translational velocity in the x,y,z-direction. + rotational : RotVelocity + Initial rotational velocity about the x,y,z-axis. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + velocity = [ + translational.x, + translational.y, + translational.z, + rotational.x, + rotational.y, + rotational.z, + ] + ret = self.stub.CreateInitVel(InitVelRequest(nsid=0, velocity=velocity)) + logging.info("Initial velocity Created...") + return ret
+ +
[docs] def create_defineorientation(self, vid, iop, vector, node1, node2): + """Define orientation vectors for discrete springs and dampers. + + Parameters + ---------- + vid : int + Orientation vector ID. + iop : int + Options are: + + - EQ.0: Deflections/rotations are measured and forces/moments are applied + along the following orientation vector. + - EQ.1: Deflections/rotations are measured and forces/moments are applied + along the axis between the two spring/damper nodes projected onto the plane normal + to the following orientation vector. + - EQ.2: Deflections/rotations are measured and forces/moments are applied + along a vector defined by the following two nodes. + - EQ.3: Deflections/rotations are measured and forces/moments are applied + along the axis between the two spring/damper nodes projected onto the + plane normal to the a vector defined by the following two nodes. + vector : list [x,y,z] + x,y,z : x,y,z-value of the orientation vector. + node1 : int + Node 1 ID. + node2 : int + Node 2 ID. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateDefineOrientation( + DefineOrientationRequest(vid=vid, iop=iop, vector=vector, node1=node1, node2=node2) + ) + logging.info("DefineOrientation Created...") + return ret
+ +
[docs] def create_shellset(self, option, title, sid, eids): + """Define a set of shell elements with optional identical or unique attributes. + + Parameters + ---------- + option : string + Available options. Choices are ``<BLANK>``,``LIST``, and ``GENERAL``. + title : string + Title for the shell set. + sid : int + Set ID. + eids : list + List of shell element IDs. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateShellSet(ShellSetRequest(option=option, title=title, sid=sid, eids=eids)) + logging.info("Shell Set Created...") + return ret
+ +
[docs] def create_solidset(self, title, sid, ki): + """Define a set of solid elements. + + Parameters + ---------- + title : string + Title for the set of solid elements. + sid : int + Set ID. + ki : list + Solid element IDs. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateSolidSet(SolidSetRequest(title=title, sid=sid, ki=ki)) + logging.info("Solid Set Created...") + return ret
+ +
[docs] def create_section_solid(self, title, secid, elform): + """Define section properties for solid continuum and fluid elements. + + Parameters + ---------- + title : string + Title for section solid. + secid : int + Section ID. ``SECID`` is referenced on the ``\*PART`` card. + A unique number must be specified. + elform : int + Element formulation options. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateSectionSolid(SectionSolidRequest(title=title, secid=secid, elform=elform)) + logging.info("Section Solid Created...") + return ret
+ +
[docs] def create_section_discrete(self, secid, dro=0, kd=0, v0=0, cl=0, fd=0, cdl=0, tdl=0): + """Defined spring and damper elements for translation and rotation. + + Parameters + ---------- + secid : int + Section ID. + dro : int, optional + Displacement/rotation. The default is ``0``. Options are: + + - EQ.0: Material describes a translational spring/damper. + - EQ.1: Material describes a torsional spring/damper. + + kd : float, optional + Dynamic magnification factor. The default is ``0``. + v0 : float, optional + Test velocity. The default is ``0``. + cl : float, optional + Clearance. The default is ``0``. + fd : float, optional + Failure deflection. The default is ``0``. + cdl : float, optional + Deflection limit in compression. The default is ``0``. + td1 : float, optional + Deflection limit in tension. The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateSectionDiscrete( + SectionDiscreteRequest(secid=secid, dro=dro, kd=kd, v0=v0, cl=cl, fd=fd, cdl=cdl, tdl=tdl) + ) + logging.info("Section Discrete Created...") + return ret
+ +
[docs] def create_hourglass(self, ghid, ihq, qm=0.1, q1=1.5, q2=0.06, qb=1e-9, qw=1e-9): + """Define hourglass and bulk viscosity properties. + + Parameters + ---------- + ghid : int + Hourglass ID. A unique number or label must be specified. + ihq : int + Hourglass control type. + qm : float, optional + Hourglass coefficient. The default is ``0.1``. + q1 : float, optional + Quadratic bulk viscosity coefficient. The default is ``1.5``. + q2 : float, optional + Linear bulk viscosity coefficient. The default is ``0.06``. + qb : float, optional + Hourglass coefficient for shell bending. The default is ``1e-09``. + qw : float, optional + Hourglass coefficient for shell warping. The default is ``1e-09``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateHourglass(HourglassRequest(ghid=ghid, ihq=ihq, qm=qm, q1=q1, q2=q2, qb=qb, qw=qw)) + logging.info("Hourglass 1 Created...") + return ret
+ +
[docs] def save_file(self, defaultsetting=1): + """Save keyword files. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + if self.analysis == 1: + self.set_accuracy( + objective_stress_updates=Switch.OFF, + invariant_node_number=InvariantNode.ON_FOR_SHELL_TSHELL_SOLID, + implicit_accuracy_flag=Switch.OFF, + ) + self.set_bulk_viscosity(bulk_viscosity_type=BulkViscosity.COMPUTE_INTERNAL_ENERGY_DISSIPATED) + self.set_energy( + hourglass_energy=EnergyFlag.COMPUTED, + sliding_interface_energy=EnergyFlag.COMPUTED, + ) + self.set_hourglass( + controltype=HourglassControl.FLANAGAN_BELYTSCHKO_INTEGRATION_SOLID, + coefficient=0, + ) + if self.parts.get_num_shellpart() > 0: + self.create_control_shell( + wrpang=0, + esort=1, + irnxx=0, + istupd=0, + theory=0, + bwc=1, + miter=1, + proj=1, + irquad=0, + ) + elif self.analysis == 2: + self.set_accuracy( + objective_stress_updates=Switch.ON, + invariant_node_number=InvariantNode.ON_FOR_SHELL_TSHELL_SOLID, + implicit_accuracy_flag=Switch.ON, + ) + self.set_bulk_viscosity(bulk_viscosity_type=BulkViscosity.COMPUTE_INTERNAL_ENERGY_DISSIPATED) + self.set_energy( + hourglass_energy=EnergyFlag.COMPUTED, + sliding_interface_energy=EnergyFlag.COMPUTED, + ) + self.set_hourglass( + controltype=HourglassControl.FLANAGAN_BELYTSCHKO_INTEGRATION_SOLID, + coefficient=0, + ) + if self.parts.get_num_shellpart() > 0: + self.create_control_shell( + wrpang=0, + esort=1, + irnxx=0, + istupd=4, + theory=0, + bwc=1, + miter=1, + proj=1, + irquad=0, + ) + else: + pass + DynaBase.save_file(self)
+ + +
[docs]class Airbag: + """Defines an airbag or control volume. + + Parameters + ---------- + Set : SegmentSet or PartSet + Set. Options are: + + - EQ.0: Segment set ID. + - EQ.1: Part set ID. + + heat_capacity_at_constant_volume : float, optional + Heat capacity at constant volume. The default is ``0``. + heat_capacity_at_constant_pressure : float, optional + Heat capacity at constant pressure. The default is ``0``. + input_gas_temperature : float, optional + Temperature of the input gas. The default is ``0``. + input_mass_flow_rate : int, optional + Load curve ID specifying the input mass flow rate. + The default is ``0``. + shape_factor_for_exit_hole : float, optional + Shape factor for exit hole. The default is ``0``. + ambient_pressure : float, optional + Ambient pressure. The default is ``0``. + ambient_density : float, optional + Ambient density. The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed.. + """ + + def __init__( + self, + set, + heat_capacity_at_constant_volume=0, + heat_capacity_at_constant_pressure=0, + input_gas_temperature=0, + input_mass_flow_rate=Curve(x=[], y=[]), + shape_factor_for_exit_hole=0, + ambient_pressure=0, + ambient_density=0, + ): + self.stub = DynaBase.get_stub() + self.cv = heat_capacity_at_constant_volume + self.cp = heat_capacity_at_constant_pressure + self.t = input_gas_temperature + self.lcid = input_mass_flow_rate.create(self.stub) + self.mu = shape_factor_for_exit_hole + self.pe = ambient_pressure + self.ro = ambient_density + self.sid = set.create(self.stub) + if set.type == "SEGMENTSET": + self.sidtyp = 0 + else: + self.sidtyp = 1 + +
[docs] def create(self): + """Create an airbag.""" + self.stub.CreateAirbagModel( + AirbagModelRequest( + modeltype="SIMPLE_AIRBAG_MODEL", + sid=self.sid, + sidtyp=self.sidtyp, + cv=self.cv, + cp=self.cp, + t=self.t, + lcid=self.lcid, + mu=self.mu, + area=0, + pe=self.pe, + ro=self.ro, + ) + ) + logging.info("Airbag Model Created...")
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynanvh.html b/version/0.3/_modules/ansys/dyna/core/pre/dynanvh.html new file mode 100644 index 000000000..341e444c3 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynanvh.html @@ -0,0 +1,676 @@ + + + + + + + + + + ansys.dyna.core.pre.dynanvh — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynanvh

+"""
+NVH API
+==========
+
+Module for creating an NVH Dyna input deck.
+"""
+
+import logging
+
+from .dynabase import *  # noqa : F403
+
+
+
[docs]class DynaNVH(DynaBase): + """Contains methods for creating a keyword related to NVH.""" + + def __init__(self): + DynaBase.__init__(self) + +
[docs] def save_file(self): + """Save keyword files. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + DynaBase.save_file(self)
+ + +
[docs]class ExcitationDOF(Enum): +
[docs] VECTOR = 0
+
[docs] X = 1
+
[docs] Y = 2
+
[docs] Z = 3
+ + +
[docs]class ExcitationType(Enum): +
[docs] BASE_VELOCITY = 0
+
[docs] BASE_ACCELERATION = 1
+
[docs] BASE_DISPLACEMENT = 2
+
[docs] NODAL_FORCE = 3
+ + +
[docs]class ResponseDOF(Enum): +
[docs] VECTOR = 0
+
[docs] X = 1
+
[docs] Y = 2
+
[docs] Z = 3
+ + +
[docs]class ResponseType(Enum): +
[docs] BASE_VELOCITY = 0
+
[docs] BASE_ACCELERATION = 1
+
[docs] BASE_DISPLACEMENT = 2
+
[docs] NODAL_FORCE = 3
+ + +
[docs]class FrequencyDomain: + """Provides a way of defining and solving frequency domain vibration and acoustic problems.""" + + def __init__(self): + self.stub = DynaBase.get_stub() + self.defined_frf = False + +
[docs] def set_frequency_response_function( + self, + excitation_input_set=None, + excitation_input_dof=ExcitationDOF.VECTOR, + excitation_input_type=ExcitationType.NODAL_FORCE, + max_natural_frequency=0, + modal_damping_coefficient=0, + modal_damping_coefficient_curve=None, + modal_damping_coefficient_curve_type=0, + response_output_set=None, + response_output_dof=ResponseDOF.Y, + response_output_type=ResponseType.BASE_VELOCITY, + frf_output_min_frequency=0, + frf_output_max_frequency=0, + frf_output_num_frequency=0, + ): + """Compute frequency response functions due to nodal excitations. + + Parameters + ---------- + excitation_input_set : + excitation_input_dof : + excitation_input_type : + max_natural_frequency : + modal_damping_coefficient : + modal_damping_coefficient_curve : + modal_damping_coefficient_curve_type : + response_output_set : + response_output_dof : + response_output_type : + frf_output_min_frequency : + frf_output_max_frequency : + frf_output_num_frequency : + + """ + self.defined_frf = True + self.n1 = excitation_input_set + self.dof1 = excitation_input_dof.value + self.vad1 = excitation_input_type.value + self.fnmax = max_natural_frequency + self.dampf = modal_damping_coefficient + self.lcdam = modal_damping_coefficient_curve + self.lctyp = modal_damping_coefficient_curve_type + self.n2 = response_output_set + self.dof2 = response_output_dof.value + self.vad2 = response_output_type.value + self.fmin = frf_output_min_frequency + self.fmax = frf_output_max_frequency + self.nfreq = frf_output_num_frequency
+ +
[docs] def create(self): + """Define a frequency domain vibration and acoustic problem.""" + if self.defined_frf: + if self.lcdam is not None: + cid = self.lcdam.create(self.stub) + else: + cid = 0 + n1typ, n1id = 0, 0 + if self.n1 is not None: + self.n1.create(self.stub) + if self.n1.type.upper() == "NODE": + n1typ = 0 + n1id = self.n1.get_nid() + elif self.n1.type.upper() == "NODESET": + n1typ = 1 + n1id = self.n1.id + elif self.n1.typ.upper() == "SEGMENTSET": + n1typ = 2 + n1id = self.n1.id + else: + print("Invalid set type.") + n2typ, n2id = 0, 0 + if self.n2 is not None: + self.n2.create(self.stub) + if self.n2.type.upper() == "NODE": + n2typ = 0 + n2id = self.n2.get_nid() + elif self.n2.type.upper() == "NODESET": + n2typ = 1 + n2id = self.n2.id + elif self.n2.typ.upper() == "SEGMENTSET": + n2typ = 2 + n2id = self.n2.id + else: + print("Invalid set type.") + + self.stub.CreateFrequencyDomainFRF( + FrequencyDomainFRFRequest( + n1=n1id, + n1typ=n1typ, + dof1=self.dof1, + vad1=self.vad1, + fnmax=self.fnmax, + dampf=self.dampf, + lcdam=cid, + lctyp=self.lctyp, + n2=n2id, + n2typ=n2typ, + dof2=self.dof2, + vad2=self.vad2, + fmin=self.fmin, + fmax=self.fmax, + nfreq=self.nfreq, + ) + ) + logging.info("Frequency response function Created...")
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynasale.html b/version/0.3/_modules/ansys/dyna/core/pre/dynasale.html new file mode 100644 index 000000000..63de3f3c9 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynasale.html @@ -0,0 +1,850 @@ + + + + + + + + + + ansys.dyna.core.pre.dynasale — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynasale

+"""
+Airbag API
+==========
+
+Module for creating a S-ALE (Structured ALE) DYNA input deck.
+"""
+
+from enum import Enum
+import logging
+
+from .dynabase import *  # noqa : F403
+
+
+
[docs]class AdvectionMethod(Enum): +
[docs] DONOR_CELL_WITH_HALF_INDEX_SHIFT = 1
+
[docs] VAN_LEER_WITH_HIS = 2
+
[docs] DONOR_CELL_WITH_HIS = 3
+
[docs] FINITE_VOLUME_METHOD = 6
+ + +
[docs]class FillDirection(Enum): +
[docs] INSIDE_THE_GEOMETRY = 0
+
[docs] OUTSIDE_THE_GEOMETRY = 1
+ + +
[docs]class ControlPoint: + """Provides spacing information for generating a 3D S-ALE mesh. + + Parameters + ---------- + number : int + Control point node number. + position : float + Control point position. + ratio : float + Ratio for progressive mesh spacing. + """ + + def __init__(self, number, position, ratio): + self.number = number + self.position = position + self.ratio = ratio
+ + +
[docs]class StructuredMesh: + """Generates a structured 2D or 3D mesh and invokes the S-ALE solver.""" + + def __init__(self, control_points_x, control_points_y, control_points_z): + self.stub = DynaBase.get_stub() + self.control_points_x = control_points_x + self.control_points_y = control_points_y + self.control_points_z = control_points_z + self.refine_factor_x = 1 + self.refine_factor_y = 1 + self.refine_factor_z = 1 + self.fillings = [] + +
[docs] def fill( + self, + material, + geometry_type="NULL", + nsample=4, + define_geometry_parameters=[0, 0, 0, 0, 0], + inout=FillDirection.INSIDE_THE_GEOMETRY, + vid=0, + reference_pressure=0, + ): + """Perform volume-filling operations on a S-ALE mesh. + + Parameters + ---------- + material_name : string + Material name. + geometry_type : string + Geometry type. The default is ``"Null"``. Options are: + + - BOXCOR + - BOXCPT + - CYLINDER + - PARTSET + - PART + - PLANE + - SEGSET + - SPHERE + + nsample : int, optional + Number of sampling points. The default is ``4``. + define_geometry_parameters : list + List of values having different definitions for different options. + The default is ``[0, 0, 0, 0, 0]``. + in_out : int, optional + Flag for whether to fill inside or outside of the geometry. The + default is ``INSIDE_THE_GEOMETRY``. + vid : int, optional + Flag for assigning the initial velocity to the material filling the domain. + The default is ``0``. + reference_pressure : + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.fillings.append( + [ + material, + geometry_type, + nsample, + define_geometry_parameters, + inout, + vid, + reference_pressure, + ] + )
+ +
[docs] def refine(self, refine_factor_x=1, refine_factor_y=1, refine_factor_z=1): + """Refine existing S-ALE meshes. + + Parameters + ---------- + refine_factor_x : int, optional + Refinement factor for the x-direction. The default is ``1``. + refine_factor_y : int, optional + Refinement factor for the y-direction. The default is ``1``. + refine_factor_z : int, optional + Refinement factor for the z-direction. The default is ``1``. + """ + self.refine_factor_x = refine_factor_x + self.refine_factor_y = refine_factor_y + self.refine_factor_z = refine_factor_z
+ +
[docs] def initial_detonation(self, detonation_point): + """Define a point for initiating the location of a high-explosive detonation. + + Parameters + ---------- + detonation_point : Point + Coordinates (x,y,z) of the detonation point. + """ + self.detonation_point = detonation_point
+ +
[docs] def create(self): + """Create a mesh.""" + nx = [] + xx = [] + ratiox = [] + for i in range(len(self.control_points_x)): + nx.append(self.control_points_x[i].number) + xx.append(self.control_points_x[i].position) + ratiox.append(self.control_points_x[i].ratio) + ny = [] + xy = [] + ratioy = [] + for i in range(len(self.control_points_y)): + ny.append(self.control_points_y[i].number) + xy.append(self.control_points_y[i].position) + ratioy.append(self.control_points_y[i].ratio) + nz = [] + xz = [] + ratioz = [] + for i in range(len(self.control_points_z)): + nz.append(self.control_points_z[i].number) + xz.append(self.control_points_z[i].position) + ratioz.append(self.control_points_z[i].ratio) + + ret = self.stub.ALECreateStructuredMeshCtrlPoints( + ALECreateStructuredMeshControlPointsRequest(icase=2, sfo=1, n=nx, x=xx, ratio=ratiox) + ) + cpidx = ret.cpid + ret = self.stub.ALECreateStructuredMeshCtrlPoints( + ALECreateStructuredMeshControlPointsRequest(icase=2, sfo=1, n=ny, x=xy, ratio=ratioy) + ) + cpidy = ret.cpid + ret = self.stub.ALECreateStructuredMeshCtrlPoints( + ALECreateStructuredMeshControlPointsRequest(icase=2, sfo=1, n=nz, x=xz, ratio=ratioz) + ) + cpidz = ret.cpid + ret = self.stub.ALECreateStructuredMesh( + ALECreateStructuredMeshRequest(nbid=2000001, ebid=2000001, cpidx=cpidx, cpidy=cpidy, cpidz=cpidz) + ) + meshid = ret.meshid + partid = ret.partid + logging.info(f"ALE Structured mesh {meshid} Created...") + + for obj in self.fillings: + material = obj[0] + geometry_type = obj[1] + nsample = obj[2] + define_geometry_parameters = obj[3] + inout = obj[4] + vid = obj[5] + reference_pressure = obj[6] + material.create(self.stub) + self.stub.ALECreateStructuredMultiMaterialGroup( + ALECreateStructuredMultiMatGroupRequest( + nmmgnm=material.name, + mid=material.material_id, + eosid=material.eos_id, + pref=reference_pressure, + ) + ) + logging.info(f"Material {material.name} Created...") + if geometry_type.upper() != "NULL": + self.stub.ALECreateStructuredMeshVolumeFilling( + ALECreateStructuredMeshVolumeFillingRequest( + mshid=meshid, + ammgto=material.name, + nsample=nsample, + geom=geometry_type.upper(), + vid=vid, + inout=inout.value, + e=define_geometry_parameters, + ) + ) + logging.info(f"Material {material.name} filled in Mesh {meshid}...") + self.stub.ALECreateStructuredMeshRefine( + ALECreateStructuredMeshRefineRequest( + mshid=meshid, + ifx=self.refine_factor_x, + ify=self.refine_factor_y, + ifz=self.refine_factor_z, + ) + ) + logging.info(f"Mesh {meshid} Refined...") + dpoint = [self.detonation_point.x, self.detonation_point.y, self.detonation_point.z] + self.stub.CreateInitDetonation(InitDetonationRequest(pid=partid, coord=dpoint, lt=0)) + logging.info("Location of high explosive detonation Defined...")
+ + +
[docs]class DynaSALE(DynaBase): + """Sets up the S-ALE simulation process.""" + + def __init__(self): + DynaBase.__init__(self) + self.stub.CreateDBSALE(DBSALERequest(switch=1)) + +
[docs] def set_termination(self, endtime): + """Set the time for ending the simulation. + + Parameters + ---------- + endtime : float + Time for ending the simulation. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.stub.CreateTermination(TerminationRequest(endtim=endtime))
+ +
[docs] def set_output_interval(self, database_plot_interval): + """Request binary output. + + Parameters + ---------- + database_plot_interval : float + Time interval between output states. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.stub.CreateDBBinary(DBBinaryRequest(filetype="D3PLOT", dt=database_plot_interval))
+ +
[docs] def set_analysis_type( + self, + num_of_cycle=1, + method=AdvectionMethod.DONOR_CELL_WITH_HALF_INDEX_SHIFT, + background_pressure=0, + ): + """Set the analysis type. + + Parameters + ---------- + num_of_cycle : float, optional + Total time of simulation for the fluid problem. The + default is ``1``. + method : float, optional + Time step for the fluid problem. The default is + ``DONOR_CELL_WITH_HALF_INDEX_SHIFT``. + background_pressure : int, optional + Reference pressure for computing the internal forces. + The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.ALECreateControl( + ControlALERequest( + dct=0, + nadv=num_of_cycle, + meth=method.value, + afac=0, + end=1e20, + aafac=1, + vfact=1e-6, + pref=background_pressure, + ) + ) + logging.info("Setup Analysis...") + return ret
+ +
[docs] def set_output_database(self, matsum=0, glstat=0): + """Obtain output files containing the results. + + Parameters + ---------- + matsum : float, optional + Time interval between outputs of part energies. The + default is ``0``. + glstat : float, optional + Time interval between outputs of global statistics and energies. + The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + if matsum > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="MATSUM", dt=matsum, binary=1, lcur=0, ioopt=0)) + if glstat > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="GLSTAT", dt=glstat, binary=1, lcur=0, ioopt=0)) + ret = 1 + logging.info("Output Setting...") + return ret
+ +
[docs] def save_file(self): + """Save keyword files. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + self.set_energy( + hourglass_energy=EnergyFlag.COMPUTED, + sliding_interface_energy=EnergyFlag.COMPUTED, + ) + DynaBase.save_file(self)
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/dynasolution.html b/version/0.3/_modules/ansys/dyna/core/pre/dynasolution.html new file mode 100644 index 000000000..a351c327b --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/dynasolution.html @@ -0,0 +1,872 @@ + + + + + + + + + + ansys.dyna.core.pre.dynasolution — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.dynasolution

+"""
+Solution
+========
+
+Module for providing the top object that sets up a DYNA solution.
+"""
+
+import logging
+import os
+import sys
+
+from ansys.api.dyna.v0.kwprocess_pb2 import *  # noqa : F403
+from ansys.api.dyna.v0.kwprocess_pb2_grpc import *  # noqa : F403
+
+# from subprocess import DETACHED_PROCESS
+import grpc
+
+from .launcher import *  # noqa : F403
+
+
[docs]CHUNK_SIZE = 1024 * 1024
+ + +
[docs]def init_log(log_file): + """Initialize a log file. + + Parameters + ---------- + log_file : str + Name of the log file. + """ + if not logging.getLogger().handlers: + logging.basicConfig( + level=logging.DEBUG, + format="%(asctime)s : %(levelname)s %(message)s", + datefmt="%Y-%m-%d %H:%M:%S", + filename=log_file, + filemode="w", + ) + console = logging.StreamHandler() + console.setLevel(logging.INFO) + formatter = logging.Formatter("%(asctime)s : %(message)s", datefmt="%Y-%m-%d %H:%M:%S") + console.setFormatter(formatter) + logging.getLogger().addHandler(console)
+ + +
[docs]class DynaSolution: + """Contains methods for creating a general LS-DYNA keyword. + + Parameters + ---------- + hostname : str, optional + Host name. The default is ``"localhost"``. + port : str, optional + Port. the default is ``"50051"``. + """ + + def __init__(self, hostname="localhost", port="50051"): + # launch server + check_valid_ip(hostname) # double check + if port is None: + port = int(os.environ.get("PYDYNAPRE_PORT", DYNAPRE_DEFAULT_PORT)) + check_valid_port(port) + LOG.debug(f"Using default port {port}") + + if (hostname.lower() == "localhost" or hostname == LOCALHOST) and not DynaSolution.grpc_local_server_on(): + LOG.debug("Starting kwserver") + server_path = os.path.join(os.getcwd(), "../../src/ansys/dyna/core/pre/Server") + threadserver = ServerThread(1, port=port, ip=hostname, server_path=server_path) + threadserver.setDaemon(True) + threadserver.start() + + init_log("client.log") + temp = hostname + ":" + str(port) + channel = grpc.insecure_channel(temp) + try: + grpc.channel_ready_future(channel).result(timeout=5) + except grpc.FutureTimeoutError: + logging.critical("Can not connect to kwServer") + sys.exit() + logging.info("Connected to kwServer...") + self.stub = kwC2SStub(channel) + self.object_list = [] + self.mainname = "" + self._path = None + DynaSolution.stub = self.stub + DynaSolution.terminationtime = 0 + + @staticmethod +
[docs] def grpc_local_server_on() -> bool: + """Check if the server is launched locally. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + channel = grpc.insecure_channel("localhost:50051") + try: + grpc.channel_ready_future(channel).result(timeout=5) + except: + return False + return True
+ +
[docs] def get_stub(): + """Get the stub of the solution object.""" + return DynaSolution.stub
+ +
[docs] def add(self, obj): + """Add a case in the solution. + + Parameters + ---------- + obj : + + """ + self.object_list.append(obj)
+ +
[docs] def get_file_chunks(self, filename): + """Get file chunks. + + Parameters + ---------- + filename : str + Name of the file. + """ + with open(filename, "rb") as f: + while True: + piece = f.read(CHUNK_SIZE) + if len(piece) == 0: + return + yield Chunk(buffer=piece)
+ +
[docs] def upload(self, stub_, filename): + """Upload files to the server. + + Parameters + ---------- + stub_ : + filename : str + Name of the file. + + """ + chunks_generator = self.get_file_chunks(filename) + response = stub_.Upload(chunks_generator)
+ +
[docs] def download(self, remote_name, local_name): + """Download files from the server. + + Parameters + ---------- + stub_ : + remote_name : + local_name : + + """ + response = self.stub.Download(DownloadRequest(url=remote_name)) + with open(local_name, "wb") as f: + for chunk in response: + f.write(chunk.buffer)
+ +
[docs] def open_files(self, filenames): + """Open initial model files. + + Parameters + ---------- + filenames : list + List of filenames. The main file is ``[0]``. The others are subfiles. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + splitfiles = os.path.split(filenames[0]) + path = splitfiles[0] + for filename in filenames: + fn = os.path.basename(filename) + self.stub.kwSetFileName(kwFileName(name=fn, num=filenames.index(filename))) + self.upload(self.stub, path + os.sep + fn) + logging.info(path + os.sep + fn + " uploaded to server...") + + self.mainname = os.path.basename(filenames[0]) + return self.stub.LoadFile(LoadFileRequest())
+ +
[docs] def set_termination(self, termination_time): + """Set time for terminating the job. + + Parameters + ---------- + termination_time : float + Termination time. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + DynaSolution.termination_time = termination_time + ret = self.stub.CreateTermination(TerminationRequest(endtim=termination_time)) + logging.info("Setting termination time ...") + return ret
+ +
[docs] def create_database_binary(self, filetype="D3PLOT", dt=0, maxint=3, ieverp=0, dcomp=1, nintsld=1): + """Request binary output. + + Parameters + ---------- + filetype : str, optional + Type of file. The default is ``"D3PLOT"``. + dt : float, optional + Time interval between output states. The default is ``0``. + maxint : int, optional + Number of shell and thick shell through-thickness integration points + to output to the d3plot. The default is ``3``. + ieverp : int, optional + How to plot output states on plot files. The default is ``0``. Every output + state for the d3plot database is written to a separate file. Options are: + + - EQ.0: More than one state can be on each plot file. + - EQ.1: Only one state can be on each plot file. + + dcomp : int, optional + Data compression to eliminate rigid body data. The default is ``1``. + nintsld : int, optional + Number of solid element integration points written to the LS-DYNA database. + The default is ``1``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateDBBinary( + DBBinaryRequest( + filetype=filetype, + dt=dt, + maxint=maxint, + ieverp=ieverp, + dcomp=dcomp, + nintsld=nintsld, + ) + ) + logging.info("DB Binary Created...") + return ret
+ +
[docs] def create_database_ascii(self, type, dt=0.0, binary=1, lcur=0, ioopt=0): + """Obtain output files containing result information. + + Parameters + ---------- + type : string + Type of the database. Options are: + + - BNDOUT + - GLSTAT + - MATSUM + - NODFOR + - RCFORC + - SLEOUT + + dt : float, optional + Time interval between outputs. The default is ``0.0``. + binary : int, optional + Flag for whether to generate binary output. The default is ``1``. + lcur : int, optional + Curve ID specifying the time interval between outputs. The default + is ``0``. + ioopt : int, optional + Flag for governing the behavior of the output frequency load curve + defined by the ``lcur`` parameter. The default is ``0``. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + ret = self.stub.CreateDBAscii(DBAsciiRequest(type=type, dt=dt, binary=binary, lcur=lcur, ioopt=ioopt)) + logging.info("DB Ascii Created...") + return ret
+ +
[docs] def set_output_database( + self, + matsum=0, + glstat=0, + elout=0, + nodout=0, + nodfor=0, + rbdout=0, + rcforc=0, + secforc=0, + rwforc=0, + abstat=0, + bndout=0, + sleout=0, + sphmassflow=0, + ): + """Obtain output files containing result information. + + Parameters + ---------- + matsum : float, optional + Time interval between outputs of part energies. The default is ``0``. + glstat : float, optional + Time interval between outputs of global statistics + and energies. The default is ``0``. + elout : + nodout : + modfor : + rbdout : + secforc : + rwforce : + bndout : + sleout : + sphmassflow : + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + if matsum > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="MATSUM", dt=matsum, binary=1, lcur=0, ioopt=0)) + if glstat > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="GLSTAT", dt=glstat, binary=1, lcur=0, ioopt=0)) + if elout > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="ELOUT", dt=glstat, binary=1, lcur=0, ioopt=0)) + if nodout > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="NODOUT", dt=glstat, binary=1, lcur=0, ioopt=0)) + if rbdout > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="RBDOUT", dt=glstat, binary=1, lcur=0, ioopt=0)) + if rcforc > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="RCFORC", dt=glstat, binary=1, lcur=0, ioopt=0)) + if secforc > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="SECFORC", dt=glstat, binary=1, lcur=0, ioopt=0)) + if rwforc > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="RWFORC", dt=glstat, binary=1, lcur=0, ioopt=0)) + if abstat > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="ABSTAT", dt=glstat, binary=1, lcur=0, ioopt=0)) + if bndout > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="BNDOUT", dt=glstat, binary=1, lcur=0, ioopt=0)) + if nodfor > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="NODFOR", dt=glstat, binary=1, lcur=0, ioopt=0)) + if sleout > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="SLEOUT", dt=glstat, binary=1, lcur=0, ioopt=0)) + if sphmassflow > 0: + self.stub.CreateDBAscii(DBAsciiRequest(type="SPHMASSFLOW", dt=glstat, binary=1, lcur=0, ioopt=0)) + ret = 1 + logging.info("Output Setting...") + return ret
+ +
[docs] def save_file(self): + """Save keyword files. + + Returns + ------- + bool + ``True`` when successful, ``False`` when failed. + """ + + for obj in self.object_list: + obj.save_file() + + ret = self.stub.SaveFile(SaveFileRequest(name=self.mainname)) + msg = self.mainname + " is outputed..." + logging.info(msg) + return ret.outpath
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/errors.html b/version/0.3/_modules/ansys/dyna/core/pre/errors.html new file mode 100644 index 000000000..e2fbe5e03 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/errors.html @@ -0,0 +1,554 @@ + + + + + + + + + + ansys.dyna.core.pre.errors — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.errors

+"""Module containing PyDYNA-specific errors."""
+
+
+
[docs]SIGINT_TRACKER = []
+ + +
[docs]LOCKFILE_MSG = """ +Either another Ansys job with the same job name is already running in this +directory or the lock file has not been deleted from an abnormally +terminated Ansys run. + +Disable this check by passing ``override=True`` + +"""
+ + +
[docs]class VersionError(ValueError): + """Provides the error raised when the kwserver is invalid.""" + + def __init__(self, msg="Invalid kwserver version"): + ValueError.__init__(self, msg)
+ + +
[docs]class PydynaRuntimeError(RuntimeError): + """Provides the error raised when PyDYNA passes an error.""" + + pass
+ + +
[docs]class PydynaInvalidRoutineError(RuntimeError): + """Provides the error raised when MAPDL is in the wrong routine.""" + + def __init__(self, msg=""): + RuntimeError.__init__(self, msg)
+ + +
[docs]class LockFileException(RuntimeError): + """Provides the error raised when the lockfile has not been removed.""" + + def __init__(self, msg=LOCKFILE_MSG): + RuntimeError.__init__(self, msg)
+ + +
[docs]class KwserverDidNotStart(RuntimeError): + """Provides the error raised when the kwserver process does not start.""" + + def __init__(self, msg=""): + RuntimeError.__init__(self, msg)
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/examples/download_utilities.html b/version/0.3/_modules/ansys/dyna/core/pre/examples/download_utilities.html new file mode 100644 index 000000000..47370a4cc --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/examples/download_utilities.html @@ -0,0 +1,639 @@ + + + + + + + + + + ansys.dyna.core.pre.examples.download_utilities — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.examples.download_utilities

+import os
+from threading import Lock
+from typing import Optional
+from urllib.parse import urljoin
+import urllib.request
+
+import ansys.meshing.prime.internals.defaults as defaults
+
+__all__ = ["DownloadManager"]
+
+
+class DownloadManagerMeta(type):
+    """
+    Provides a thread-safe implementation of ``Singleton`` from
+    https://refactoring.guru/design-patterns/singleton/python/example#example-1.
+    """
+
+    _instances = {}
+    _lock: Lock = Lock()
+
+    def __call__(cls, *args, **kwargs):
+        """
+        Possible changes to the value of the ``__init__`` argument do not affect
+        the returned instance.
+        """
+        with cls._lock:
+            if cls not in cls._instances:
+                instance = super().__call__(*args, **kwargs)
+                cls._instances[cls] = instance
+        return cls._instances[cls]
+
+
+
[docs]class DownloadManager(metaclass=DownloadManagerMeta): + """Manages downloads of example files. + + Local paths are saved in this class so that a global cleanup + of example files can be performed when the client is closed. + """ + + def __init__(self): + self.downloads_list = [] + +
[docs] def add_file(self, file_path: str): + """Add the path for a downloaded example file to a list. + + This list keeps track of where example files are + downloaded so that a global cleanup of these files can be + performed when the client is closed. + + Parameters + ---------- + file_path : str + Local path of the downloaded example file. + """ + self.downloads_list.append(file_path)
+ +
[docs] def clear_download_cache(self): + """Remove downloaded example files from the local path.""" + for file in self.downloads_list: + os.remove(file) + self.downloads_list.clear()
+ +
[docs] def download_file( + self, filename: str, *directory: str, destination: Optional[str] = None, force: bool = False + ) -> str: + """Download an example file from the PyPrimeMesh repository. + + Parameters + ---------- + filename : str + Name of the example file to download. + destination : str, optional + Path to download the example file to. The default + is ``None``, in which case the default path for app data + is used. + force : bool, optional + Whether to always download the example file. The default is + ``False``, in which case if the example file is cached, it + is reused. + directory : tuple[str] + Path under the PyAnsys Github examples repository. + + Returns + ------- + tuple[str, str] + Tuple containing the filepath to use and the local filepath of the downloaded + directory. The two are different in case of containers. + + """ + # if destination is not a dir create it + if destination is not None and not os.path.isdir(destination): + os.mkdir(destination) + + # check if it was able to create the dir + if destination is not None and not os.path.isdir(destination): + raise ValueError("destination directory provided does not exist") + + url = self._get_filepath_on_default_server(filename, *directory) + local_path = self._retrieve_data(url, filename, dest=destination, force=force) + + # add path to downloaded files + self.add_file(local_path) + return local_path
+ + def _joinurl(self, base, *paths): + for path in paths: + if base[-1] != "/": + base += "/" + base = urljoin(base, path) + return base + + def _get_default_server_and_joiner(self): + return "https://github.com/ansys/example-data/raw/master", self._joinurl + + def _get_filepath_on_default_server(self, filename: str, *directory: str): + server, joiner = self._get_default_server_and_joiner() + if directory: + return joiner(server, *directory, filename) + else: + return joiner(server, filename) + + def _retrieve_url(self, url, dest): + saved_file, _ = urllib.request.urlretrieve(url, filename=dest) + return saved_file + + def _retrieve_data(self, url: str, filename: str, dest: str = None, force: bool = False): + if dest is None: + dest = defaults.get_examples_path() + local_path = os.path.join(dest, os.path.basename(filename)) + if not force and os.path.isfile(local_path): + return local_path + local_path = self._retrieve_url(url, local_path) + return local_path
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/examples/examples.html b/version/0.3/_modules/ansys/dyna/core/pre/examples/examples.html new file mode 100644 index 000000000..24584a857 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/examples/examples.html @@ -0,0 +1,556 @@ + + + + + + + + + + ansys.dyna.core.pre.examples.examples — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.examples.examples

+"""
+
+Result Files Examples
+=====================
+Examples result files.
+"""
+
+import inspect
+import os
+
+_module_path = os.path.dirname(inspect.getfile(inspect.currentframe()))
+
+# this files can be imported with from `ansys.dpf.core import examples`:
+
[docs]airbag_deploy = os.path.join(_module_path, "airbag", "airbag_deploy")
+# EM +
[docs]em_railgun = os.path.join(_module_path, "em", "em_railgun")
+
[docs]em_resistive_heating = os.path.join(_module_path, "em", "em_resistive_heating")
+
[docs]em_resistive_heating_2d = os.path.join(_module_path, "em", "em_resistive_heating_2d")
+
[docs]em_resistive_heating_2d_isopots = os.path.join(_module_path, "em", "em_resistive_heating_2d_isopots")
+
[docs]em_resistive_heating_2d_multi_isopots = os.path.join(_module_path, "em", "em_resistive_heating_2d_multi_isopots")
+
[docs]em_rlc_isopotential = os.path.join(_module_path, "em", "em_rlc_isopotential")
+
[docs]em_rlc_define_func = os.path.join(_module_path, "em", "em_rlc_define_func")
+ +
[docs]belted_dummy = os.path.join(_module_path, "explicit", "belted_dummy")
+
[docs]ball_plate = os.path.join(_module_path, "explicit", "ball_plate")
+# ICFD +
[docs]cylinder_flow = os.path.join(_module_path, "icfd", "cylinder_flow")
+
[docs]internal_3d_flow = os.path.join(_module_path, "icfd", "internal_3d_flow")
+
[docs]plate_flow = os.path.join(_module_path, "icfd", "plate_flow")
+
[docs]mesh_size = os.path.join(_module_path, "icfd", "mesh_size")
+
[docs]thermal_flow = os.path.join(_module_path, "icfd", "thermal_flow")
+
[docs]free_convection_flow = os.path.join(_module_path, "icfd", "free_convection_flow")
+
[docs]dam_break = os.path.join(_module_path, "icfd", "dam_break")
+
[docs]driven_cavity = os.path.join(_module_path, "icfd", "driven_cavity")
+
[docs]weak_fsi = os.path.join(_module_path, "icfd", "weak_fsi")
+
[docs]strong_fsi = os.path.join(_module_path, "icfd", "strong_fsi")
+
[docs]imposed_move = os.path.join(_module_path, "icfd", "imposed_move")
+
[docs]mesh_adaptivity = os.path.join(_module_path, "icfd", "mesh_adaptivity")
+
[docs]mesh_morphing = os.path.join(_module_path, "icfd", "mesh_morphing")
+
[docs]dem_coupling = os.path.join(_module_path, "icfd", "dem_coupling")
+
[docs]sloshing = os.path.join(_module_path, "icfd", "sloshing")
+ +
[docs]camry_rc = os.path.join(_module_path, "implicit", "camry_rc")
+
[docs]sale_efp = os.path.join(_module_path, "sale", "sale_efp")
+
[docs]isph_rigidtest = os.path.join(_module_path, "isph", "rigidtest")
+# NVH +
[docs]nvh_frf_plate_damping = os.path.join(_module_path, "nvh", "frf_plate_damping")
+
[docs]nvh_frf_solid = os.path.join(_module_path, "nvh", "frf_solid")
+ +
[docs]thermal_stress = os.path.join(_module_path, "thermal", "thermal_stress")
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/launcher.html b/version/0.3/_modules/ansys/dyna/core/pre/launcher.html new file mode 100644 index 000000000..db2f65666 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/launcher.html @@ -0,0 +1,680 @@ + + + + + + + + + + ansys.dyna.core.pre.launcher — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.launcher

+"""Module for launching the pre service locally."""
+
+import os
+import socket
+import subprocess
+import threading
+
+from ansys.dyna.core.pre import LOG
+from ansys.dyna.core.pre.misc import check_valid_ip, check_valid_port
+
+
[docs]LOCALHOST = "127.0.0.1"
+
[docs]DYNAPRE_DEFAULT_PORT = 50051
+ + +
[docs]def check_ports(port_range, ip="localhost"): + """Check the state of ports in a port range. + + Parameters + ---------- + port_range : + ip : str, optional + IP address. The default is ``"localhost"``, in which case + ``"127.0.0.1"``is used. + """ + ports = {} + for port in port_range: + ports[port] = port_in_use(port, ip) + return ports
+ + +
[docs]def port_in_use(port, host=LOCALHOST): + """ + Determine if a port is in use at a given host. + + Parameters + ---------- + port : int + Port. + host : + Host. The default is ``LOCALHOST``, in which case ``"127.0.0.1"`` + is used. + + Returns + ------- + ``True`` when a port is in use at the given host, ``False`` otherwise. + + Notes + ----- + The port must "bind" the address. Just checking if a socket can be created + is insufficient because it is possible to run into permission + errors like this one: + + "An attempt was made to access a socket in a way forbidden by its + access permissions." + """ + with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock: + try: + sock.bind((host, port)) + return False + except: + return True
+ + +
[docs]def launch_grpc(port=DYNAPRE_DEFAULT_PORT, ip=LOCALHOST, server_path=None) -> tuple: # pragma: no cover + """ + Launch the pre service locally in gRPC mode. + + Parameters + ---------- + port : int, optional + Port to launch the pre service on. The default is ``DYNAPRE_DEFAULT_PORT``. + The final port is the first port available after (or including) this + port. + ip : str, optional + IP address. The default is ``LOCALHOST``, in which case ``"127.0.0.1"`` + is used. + server_path : string, optional + Path to the pre service. The default is ``None``. + + Returns + ------- + int + Port number that the gRPC instance started on. + """ + LOG.debug("Starting 'launch_grpc'.") + + command = "python kwserver.py" + LOG.debug(f"Starting the pre service with command: {command}") + + # env_vars = update_env_vars(add_env_vars, replace_env_vars) + LOG.info(f"Running in {ip}:{port} the following command: '{command}'") + + LOG.debug("the pre service starting in background.") + process = subprocess.Popen(["python", "kwserver.py"], cwd=server_path, shell=True) + process.wait() + # while True: + # pass + return port
+ + +
[docs]class ServerThread(threading.Thread): + """Provides server thread properties. + + Parameters + ---------- + threadID : + port : + ip : + server_path : + + + """ + + def __init__(self, threadID, port, ip, server_path): + threading.Thread.__init__(self) + self.threadID = threadID + self.port = port + self.ip = ip + self.server_path = server_path + self.process = None + +
[docs] def run(self): + self.process = launch_grpc(ip=self.ip, port=self.port, server_path=self.server_path)
+ +
[docs] def termination(self): + self.process.termination()
+ + +
[docs]def launch_dynapre( + port=50051, + ip="localhost", +): + """ + Start the pre service locally. + + Parameters + ---------- + port : int, optional + Port to launch MAPDL gRPC on. The default is ``50051``. + ip : bool, optional + IP address or host name of the PyDYNA instance to connect to. + The default is ``"localhost"``, in which case ``"127.0.0.1"`` + is used. + + """ + + check_valid_ip(ip) # double check + + if port is None: + port = int(os.environ.get("PYDYNAPRE_PORT", DYNAPRE_DEFAULT_PORT)) + check_valid_port(port) + LOG.debug(f"Using default port {port}") + + if (ip.lower() == "localhost" or ip == LOCALHOST) and not DynaSolution.grpc_local_server_on(): + LOG.debug("Starting the pre service") + server_path = os.path.join(os.getcwd(), "../../src/ansys/dyna/core/pre/Server") + threadserver = ServerThread(1, port=port, ip=ip, server_path=server_path) + threadserver.setDaemon(True) + threadserver.start()
+ + # dynasln = DynaSolution( + # hostname = ip, + # port=port, + # ) + + # return dynasln + + +if __name__ == "__main__": +
[docs] server_path = os.path.join(os.getcwd(), "Server")
+ process = subprocess.Popen(["python", "kwserver.py"], cwd=server_path, shell=True) + process.wait() + process.terminate() + print(process) +
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/pre/misc.html b/version/0.3/_modules/ansys/dyna/core/pre/misc.html new file mode 100644 index 000000000..c4f32f584 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/pre/misc.html @@ -0,0 +1,709 @@ + + + + + + + + + + ansys.dyna.core.pre.misc — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.pre.misc

+"""Module providing miscellaneous functions and methods."""
+import inspect
+import os
+import random
+import socket
+import string
+import sys
+import tempfile
+
+# path of this module
+
[docs]MODULE_PATH = os.path.dirname(inspect.getfile(inspect.currentframe()))
+ + +
[docs]class Plain_Report: + def __init__(self, core, optional=None, additional=None, **kwargs): + """ + Provides the base class for a plain report. + + This class is based on the `scooby <https://github.com/banesullivan/scooby>`_ + package. + + Parameters + ---------- + core : iter[str] + Core packages to list first. + optional : iter[str], optional + List of packages to list if they are available. The default is ``None``. + If no packages are available, no warnings or errors are raised. + additional : iter[str], optional + List of packages or package names to add to the output information. + The default is ``None``. + **kwargs : dict + Dictionary of keyword arguments. + """ + + self.additional = additional + self.core = core + self.optional = optional + self.kwargs = kwargs + + if os.name == "posix": + self.core.extend(["pexpect"]) + + if self.optional is not None and sys.version_info[1] < 9: + self.optional.append("ansys_corba") + + # Information about the GPU - bare except in case there is a rendering + # bug that the user is trying to report. + if self.kwargs.get("gpu", False) and _HAS_PYVISTA: + from pyvista.utilities.errors import GPUInfo + + try: + self.kwargs["extra_meta"] = [(t[1], t[0]) for t in GPUInfo().get_info()] + except RuntimeError as e: # pragma: no cover + self.kwargs["extra_meta"] = ("GPU Details", f"Error: {str(e)}") + else: + self.kwargs["extra_meta"] = ("GPU Details", "None") + +
[docs] def get_version(self, package): + try: + import importlib.metadata as importlib_metadata + except ModuleNotFoundError: # pragma: no cover + import importlib_metadata + + try: + return importlib_metadata.version(package.replace(".", "-")) + except importlib_metadata.PackageNotFoundError: + return "Package not found"
+ +
[docs] def __repr__(self): + header = [ + "-" * 79, + "\n", + "PyMAPDL Software and Environment Report", + "\n", + "Packages Requirements", + "*********************", + ] + + core = ["\nCore packages", "-------------"] + core.extend([f"{each.ljust(20)}: {self.get_version(each)}" for each in self.core if self.get_version(each)]) + + if self.optional: + optional = ["\nOptional packages", "-----------------"] + optional.extend( + [f"{each.ljust(20)}: {self.get_version(each)}" for each in self.optional if self.get_version(each)] + ) + else: + optional = [""] + + if self.additional: + additional = ["\nAdditional packages", "-----------------"] + additional.extend( + [f"{each.ljust(20)}: {self.get_version(each)}" for each in self.additional if self.get_version(each)] + ) + else: + additional = [""] + + return "\n".join(header + core + optional + additional) + self.mapdl_info()
+ + +# Determine which type of report will be used (depending on the +# available packages) +
[docs]base_report_class = Plain_Report
+ + +
[docs]def is_float(input_string): + """Determine if a string can be converted to a float. + + Parameters + ---------- + input_string : str + String. + + Returns + ------- + ``True`` when the string can be converted to a float, ``False`` otherwise.""" + try: + float(input_string) + return True + except ValueError: + return False
+ + +
[docs]def random_string(stringLength=10, letters=string.ascii_lowercase): + """Generate a random string of a fixed length. + + Parameters + ---------- + stringLength : int, optional + Length of the string. The default is ``10``. + letters : + + """ + return "".join(random.choice(letters) for i in range(stringLength))
+ + +
[docs]def create_temp_dir(tmpdir=None): + """Create a unique working directory in a temporary directory. + + Parameters + ---------- + tempdir : str, optional + Name of the temporary directory to create the working + directory in. The default is ``None``. + + """ + if tmpdir is None: + tmpdir = tempfile.gettempdir() + elif not os.path.isdir(tmpdir): + os.makedirs(tmpdir) + + # running into a rare issue with MAPDL on Windows with "\n" being + # treated literally. + letters = string.ascii_lowercase.replace("n", "") + path = os.path.join(tmpdir, random_string(10, letters)) + + # in the *rare* case of a duplicate path + while os.path.isdir(path): + path = os.path.join(tempfile.gettempdir(), random_string(10, letters)) + + try: + os.mkdir(path) + except: + raise RuntimeError( + "Unable to create temporary working " "directory %s\n" % path + "Please specify run_location=" + ) + + return path
+ + +
[docs]def check_valid_ip(ip): + """Check if an IP address is valid. + + Parameters + ---------- + ip : + IP address. + """ + if ip.lower() != "localhost": + ip = ip.replace('"', "").replace("'", "") + socket.inet_aton(ip)
+ + +
[docs]def check_valid_port(port, lower_bound=1000, high_bound=60000): + """Check if a port is valid. + + Parameters + ---------- + port : int + Port. + lower_bound : int, optional + Lowest value for the port range. The default is ``1000``. + high_bound : int, optional + Highest value for the port range. The default is ``6000``. + """ + if not isinstance(port, int): + raise ValueError("The 'port' parameter should be an integer.") + + if lower_bound < port < high_bound: + return + else: + raise ValueError(f"'port' values should be between {lower_bound} and {high_bound}.")
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/solver/dynasolver.html b/version/0.3/_modules/ansys/dyna/core/solver/dynasolver.html new file mode 100644 index 000000000..2f04ab2f2 --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/solver/dynasolver.html @@ -0,0 +1,1200 @@ + + + + + + + + + + ansys.dyna.core.solver.dynasolver — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.solver.dynasolver

+"""
+Dyna solver
+===========
+
+Module for defining the PyDNYA ``solver`` service.
+"""
+
+import logging
+import os
+import queue
+import sys
+import threading
+
+from ansys.api.dyna.v0 import dynasolver_pb2, dynasolver_pb2_grpc
+import grpc
+
+from . import grpc_tags as tag
+
+#
+# Define our own exceptions
+#
+
+
+
[docs]class RunningError(Exception): + """Documentation missing.""" + + pass
+ + +
[docs]class NotFound(Exception): + """Documentation missing.""" + + pass
+ + +
[docs]class UnexpectedResponse(Exception): + """Documentation missing.""" + + pass
+ + +# + + +
[docs]class DynaSolver: + """Provides the gRPC client-side of Ansys LS-DYNA. + + Parameters + ---------- + hostname : string + Host name or IP address to connect to. + port : string + Port the gRPC server is to listen on. + + Returns + ------- + An instance of the client, which can be used to communicate + with the gRPC server running at the given host name and port. + The client can then interact with LS-DYNA via gRPC. + """ + + # logger = None + def __init__(self, hostname, port): + """Create a client instance connected to the host name (or IP address) and port.""" + self.hostname = hostname + self.port = port + self.channel = grpc.insecure_channel(hostname + ":" + port) + self.stub = dynasolver_pb2_grpc.DynaSolverCommStub(self.channel) + # if DynaSolver.logger is None: + # DynaSolver.logger = logging.getLogger("DynaSolver") + # DynaSolver.logger.setLevel(logging.INFO) + # fh = logging.FileHandler('DynaSolver.log') + # fm = logging.Formatter('%(asctime)s - %(name)s - %(message)s', + # '%m/%d/%Y %H:%M:%S') + # fh.setFormatter(fm) + # DynaSolver.logger.addHandler(fh) + # DynaSolver.logger.propagate = False + # self.logger = DynaSolver.logger + self.logger = logging.getLogger("DynaSolver") + + def _argcheck(self, cmd, ngiven, nrequired): + """Internally used routine for checking command argument counts + when using the generic ``send`` method.""" + if ngiven < nrequired: + s = "Bad input for command %s:" % cmd + s = s + ("At least %d arguments are required, but only %d " "were given" % (nrequired, ngiven)) + self.logger.warning(s) + return 0 + return 1 + + def _check_return(self, response): + """Internally used routine for checking the command response.""" + if response.tag == tag.ACK: + return + if response.tag == tag.NOTRUNNING: + raise RunningError("LSDYNA is not running") + if response.tag == tag.RUNNING: + raise RunningError("LSDYNA is already running") + if response.tag == tag.NOTFOUND: + raise NotFound("Requested %s (%s) not found" % (self.itemtype, self.itemname)) + raise UnexpectedResponse("Unknown return value %d" % response.tag) + return + + def _set_client_log_level(self, levelname): + """Internally used routine to set the logging level on the client.""" + if levelname in ("DEBUG", "INFO", "WARNING", "ERROR"): + self.logger.setLevel(levelname) + else: + self.logger.setLevel("INFO") + self.logger.info("Invalid log level %s specified, reset to INFO" % levelname) + + def _set_server_log_level(self, levelname): + """Internally used routine to set the logging level on the server.""" + request = dynasolver_pb2.LogLevel() + request.level = bytes(levelname, "utf-8") + self.stub.log_level(request) + + def _set_log_level(self, levelname): + """Internally used routine to set the logging level of both the + server and the client.""" + self._set_client_log_level(levelname) + self._set_server_log_level(levelname) + +
[docs] def list_files(self, subname=None): + """Get size information about one or more files in the LS-DYNA + working directory. + + Parameters + ---------- + subname : string, default : None + If given, only files whose names contain subname as a substring are + returned. This check is case insensitive. + + Returns + ------- + Array of (filename, size in bytes) pairs. + """ + self.logger.debug("list_files: subname=%s" % subname) + request = dynasolver_pb2.DynaSolverFileRequest() + if subname: + request.name = bytes(subname, "utf-8") + response = self.stub.list_files(request) + ret = [] + n = len(response.name) + for i in range(n): + ret.append((str(response.name[i], "utf-8"), response.size[i])) + return ret
+ +
[docs] def node(self, n): + """Get size information about a node in the model's working directory. + + Parameters + ---------- + n : integer + User ID of a node in the model. + + Returns + ------- + A pair of 3-tuples are returned, giving the ``(x, y, z)`` coordinates and + velocities of the node. If the node number given does not exist + in the model, then ``(None, None)`` is returned. + """ + self.logger.debug("node: %d" % n) + request = dynasolver_pb2.DynaSolverRelay() + request.tag = tag.NODE + self.itemtype = "node" + self.itemname = "%d" % n + request.i8.append(n) + response = self.stub.send_request(request) + if response.tag == tag.NODE: + X = tuple(response.r8[0:3]) + V = tuple(response.r8[3:6]) + return (X, V) + self._check_return(response) + return (None, None)
+ +
[docs] def pause(self): + """Pause LS-DYNA execution. + + Execution stops until told to resume or quit. Most ``switch``" + commands result in one cycle being executed so that the switch can + be handled, and then LS-DYNA pauses again. + """ + self.logger.debug("pause") + request = dynasolver_pb2.DynaSolverRelay() + request.tag = tag.PAUSE + response = self.stub.send_request(request) + self._check_return(response) + return
+ +
[docs] def pull(self, fname): + """Provide an alias for the ``download`` method for backward compatibility.""" + return self.download(fname)
+ +
[docs] def download(self, fname): + """Download a file from the gRPC server. + + Parameters + ---------- + fname : string + Name of the file to download. The file is downloaded to the current + working directory of the calling process. The file name should not + begin with a leading ``/``. The file is interpreted relative to the + LS-DYNA working directory. + + Returns + ------- + int + Number of bytes received. + """ + self.logger.debug("download: %s" % fname) + # + # This makes a single request, but gets a stream of data back. + # + request = dynasolver_pb2.DynaSolverFileRequest(name=bytes(fname, "utf-8")) + response_iterator = self.stub.download_file(request) + fp = open(fname, "wb") + fsize = 0 + for response in response_iterator: # process all returned packets + fp.write(response.b) + fsize = fsize + len(response.b) + fp.close() + return fsize
+ +
[docs] def push(self, fname): + """Provide an alias for the ``upload` method for backward compatibility.""" + return self.upload(fname)
+ +
[docs] def upload(self, fname): + """Upload a file to the LS-DYNA working directory. + + Parameters + ---------- + fname : string + Name of the local file to upload. The contents of this file are copied + into the LS-DYNA working directory in a file of the same name, but + with any path components removed. + + Returns + ------- + int + Number of bytes sent. + """ + # + # This request sends a stream of data to the server and + # gets a single response back. + # + # First packet contains the filename. The rest hold the contents. + # + self.logger.debug("upload: %s" % fname) + fsize = 0 + + def push_packets(fname): + nonlocal fsize + request = dynasolver_pb2.DynaSolverFileData() + # Only send the base file name, not the whole path! + bfname = os.path.split(fname)[1] + request.b = bytes(bfname, "utf-8") + yield request + fp = open(fname, "rb") + blocksize = 1000000 + n = blocksize + while n == blocksize: + request = dynasolver_pb2.DynaSolverFileData() + request.b = fp.read(blocksize) + n = len(request.b) + fsize = fsize + n + yield request + fp.close() + + # + # Now use that generator to push a stream of packets to the server. + # + self.stub.upload_file(push_packets(fname)) + return fsize
+ +
[docs] def quit(self): + """Terminate the gRPC server program. This does not terminate LS-DYNA. + + If the server is running inside a container, it ignore this + command and continues running. + """ + self.logger.debug("quit") + request = dynasolver_pb2.QuitServer() + # ALWAYS returns ACK, so don't bother checking + self.stub.quit_server(request) + return
+ +
[docs] def resume(self, cycle=None, time=None): + """Resume execution. + + Parameters + ---------- + cycle : integer, optional + Cycle to pause execution on. The default is ``None``. + time : float, optional + Ssimulation time to pause execution at. The default is ``None``. + + This command can be given whether LS-DYNA is paused or running. + LS-DYNA runs until the given cycle number or simulation time. If + both are given, it stops based on whichever occurs first. If + neither are given, it runs until termination or until paused. + """ + if cycle: + cc = "cycle=%d " % cycle + else: + cc = "cycle=None " + if time: + tt = "time=%f" % time + else: + tt = "time=None" + self.logger.debug("resume: " + cc + tt) + request = dynasolver_pb2.DynaSolverRelay() + request.tag = tag.RESUME + try: + if cycle: + request.i8.append(cycle) + except TypeError: + raise TypeError("resume: Cycle must be an integer, or None") + try: + if time: + request.r8.append(time) + except TypeError: + raise TypeError("resume: Time must be a number, or None") + response = self.stub.send_request(request) + self._check_return(response) + return
+ +
[docs] def run(self, args): + """Begin execution with the given string as the command-line arguments. + + Parameters + ---------- + args : str + Command line to pass to LS-DYNA. + """ + self.logger.debug("run: %s" % args) + request = dynasolver_pb2.DynaSolverRelay() + request.tag = tag.RUN + request.b = bytes(args, "utf-8") + response = self.stub.send_request(request) + self._check_return(response) + return
+ +
[docs] def setlc(self, lc, value): + """Set a load curve to a constant value. + + Parameters + ---------- + lc : int + User ID of the load curve to set. + value : float + Value to set the load curve to. + """ + self.logger.debug("setlc: %d %f" % (lc, value)) + request = dynasolver_pb2.DynaSolverRelay() + request.tag = tag.SETLC + try: + request.i8.append(lc) + except TypeError: + raise TypeError("setlc: Loadcurve ID must be an integer") + try: + request.r8.append(value) + except TypeError: + raise TypeError("setlc: Value must be a number") + self.itemtype = "loadcurve" + self.itemname = "%d" % lc + response = self.stub.send_request(request) + self._check_return(response) + return
+ +
[docs] def start(self, nproc): + """Start LS-DYNA. + + The program starts and awaits further input. To begin a + simulation, the ``run`` command must used to send the command line + arguments. + + After starting but before running, a ``resume`` command can be sent to + set a pause time or cycle. + + Parameters + ---------- + nproc : int + Number of cores (MPI ranks) to run. + """ + self.logger.debug("start: %d" % nproc) + request = dynasolver_pb2.DynaSolverStart() + request.exename = b"mppdyna" + request.nproc = nproc + response = self.stub.start_solver(request) + if response.status == tag.RUNNING: + raise RunningError("LSDYNA is already running") + return
+ +
[docs] def switch(self, args): + """Send a "sense switch" to LS-DYNA. + + Parameters + ---------- + args : str + Sense switch string. + + Returns + ------- + If the switch sent is ``sw2.``, a string is returned with the + usual status update information that a switch generates. Otherwise, + an empty string is returned. + """ + self.logger.debug("switch: %s" % args) + request = dynasolver_pb2.DynaSolverRelay() + request.tag = tag.SWITCH + request.b = bytes(args, "utf-8") + response = self.stub.send_request(request) + if response.tag == tag.SWITCH: + return str(response.b, "utf-8") + self._check_return(response) + return ""
+ +
[docs] def tail(self, which=1, how=2, queuesize=0): + """Monitor the stdout or stderr of the running job. + + Parameters + ---------- + which : int, optional + Which stream to monitor. The default is ``1``, in which case + stdout is used. Otherwise, stderr is used. + how : int, optional + How to handle the file data. The default is ``2``. Options are: + + - 0: The file contents are printed to stdout, and this + method does not return until LS-DYNA terminates. + - 1: A ``Queue`` instance is returned. The queue holds raw blocks + of text as returned by the server. + - 2: A ``Queue`` instance is returned.The queue holds individual + lines of text. + + queuesize : int, optional + Size to use for the ``Queue`` instance if the ``how`` parameter is set to + a value greater than ``0``. + + Returns + ------- + If the value for the ``how`` parameter is greater than 0, a ``Queue instance`` + is returned. When a call to the ``q.get()`` method returns ``None``, all data + has been returned. + """ + self.logger.debug("tail: which=%d, how=%d, queuesize=%d" % (which, how, queuesize)) + # + # If how > 0, we don't want to block. So create another DynaSolver + # and start the real communication work inside another thread + # + if how > 0: + q = queue.Queue(maxsize=queuesize) + con2 = DynaSolver(self.hostname, self.port) + t = threading.Thread(target=con2._tail2, args=(which, q, how), daemon=True) + t.start() + return q + # + # This makes a single request, but gets a stream of data back. + # + request = dynasolver_pb2.DynaSolverTailRequest(which=which) + response_iterator = self.stub.tail_file(request) + for response in response_iterator: # process all returned packets + sys.stdout.write(str(response.b, "utf-8")) + sys.stdout.flush()
+ + def _tail2(self, which, q, how): + """Read packets of stdout or stderr data and place them in a queue. + + Parameters + ---------- + which : int + Which stream to monitor. If ``which=1``, + stdout is used. Otherwise, stderr is used. + q : + Queue to place data in. + how : int + How to process the data. Options are: + + - 1: Place each received packet into the queue as a string. + - 2: Convert the received data to individual lines of text + and put those in the queue. + """ + # + # This makes a single request, but it gets a stream of data back. + # + request = dynasolver_pb2.DynaSolverTailRequest(which=which) + response_iterator = self.stub.tail_file(request) + if how == 1: + for response in response_iterator: # process all returned packets + q.put(str(response.b, "utf-8")) + q.put(None) + # + # Actual text lines might be split across responses, so if there is + # a partial text line (not ending in ``\n``), pull it off the end and put + # it on the front of the next response that arrives. + # + else: + lastline = "" + for response in response_iterator: # process all returned packets + buf = str(response.b, "utf-8") + ret = (lastline + buf).split("\n") + lastline = ret.pop() + for line in ret: + q.put(line) + # This should only happen if the file did not terminate with a ``\n`` + if lastline: + q.put(lastline) + # So the caller knows the difference between "the queue is empty + # but more data is expected" and "No more data is coming", we + # put this on the queue after all data has arrived + q.put(None) + +
[docs] def time(self): + """Get the current cycle count and simulation time. + + Returns + ------- + A (cycle_count, simulation_time) pair. + """ + self.logger.debug("time") + request = dynasolver_pb2.DynaSolverRelay() + request.tag = tag.TIME + response = self.stub.send_request(request) + if response.tag == tag.TIME: + return (response.i8[0], response.r8[0]) + self._check_return(response) + return (None, None)
+ +
[docs] def send(self, cmdin): + """Send one request to LS-DYNA using the command-line interface. + + Parameters + ---------- + cmdin : string + Command to send. + + Returns + ------- + None + There is no data returned. Data that is returned from the underlying + method call is just printed to the screen. This method is used to + support the sample interactive ``client.py`` program. + + +-------------------------------------------+-----------------------+ + | Description | Example | + +===========================================+=======================+ + | "list" then optional file name | list d3plot | + +-------------------------------------------+-----------------------+ + | "list" then optional file name | list d3plot | + +-------------------------------------------+-----------------------+ + | "node" user node number | node 43444 | + +-------------------------------------------+-----------------------+ + | "pause" (no arguments) | pause | + +-------------------------------------------+-----------------------+ + | "download" then file name | download glstat | + +-------------------------------------------+-----------------------+ + | "upload" then file name | upload input.k | + +-------------------------------------------+-----------------------+ + | "quit" (no arguments) | quit | + +-------------------------------------------+-----------------------+ + | "resume" optional cycle and/or time | resume 5000 0.25 | + +-------------------------------------------+-----------------------+ + | "run" then the command line | run i=input.k jobid=xx| + +-------------------------------------------+-----------------------+ + | "setlc" user load curve number and value | setlc 1075 0.245 | + +-------------------------------------------+-----------------------+ + | "start" number of processors | start 5 | + +-------------------------------------------+-----------------------+ + | "switch" then switch text | switch sw2 | + +-------------------------------------------+-----------------------+ + | "tail" then 1 for stdout, 2 for stderr | tail 1 | + +-------------------------------------------+-----------------------+ + | "time" (no arguments) | time. | + +-------------------------------------------+-----------------------+ + + """ + self.logger.debug("send: %s" % cmdin) + try: + (cmd, args) = cmdin.split(None, 1) + except ValueError: + cmd = cmdin + args = "" + sargs = args.split() + nsargs = len(sargs) + # + if cmd == "list": + if nsargs > 0: + finfo = self.list_files(sargs[0]) + else: + finfo = self.list_files() + # To make things pretty, find a reasonable formatting to use + max1 = 0 + max2 = 0 + for dat in finfo: + n1 = len("%s" % dat[0]) + n2 = len("%d" % dat[1]) + if n1 > max1: + max1 = n1 + if n2 > max2: + max2 = n2 + fmt = "%%-%ds %%%dd" % (max1, max2) + for dat in finfo: + print(fmt % dat) + elif cmd == "node": + if not self._argcheck("node", nsargs, 1): + return + try: + (a, b) = self.node(int(sargs[0])) + except NotFound as err: + print(err) + else: + if a: + print("X=%.10e %.10e %.10e" % a) + print("V=%.10e %.10e %.10e" % b) + elif cmd == "pause": + self.pause() + elif cmd == "pull" or cmd == "download": + if not self._argcheck("download", nsargs, 1): + return + flen = self.download(sargs[0]) + print("Downloaded %d bytes" % flen) + elif cmd == "push" or cmd == "upload": + if not self._argcheck("upload", nsargs, 1): + return + flen = self.upload(sargs[0]) + print("Uploaded %d bytes" % flen) + elif cmd == "quit": + self.quit() + sys.exit(0) + elif cmd == "resume": + c = None + t = None + for a in sargs: + if a.find(".") >= 0: + t = float(a) + else: + c = int(a) + self.resume(c, t) + elif cmd == "run": + if not self._argcheck("run", nsargs, 1): + return + self.run(args) + elif cmd == "setlc": + if not self._argcheck("setlc", nsargs, 2): + return + try: + self.setlc(int(sargs[0]), float(sargs[1])) + except NotFound as err: + print(err) + elif cmd == "start": + if not self._argcheck("start", nsargs, 1): + return + nproc = int(sargs[0]) + try: + self.start(nproc) + except RunningError as err: + print(err) + elif cmd == "switch": + if not self._argcheck("switch", nsargs, 1): + return + s = self.switch(args) + print(s) + elif cmd == "tail": + if not self._argcheck("tail", nsargs, 1): + return + self.tail(int(sargs[0]), how=0) + elif cmd == "time": + (a, b) = self.time() + if a: + print("Simulation cycle=%d, time=%.10e" % (a, b)) + else: + print("Unknown command") + return + return
+ +
[docs] def runfile(self, fname): + """ + Read command lines from a file and execute them. + + Each line is read from the file and echoed to the screen. You + must hit the **enter** key to trigger execution of the command. + + Parameters + ---------- + fname : str + File to read commands from. + """ + f = open(fname, "r") + cmds = [x.strip() for x in f.readlines()] + f.close() + for cmdin in cmds: + input("> %s " % cmdin) + self.send(cmdin)
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/ansys/dyna/core/solver/grpc_tags.html b/version/0.3/_modules/ansys/dyna/core/solver/grpc_tags.html new file mode 100644 index 000000000..8cb8dd88b --- /dev/null +++ b/version/0.3/_modules/ansys/dyna/core/solver/grpc_tags.html @@ -0,0 +1,539 @@ + + + + + + + + + + ansys.dyna.core.solver.grpc_tags — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + +
+
+ +
+ + + + + +
+ +

Source code for ansys.dyna.core.solver.grpc_tags

+#
+# Tags for requests to DYNA
+#
+# The format here kind of sucks, but you can blame PEP8/flake8 for
+# that because it INSISTS on having EXACTLY 1 space before and after
+# the = signs, so I can't line them up unless I make all the tag names
+# the same number of characters long.  This would be much more readable:
+#
+# SWITCH = 1
+# RUN    = 2
+# CWD    = 3
+# PAUSE  = 4
+#
+# But no, that is not PEP8 compliant.
+#
+# At least it lets me line up my comments, provided they have at least TWO
+# spaces before the #.
+#
+
[docs]SWITCH = 1 # sense switch
+
[docs]RUN = 2 # send command line arguments & begin execution
+
[docs]CWD = 3 # server sends to DYNA to find its working directory
+
[docs]PAUSE = 4 # pause until told to resume
+
[docs]TIME = 5 # return simulation time
+
[docs]RESUME = 6 # resume (until optional cycle/time)
+
[docs]REQUIRES_SYNC = 1000 # values above here require MPP synchorinzation
+
[docs]NODE = 1001 # return (pos, vel) for a node
+
[docs]SETLC = 1002 # set the value of a load curve to a supplied constant
+# +# Possible return codes: +# +
[docs]ACK = 0 # Success
+
[docs]NOTRUNNING = 1 # Dyna is not running (used by server, not DYNA)
+
[docs]RUNNING = 2 # Dyna is already running (used by server, not DYNA)
+
[docs]NOTFOUND = 3 # requested item not found
+
+ +
+ + + +
+ + + + +
+
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_modules/index.html b/version/0.3/_modules/index.html new file mode 100644 index 000000000..e9bc788a2 --- /dev/null +++ b/version/0.3/_modules/index.html @@ -0,0 +1,524 @@ + + + + + + + + + + Overview: module code — PyDYNA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ + +
+
+ + +
+
+
+ + +
+
+ +
+
+ +
+ + + + + + + + + + + +
+ +
+ + + +
+ +
+ +
+
+
+ + + + + +
+ + +
+ + \ No newline at end of file diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/index.rst.txt new file mode 100644 index 000000000..b4f2bb91b --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/index.rst.txt @@ -0,0 +1,23 @@ +:py:mod:`ansys.dyna.core` +========================= + +.. py:module:: ansys.dyna.core + + +Subpackages +----------- +.. toctree:: + :titlesonly: + :maxdepth: 3 + + pre/index.rst + solver/index.rst + + +Package Contents +---------------- + +.. py:data:: __version__ + + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynabase/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynabase/index.rst.txt new file mode 100644 index 000000000..6212f1b82 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynabase/index.rst.txt @@ -0,0 +1,5128 @@ +:py:mod:`ansys.dyna.core.pre.dynabase` +====================================== + +.. py:module:: ansys.dyna.core.pre.dynabase + +.. autoapi-nested-parse:: + + Base + ==== + + Module for creating a DYNA input deck. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynabase.Motion + ansys.dyna.core.pre.dynabase.DOF + ansys.dyna.core.pre.dynabase.Switch + ansys.dyna.core.pre.dynabase.InvariantNode + ansys.dyna.core.pre.dynabase.EnergyFlag + ansys.dyna.core.pre.dynabase.HourglassControl + ansys.dyna.core.pre.dynabase.BulkViscosity + ansys.dyna.core.pre.dynabase.CaseType + ansys.dyna.core.pre.dynabase.OutputEcho + ansys.dyna.core.pre.dynabase.Box + ansys.dyna.core.pre.dynabase.Curve + ansys.dyna.core.pre.dynabase.Function + ansys.dyna.core.pre.dynabase.Table2D + ansys.dyna.core.pre.dynabase.Point + ansys.dyna.core.pre.dynabase.Direction + ansys.dyna.core.pre.dynabase.Transform + ansys.dyna.core.pre.dynabase.Velocity + ansys.dyna.core.pre.dynabase.RotVelocity + ansys.dyna.core.pre.dynabase.DynaBase + ansys.dyna.core.pre.dynabase.BaseSet + ansys.dyna.core.pre.dynabase.NodeSet + ansys.dyna.core.pre.dynabase.SetType + ansys.dyna.core.pre.dynabase.NodesetGeneral + ansys.dyna.core.pre.dynabase.NodeSetBox + ansys.dyna.core.pre.dynabase.PartSet + ansys.dyna.core.pre.dynabase.SegmentSet + ansys.dyna.core.pre.dynabase.BeamFormulation + ansys.dyna.core.pre.dynabase.ShellFormulation + ansys.dyna.core.pre.dynabase.IGAFormulation + ansys.dyna.core.pre.dynabase.SolidFormulation + ansys.dyna.core.pre.dynabase.HourglassType + ansys.dyna.core.pre.dynabase.BeamSection + ansys.dyna.core.pre.dynabase.ShellSection + ansys.dyna.core.pre.dynabase.IGASection + ansys.dyna.core.pre.dynabase.Part + ansys.dyna.core.pre.dynabase.BeamPart + ansys.dyna.core.pre.dynabase.ShellPart + ansys.dyna.core.pre.dynabase.IGAPart + ansys.dyna.core.pre.dynabase.SolidPart + ansys.dyna.core.pre.dynabase.DRO + ansys.dyna.core.pre.dynabase.DiscretePart + ansys.dyna.core.pre.dynabase.Parts + ansys.dyna.core.pre.dynabase.AnalysisType + ansys.dyna.core.pre.dynabase.TimestepCtrol + ansys.dyna.core.pre.dynabase.Integration + ansys.dyna.core.pre.dynabase.ImplicitAnalysis + ansys.dyna.core.pre.dynabase.ThermalAnalysisType + ansys.dyna.core.pre.dynabase.ThermalAnalysisTimestep + ansys.dyna.core.pre.dynabase.ThermalAnalysis + ansys.dyna.core.pre.dynabase.ContactCategory + ansys.dyna.core.pre.dynabase.ContactType + ansys.dyna.core.pre.dynabase.OffsetType + ansys.dyna.core.pre.dynabase.ContactFormulation + ansys.dyna.core.pre.dynabase.SBOPT + ansys.dyna.core.pre.dynabase.ContactSurface + ansys.dyna.core.pre.dynabase.Contact + ansys.dyna.core.pre.dynabase.ContactGroup + ansys.dyna.core.pre.dynabase.Constraint + ansys.dyna.core.pre.dynabase.BoundaryCondition + ansys.dyna.core.pre.dynabase.InitialCondition + ansys.dyna.core.pre.dynabase.RigidwallCylinder + ansys.dyna.core.pre.dynabase.RigidwallPlanar + ansys.dyna.core.pre.dynabase.GravityOption + ansys.dyna.core.pre.dynabase.Gravity + + + + +.. py:class:: Motion + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: VELOCITY + :value: 0 + + + + .. py:attribute:: ACCELERATION + :value: 1 + + + + .. py:attribute:: DISPLACEMENT + :value: 2 + + + + +.. py:class:: DOF + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: X_TRANSLATIONAL + :value: 1 + + + + .. py:attribute:: Y_TRANSLATIONAL + :value: 2 + + + + .. py:attribute:: Z_TRANSLATIONAL + :value: 3 + + + + .. py:attribute:: X_ROTATIONAL + :value: 5 + + + + .. py:attribute:: Y_ROTATIONAL + :value: 6 + + + + .. py:attribute:: Z_ROTATIONAL + :value: 7 + + + + +.. py:class:: Switch + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: OFF + :value: 0 + + + + .. py:attribute:: ON + :value: 1 + + + + +.. py:class:: InvariantNode + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: OFF + :value: 1 + + + + .. py:attribute:: ON_FOR_SHELL_TSHELL + :value: 2 + + + + .. py:attribute:: ON_FOR_SOLID + :value: 3 + + + + .. py:attribute:: ON_FOR_SHELL_TSHELL_SOLID + :value: 4 + + + + +.. py:class:: EnergyFlag + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: NOT_COMPUTED + :value: 1 + + + + .. py:attribute:: COMPUTED + :value: 2 + + + + +.. py:class:: HourglassControl + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: STANDARD_VISCOSITY_FORM + :value: 1 + + + + .. py:attribute:: FLANAGAN_BELYTSCHKO_INTEGRATION_SOLID + :value: 2 + + + + +.. py:class:: BulkViscosity + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: STANDARD_BULK_VISCOSITY + :value: 1 + + + + .. py:attribute:: RICHARDS_WILKINS_BULK_VISCOSITY + :value: 2 + + + + .. py:attribute:: COMPUTE_INTERNAL_ENERGY_DISSIPATED + + + + +.. py:class:: CaseType + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: STRUCTURE + :value: 1 + + + + .. py:attribute:: ICFD + :value: 2 + + + + .. py:attribute:: SALE + :value: 3 + + + + .. py:attribute:: EM + :value: 4 + + + + .. py:attribute:: IGA + :value: 5 + + + + +.. py:class:: OutputEcho + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: ALL_DATA_PRINTED + :value: 0 + + + + .. py:attribute:: SUPPRESSED_NODAL_PRINTING + :value: 1 + + + + .. py:attribute:: SUPPRESSED_ELEMENT_PRINTING + :value: 2 + + + + .. py:attribute:: SUPPRESSED_NODAL_AND_ELEMENT_PRINTING + :value: 3 + + + + +.. py:class:: Box(xmin=0, xmax=0, ymin=0, ymax=0, zmin=0, zmax=0) + + + + Defines a box-shaped volume. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create box. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Curve(sfo=1, x=[], y=[], func=None, title='') + + + + Defines a curve as a function of time. + + For example, ``load (ordinate value)``. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub=None) + + + Create a curve. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Function(Function=None) + + + + Defines a function that can be referenced by a limited number of keyword options. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create function. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Table2D(title='') + + + + Define a table,a curve ID is specified for each value defined in the table. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: append(value=0, curve=None) + + + .. py:method:: create(stub=None) + + + Create Table2D. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Point(x=0, y=0, z=0) + + + + Defines a point. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: Direction(x=0, y=0, z=0) + + + + Defines a direction. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: Transform(option=None, param1=0, param2=0, param3=0, param4=0, param5=0, param6=0, param7=0) + + + + Defines a transformation. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: add_transform(option=None, param1=0, param2=0, param3=0, param4=0, param5=0, param6=0, param7=0) + + + Defines a transformation matrix. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create(stub) + + + Create a transformation. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Velocity(x=0, y=0, z=0) + + + + Defines a translational velocity. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: RotVelocity(x=0, y=0, z=0) + + + + Defines a rotational velocity. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: DynaBase + + + + Contains methods for creating a general LS-DYNA keyword. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: get_stub() + + + Get the stub of the ``DynaBase`` object. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_timestep(tssfac=0.9, isdo=0, timestep_size_for_mass_scaled=0.0, max_timestep=None) + + + Set the structural time step size control using different options. + + + :Parameters: + + **tssfac** : :class:`python:float`, :obj:`optional` + Scale factor for computed time step. The default is ``0.9``. + + **isdo** : :class:`python:int`, :obj:`optional` + Basis of the time size calculation for four-node shell elements. + The default is ``0``. + + **timestep_size_for_mass_scaled** : :class:`python:float`, :obj:`optional` + Time step size for mass scaled solutions. The default is ``0.0``. + + **max_timestep** : :obj:`Curve`, :obj:`optional` + Load curve that limits the maximum time step size. The default + is ``None``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_accuracy(objective_stress_updates=Switch.OFF, invariant_node_number=InvariantNode.OFF, partsetid_for_objective_stress_updates=0, implicit_accuracy_flag=Switch.OFF, explicit_accuracy_flag=Switch.OFF) + + + Define control parameters that can improve the accuracy of the calculation. + + + :Parameters: + + **objective_stress_updates** : :class:`python:int` + Global flag for 2nd order objective stress updates. + + **invariant_node_number** : :class:`python:int` + Invariant node numbering for shell and solid elements. + + **partsetid_for_objective_stress_updates** : :class:`python:int`, :obj:`optional` + Part set ID for objective stress updates. The default is ``0``. + + **implicit_accuracy_flag** : :class:`python:int` + Implicit accuracy flag. + + **explicit_accuracy_flag** : :class:`python:float` + Explicit accuracy parameter. + + - EQ.0.0: Off + - GT.0.0: On + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_energy(hourglass_energy=EnergyFlag.NOT_COMPUTED, rigidwall_energy=EnergyFlag.COMPUTED, sliding_interface_energy=EnergyFlag.NOT_COMPUTED, rayleigh_energy=EnergyFlag.NOT_COMPUTED, initial_reference_geometry_energy=EnergyFlag.COMPUTED) + + + Provide controls for energy dissipation options. + + + :Parameters: + + **hourglass_energy** : :obj:`enum` + Hourglass energy calculation option. + + **rigidwall_energy** : :class:`python:int` + Rigidwall energy dissipation option. + + - EQ.1: Energy dissipation is not computed. + - EQ.2: Energy dissipation is computed. + + **sliding_interface_energy** : :class:`python:int` + Sliding interface energy dissipation option. + + - EQ.1: Energy dissipation is not computed. + - EQ.2: Energy dissipation is computed. + + **rayleigh_energy** : :class:`python:int` + Rayleigh energy dissipation option. + + - EQ.1: Energy dissipation is not computed. + - EQ.2: Energy dissipation is computed. + + **initial_reference_geometry_energy** : :class:`python:int` + Initial reference geometry energy option. + + - EQ.1: Initial reference geometry energy is not computed. + - EQ.2: Initial reference geometry energy is computed. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_output(print_suppression_d3hsp=False, print_suppression_echo=OutputEcho.ALL_DATA_PRINTED) + + + Set miscellaneous output parameters. + + + :Parameters: + + **print_suppression_d3hsp** : :ref:`bool `, :obj:`optional` + Whether to suppress printing during the input phase flag for the D3HSP file. + The default is ``True``, which means that none of these are printed: nodal + coordinates, element connectivities, rigid wall definitions, nodal SPCs, + initial velocities, initial strains, adaptive constraints, and SPR2/SPR3 + constraints. If ``False``, no suppression occurs. + + **print_suppression_echo** : :obj:`OutputEcho` + Print suppression setting during the input phase flag for the echo file. + Options are: + + - ALL_DATA_PRINTED: All data is printed. + - SUPPRESSED_NODAL_PRINTING: Nodal printing is suppressed. + - SUPPRESSED_ELEMENT_PRINTING: Element printing is suppressed. + - SUPPRESSED_NODAL_AND_ELEMENT_PRINTING : Both nodal and element printing is suppressed. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_hourglass(controltype=HourglassControl.STANDARD_VISCOSITY_FORM, coefficient=0.1) + + + Redefine the default values for the hourglass control type and coefficient. + + + :Parameters: + + **controltype** : :obj:`enum` + Default hourglass control type. + + **coefficient** : :class:`python:float`, :obj:`optional` + Default hourglass coefficient. The default is ``0.``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_bulk_viscosity(quadratic_viscosity_coeff=1.5, linear_viscosity_coeff=0.06, bulk_viscosity_type=BulkViscosity.STANDARD_BULK_VISCOSITY) + + + Reset the default values of the bulk viscosity coefficients globally. + + + :Parameters: + + **quadratic_viscosity_coeff** : :class:`python:float`, :obj:`optional` + Default quadratic viscosity coefficient. The default is ``1.5``. + + **linear_viscosity_coeff** : :class:`python:float`, :obj:`optional` + Default linear viscosity coefficient. The default is ``0.06``. + + **bulk_viscosity_type** : :obj:`enum` + Default bulk viscosity type. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_init_temperature(temp=0) + + + Define initial nodal point temperatures on all nodes. + + + :Parameters: + + **temp** : :class:`python:float`, :obj:`optional` + Temperature at node. The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_control_shell(wrpang=20, esort=0, irnxx=-1, istupd=0, theory=2, bwc=2, miter=1, proj=0, irquad=0) + + + Provide controls for computing shell response. + + + :Parameters: + + **wrpang** : :class:`python:int`, :obj:`optional` + Shell element warpage angle in degrees. The default is ``20``. + + **esort** : :class:`python:int` + Sorting of triangular shell elements to automatically switch + degenerate quadrilateral shell formulations to more suitable + triangular shell formulations. The default is ``0``. + + **irnxx** : :class:`python:int`, :obj:`optional` + Shell normal update option. The default is ``1``. + + **istupd** : :class:`python:int`, :obj:`optional` + Shell thickness change option for deformable shells. The + default is ``0``. + + **theory** : :class:`python:int`, :obj:`optional` + Default shell formulation. The default is ``2``. + + **bwc** : :class:`python:int`, :obj:`optional` + Warping stiffness for Belytschko-Tsay shells. The + default is ``2``. + + **miter** : :class:`python:int`, :obj:`optional` + Plane stress plasticity option. The default is ``1``. + + **proj** : :class:`python:int`, :obj:`optional` + Projection method for the warping stiffness in the Belytschko-Tsay + shell and the Belytschko-Wong-Chiang elements. The default is + ``0``. + + **irquad** : :class:`python:int`, :obj:`optional` + In-plane integration rule for the eight-node quadratic shell element. + The default is ``0``. + + - EQ.2: 2*2 Gauss quadrature + - EQ.3: 3*3 Gauss quadrature + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_control_solid(esort=0, fmatrx=0, niptets=4, swlocl=1, psfail=0, t10jtol=0.0, icoh=0, tet13k=0) + + + Provide controls for a solid element response. + + + :Parameters: + + **esort** : :class:`python:int`, :obj:`optional` + Automatic sorting of tetrahedral and pentahedral elements to avoid + use of degenerate formulations for these shapes. The default is ``0``. + + - EQ.0: No sorting + - EQ.1: Sort + + **fmatrx** : :class:`python:int`, :obj:`optional` + Method to use in the calculation of the deformation gradient matrix. + The default is ``1``. + + **niptets** : :class:`python:int`, :obj:`optional` + Number of integration points used in the quadratic tetrahedron elements. + The default is ``4``. + + **swlocl** : :class:`python:int`, :obj:`optional` + Output option for stresses in solid elements used as spot welds with + material ``\*MAT_SPOTWELD``. The default is ``1``. + + **psfail** : :class:`python:int`, :obj:`optional` + Solid element erosion from negative volume is limited only to solid elements in + the part set indicated by PSFAIL. The default is ``0``. + + **t10jtol** : :class:`python:float`, :obj:`optional` + Tolerance for Jacobian in four-point, 10-noded quadratic tetrahedra. The + default is ``0.0``. + + **icoh** : :class:`python:int`, :obj:`optional` + Breaking LS-DYNA convention ICOH is interpreted digit-wise. The default + is ``0``. + + **tet13k** : :class:`python:int`, :obj:`optional` + Flag for whether to invoke a consistent tangent stiffness matrix + for the pressure averaged tetrahedron. The default is ``0``, in which + case this matrix is not invoked. If this parameter is set to ``1``, + this matrix is invoked. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_control_contact(rwpnal, shlthk=0, orien=1, ssthk=0, ignore=0, igactc=0) + + + Change defaults for computation with contact surfaces. + + + :Parameters: + + **rwpnal** : :class:`python:float` + Scale factor for rigid wall penalties, which treat nodal points interacting + with rigid walls. + + **shlthk** : :class:`python:int`, :obj:`optional` + Flag for whether to consider shell thickness offsets in non-automatic + surface-to-surface and non-automatic nodes-to-surface type contacts. + The default is ``0``, in which case these offsets are not considered. + If this parameter is set to ``1``, these offsets are considered. + + **orien** : :class:`python:int`, :obj:`optional` + Flag for whether to automatically reorient contact interface segments + during initialization. The default is ``1``, in which case reorientation + automatically occurs. If this parameter is set to ``0``, reorientation + does not occur. + + **ssthk** : :class:`python:int`, :obj:`optional` + Flag for whether to determine default contact thickness for shells in single + surface contact types. The default is ``0``, in which case default contact + thickness is not determined. If this parameter is set to ``1``, default + contact thickness is determined. + + **ignore** : :class:`python:int`, :obj:`optional` + Flag for whether to ignore initial penetrations in the ``\*CONTACT_AUTOMATIC`` + options. The default is ``0``, in which case initial penetrations are ignored. + If this parameter is set to ``1``, initial penetrations are not ignored. + + **igactc** : :class:`python:int`, :obj:`optional` + Flag for whether to use isogeometric shells for contact detection when the + contact involves isogeometric shells. The default is ``0``, which means + isogeometric shells are not used. If this parameter is set to ``1``, isogeometric + shells are used. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_damping_global(lcid=0, valdmp=0.0) + + + Define mass-weighted nodal damping. + + Mass-weighted nodal damping applies globally to the + nodes of deformable bodies and to the mass center of + rigid bodies. + + :Parameters: + + **lcid** : :class:`python:int`, :obj:`optional` + Load curve ID, which specifies the system damping constant + versus the time. The default is ``0``. + + **valdmp** : :class:`python:float`, :obj:`optional` + System damping constant. The default is ``0.0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: get_solid_elements() + + + Get solid elements. + + + + :Returns: + + :class:`python:list` + list[0],solid element connectivity,list[0] = [[n1,n2,n3,n4,n5,n6,n7,n8],[...],...] + list[1],node coordinates,list[1] = [[x1,y1,z1],[x2,y2,z2],...] + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_general_keyword(opcode, keyworddata) + + + Create general keyword. + + + :Parameters: + + **opcode** : :class:`python:str` + Keyword card name. + + **keyworddata** : :class:`python:str` + Keyword data. + + + + + + + + + + + + .. rubric:: Examples + + Create a ``\*INITIAL_VELOCITY`` keyword. + + \$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ + \*INITIAL_VELOCITY + + & vx vy vz vxr vyr vzr + 1.480E+01 0.000E+00 0.000E+00 0.000E+00 0.000E+00 0.000E+00 + \$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ + + opcode = "INITIAL_VELOCITY" + keyworddata = "0\n1.480E+01,0.000E+00,0.000E+00,0.000E+00,0.000E+00,0.000E+00" + create_general_keyword(opcode = opcode,keyworddata=keyworddata) + + + + .. + !! processed by numpydoc !! + + .. py:method:: add(obj) + + + Add entities to an object. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_transform(filename=None, idnoff=0, ideoff=0, idpoff=0, idmoff=0, idsoff=0, idfoff=0, transform=None) + + + Include independent input files containing model data, allow for node, element, and set + IDs to be offset and for coordinates and constitutive parameters to be transformed and scaled. + + + :Parameters: + + **filename** : :class:`python:str` + Name of file to include in the keyword file. + + **idnoff** : :class:`python:int` + Offset to node ID. + + **ideoff** : :class:`python:int` + Offset to element ID. + + **idpoff** : :class:`python:int` + Offset to part ID. + + **idmoff** : :class:`python:int` + Offset to material ID. + + **idsoff** : :class:`python:int` + Offset to set ID. + + **idfoff** : :class:`python:int` + Offset to function ID, table ID, and curve ID. + + **transform** : :obj:`Transform` + Definition for the transformation. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file() + + + Save keyword files. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: BaseSet + + + + Defines the base class for all set classes. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: NodeSet(nodes=[]) + + + + Defines a nodal set with some identical or unique attributes. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a node set. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: num() + + + Get the number of nodes in the node set. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: id(pos) + + + Get the node ID by position. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: get_nid() + + + Get the node ID. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: SetType + + + Bases: :py:obj:`enum.Enum` + + + Contains the enums for setting types. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: SHELL + :value: 'SET_SHELL' + + + + .. py:attribute:: SOLID + :value: 'SET_SOLID' + + + + .. py:attribute:: BEAM + :value: 'SET_BEAM' + + + + .. py:attribute:: TSHELL + :value: 'SET_TSHELL' + + + + .. py:attribute:: DISCRETE + :value: 'SET_DISCRETE' + + + + +.. py:class:: NodesetGeneral(settype=SetType.SHELL, setids=[]) + + + Bases: :py:obj:`BaseSet` + + + Includes nodal points of element sets. + + Element sets are defined by ``SET_XXXX_LIST``, + where ``XXXX`` can be ``SHELL``, ``SOLID``, ``BEAM``, + ``TSHELL`` or ``DISCRETE``. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a node set. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: NodeSetBox(boxes=[]) + + + Bases: :py:obj:`BaseSet` + + + include the nodes inside boxes. + + + :Parameters: + + **boxes** : :class:`python:list` + A list of BOX. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a node set. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: PartSet(parts=[]) + + + Bases: :py:obj:`BaseSet` + + + Defines a set of parts with optional attributes. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a part set. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: num() + + + Get the number of parts in the part set. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: pos(pos) + + + Get a part ID by position. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: get_pid() + + + Get the part ID. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: SegmentSet(segments=[]) + + + Bases: :py:obj:`BaseSet` + + + Defines a set of segments with optional identical or unique attributes. + + + :Parameters: + + **segments** : :class:`python:list` [[point1,point2,point3,point4],[point5,point6,point7,point8]...] + Define segments. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a segment set. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: BeamFormulation + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: SPOTWELD + :value: 9 + + + + +.. py:class:: ShellFormulation + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: FULLY_INTEGRATED + + + + .. py:attribute:: BELYTSCHKO_TSAY + :value: 2 + + + + .. py:attribute:: SR_HUGHES_LIU + :value: 6 + + + + .. py:attribute:: FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE + :value: 9 + + + + .. py:attribute:: PLANE_STRESS + :value: 12 + + + + +.. py:class:: IGAFormulation + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: REISSNER_MINDLIN_FIBERS_AT_CONTROL_POINTS + :value: 0 + + + + .. py:attribute:: KIRCHHOFF_LOVE_FIBERS_AT_CONTROL_POINTS + :value: 1 + + + + .. py:attribute:: KIRCHHOFF_LOVE_FIBERS_AT_INTEGRATION_POINTS + :value: 2 + + + + .. py:attribute:: REISSNER_MINDLIN_FIBERS_AT_INTEGRATION_POINTS + :value: 3 + + + + +.. py:class:: SolidFormulation + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: EIGHT_POINT_ENHANCED_STRAIN_SOLID_ELEMENT + + + + .. py:attribute:: CONSTANT_STRESS_SOLID_ELEMENT + :value: 1 + + + + .. py:attribute:: EIGHT_POINT_HEXAHEDRON + :value: 2 + + + + .. py:attribute:: FULLY_INTEGRATED_QUADRATIC_EIGHT_NODE_ELEMENT + :value: 3 + + + + .. py:attribute:: ONE_POINT_COROTATIONAL + :value: 0 + + + + .. py:attribute:: IMPLICIT_9_POINT_ENHANCED_STRAIN + :value: 18 + + + + +.. py:class:: HourglassType + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: STANDARD_LSDYNA_VISCOUS + :value: 1 + + + + .. py:attribute:: FLANAGAN_BELYTSCHKO_VISOCOUS + :value: 2 + + + + .. py:attribute:: FLANAGAN_BELYTSCHKO_VISOCOUS_WITH_EXTRA_VOLUME_INTEGRATION + :value: 3 + + + + .. py:attribute:: FLANAGAN_BELYTSCHKO_STIFFNESS + :value: 4 + + + + .. py:attribute:: FLANAGAN_BELYTSCHKO_STIFFNESS_WITH_EXTRA_VOLUME_INTEGRATION + :value: 5 + + + + .. py:attribute:: BELYTSCHKO_BINDEMAN + :value: 6 + + + + .. py:attribute:: ACTIVATES_FULL_PROJECTION_WARPING_STIFFNESS + :value: 8 + + + + +.. py:class:: BeamSection(element_formulation, shear_factor=1, cross_section=0, thickness_n1=0, thickness_n2=0) + + + + Defines cross-sectional properties for beams, trusses, discrete beams, and cable elements. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: ShellSection(element_formulation, shear_factor=1, integration_points=5, printout=0, thickness1=0, thickness2=0, thickness3=0, thickness4=0) + + + + Defines section properties for shell elements. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: IGASection(element_formulation, shear_factor=1, thickness=1) + + + + Defines section properties for isogeometric shell elements. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: Part(id) + + + + Defines the part object. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_material(mat, mat_thermal=None) + + + Set the material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_element_formulation(formulation) + + + Set the element formulation. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_stiffness_damping_coefficient(coefficient) + + + Set the stiffness damping coefficient. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_extra_nodes(nodeset) + + + Set extra nodes for the rigid body. + + + :Parameters: + + **nodeset** : :obj:`NodeSet` + Extra nodes list. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_rigidbody_initial_velocity(translation=Velocity(0, 0, 0), rotation=RotVelocity(0, 0, 0)) + + + Set initial translational and rotational velocities for the rigid body. + + Initial translational and rotational velocities are set + at the center of gravity for a rigid body or a nodal rigid body. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for the part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: BeamPart(pid) + + + Bases: :py:obj:`Part` + + + Defines a beam part. + + A beam part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_cross_type(cross) + + + Set the type for the cross section. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_diameter(diameter) + + + Set the outer diameter for the cross section. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for the beam part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ShellPart(pid) + + + Bases: :py:obj:`Part` + + + Defines a shell part. + + A shell part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_hourglass(type=HourglassType.STANDARD_LSDYNA_VISCOUS) + + + Set the hourglass type, which identifies the bulk viscosity. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_shear_factor(factor) + + + Set the shear correction factor, which scales the transverse shear stress. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_integration_points(points=5) + + + Set the number of through thickness integration points. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_printout(print) + + + Set the printout option. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_thickness(thickness) + + + Set the shell thickness. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_des_surface(despid=0, desxid=0, nquad=1, nsid=0, rsf=-1) + + + Generate and place discrete element sphere (DES) elements on the surface of shell elements. + + + :Parameters: + + **despid** : :class:`python:int`, :obj:`optional` + Part ID for the generated DES elements. The default is ``0``. + + **desxid** : :class:`python:int`, :obj:`optional` + Section ID for the generated DES elements. The default is ``0``. + + **nquad** : :class:`python:int`, :obj:`optional` + Number of equally spaced DES elements to create on a shell element in each local shell direction. + The default is ``1``. + + **nsid** : :class:`python:int`, :obj:`optional` + If defined, this card creates a node set with ID NSID for the nodes generated by this card. + The default is ``0``. + + **rsf** : :class:`python:float`, :obj:`optional` + Scale factor for determining the DES radius. The default is ``1``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for the shell part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: IGAPart(pid) + + + Bases: :py:obj:`Part` + + + Defines an isogeometric shell part. + + The part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_shear_factor(factor) + + + Set the shear correction factor, which scales the transverse shear stress. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_thickness(thickness) + + + Set the shell thickness. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for the IGA part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: SolidPart(pid) + + + Bases: :py:obj:`Part` + + + Defines a solid part. + + The part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_hourglass(type=HourglassType.STANDARD_LSDYNA_VISCOUS) + + + Set the hourglass type, which identifies the bulk viscosity. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set the properties for the solid part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: DRO + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: DESCRIBES_TRANSLATIONAL_SPRING + :value: 0 + + + + .. py:attribute:: DESCRIBES_TORSIONAL_SPRING + :value: 1 + + + + +.. py:class:: DiscretePart(pid) + + + Bases: :py:obj:`Part` + + + Defines a discrete part. + + The part definition consists of the combined material information, + section properties, hourglass type, thermal properties, and a flag + for part adaptivity. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_displacement_option(displacement_option=DRO.DESCRIBES_TRANSLATIONAL_SPRING) + + + Set the displacement, which defines the rotation. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for the discrete part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Parts + + + + Stores the part list. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: add(part) + + + Add a part to the part list. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: get_num_shellpart() + + + Get the number of shell parts. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for added parts. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: AnalysisType + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: EXPLICIT + :value: 0 + + + + .. py:attribute:: IMPLICIT + :value: 1 + + + + .. py:attribute:: EXPLICIT_FOLLOWED_BY_IMPLICIT + :value: 2 + + + + +.. py:class:: TimestepCtrol + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: CONSTANT_TIMESTEP_SIZE + :value: 0 + + + + .. py:attribute:: AUTOMATICALLY_ADJUST_TIMESTEP_SIZE + :value: 1 + + + + +.. py:class:: Integration + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: NEWMARK_TIME_INTEGRATION + :value: 1 + + + + .. py:attribute:: MODAL_SUPERPOSITION_FOLLOWING_EIGENVALUE + :value: 2 + + + + +.. py:class:: ImplicitAnalysis(analysis_type=AnalysisType.IMPLICIT, initial_timestep_size=0) + + + + Activates implicit analysis and defines associated control parameters. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_initial_timestep_size(size=0) + + + Define the initial time step size. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_timestep(control_flag=TimestepCtrol.CONSTANT_TIMESTEP_SIZE, Optimum_equilibrium_iteration_count=11) + + + Define parameters for automatic time step control during implicit analysis. + + + :Parameters: + + **control_flag** : :class:`python:int` + Automatic time step control flag. + + **Optimum_equilibrium_iteration_count** : :class:`python:int`, :obj:`optional` + Optimum equilibrium iteration count per time step. The default is ``11``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_dynamic(integration_method=Integration.NEWMARK_TIME_INTEGRATION, gamma=0.5, beta=0.25) + + + Activate implicit dynamic analysis and define time integration constants. + + + :Parameters: + + **integration_method** : :obj:`enum` + Implicit analysis type. + + **gamma** : :class:`python:float`, :obj:`optional` + Newmark time integration constant. The default is ``0.5``. + + **beta** : :class:`python:float`, :obj:`optional` + Newmark time integration constant. The default is ``0.25``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_eigenvalue(number_eigenvalues=0, shift_scale=0) + + + Activate implicit eigenvalue analysis and define associated input parameters. + + + :Parameters: + + **number_eigenvalues** : :class:`python:int`, :obj:`optional` + Number of eigenvalues to extract. The default is ``0``. + + **shift_scale** : :class:`python:float`, :obj:`optional` + Shift scale. The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_solution(solution_method=12, iteration_limit=11, stiffness_reformation_limit=55, absolute_convergence_tolerance=1e-10) + + + Specify whether a linear or nonlinear solution is desired. + + + :Parameters: + + **solution_method** : :class:`python:int`, :obj:`optional` + Solution method for implicit analysis. The default is ``12``. + + **iteration_limit** : :class:`python:int`, :obj:`optional` + Iteration limit between automatic stiffness reformations. + The default is ``11``. + + **stiffness_reformation_limit** : :class:`python:int`, :obj:`optional` + Stiffness reformation limit per time step. The default is + ``55``. + + **absolute_convergence_tolerance** : :class:`python:float`, :obj:`optional` + Absolute convergence tolerance. The default is ``1e-10``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_consistent_mass_matrix() + + + Use the consistent mass matrix in implicit dynamics and eigenvalue solutions. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create an implicit analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ThermalAnalysisType + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: STEADY_STATE + :value: 0 + + + + .. py:attribute:: TRANSIENT + :value: 1 + + + + +.. py:class:: ThermalAnalysisTimestep + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: FIXED + :value: 0 + + + + .. py:attribute:: VARIABLE + :value: 1 + + + + +.. py:class:: ThermalAnalysis + + + + Activates thermal analysis and defines associated control parameters. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_timestep(timestep_control=ThermalAnalysisTimestep.FIXED, initial_timestep=0) + + + Set time step controls for the thermal solution in a thermal only or coupled structural/thermal analysis. + + + :Parameters: + + **timestep_control** : :obj:`ThermalAnalysisTimestep` + Time step control. + + **initial_timestep** : :class:`python:float`, :obj:`optional` + Initial thermal time step. The default is ``0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_solver(analysis_type=ThermalAnalysisType.STEADY_STATE) + + + Set options for the thermal solution in a thermal only or coupled structural-thermal analysis. + + + :Parameters: + + **analysis_type** : :obj:`ImplicitAnalysis` + Thermal analysis type. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create a thermal analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ContactCategory + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: SURFACE_TO_SURFACE_CONTACT + :value: 2 + + + + .. py:attribute:: SINGLE_SURFACE_CONTACT + :value: 3 + + + + .. py:attribute:: SHELL_EDGE_TO_SURFACE_CONTACT + :value: 4 + + + + .. py:attribute:: NODES_TO_SURFACE + :value: 5 + + + + +.. py:class:: ContactType + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: NULL + :value: 0 + + + + .. py:attribute:: AUTOMATIC + :value: 1 + + + + .. py:attribute:: GENERAL + :value: 2 + + + + .. py:attribute:: RIGID + :value: 3 + + + + .. py:attribute:: TIED + :value: 4 + + + + .. py:attribute:: TIED_WITH_FAILURE + :value: 5 + + + + .. py:attribute:: ERODING + :value: 6 + + + + .. py:attribute:: EDGE + :value: 7 + + + + +.. py:class:: OffsetType + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: NULL + :value: '' + + + + .. py:attribute:: OFFSET + :value: 'OFFSET' + + + + .. py:attribute:: BEAM_OFFSET + :value: 'BEAM_OFFSET' + + + + .. py:attribute:: CONSTRAINED_OFFSET + :value: 'CONSTRAINED_OFFSET' + + + + +.. py:class:: ContactFormulation + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: STANDARD_PENALTY + :value: 0 + + + + .. py:attribute:: SOFT_CONSTRAINT_PENALTY + :value: 1 + + + + .. py:attribute:: SEGMENT_BASED_CONTACT_PENALTY + :value: 2 + + + + +.. py:class:: SBOPT + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: ASSUME_PLANER_SEGMENTS + :value: 2 + + + + .. py:attribute:: WRAPED_SEGMENT_CHECKING + :value: 3 + + + + .. py:attribute:: SLDING_OPTION + :value: 4 + + + + +.. py:class:: ContactSurface(set) + + + + Defines a contact interface. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_contact_region(box) + + + Include in the contact definition only those SURFA nodes/segments within a box. + + + :Parameters: + + **box** : :obj:`Box` + Box-shaped volume. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_contact_thickness(thickness) + + + Set the contact thickness for the SURFA surface. + + + :Parameters: + + **thickness** : :class:`python:float` + Contact thickness. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_penalty_stiffness_scale_factor(scalefactor=1.0) + + + Set the scale factor on the default surface penalty stiffness. + + + :Parameters: + + **scalefactor** : :class:`python:int`, :obj:`optional` + Scale factor. The default is ``1.0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Contact(type=ContactType.NULL, category=ContactCategory.SINGLE_SURFACE_CONTACT, offset=OffsetType.NULL) + + + + Provide a way of treating interaction between disjoint parts. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_mortar() + + + Set the mortar contact. + + A mort contact is a segment-to-segment, penalty-based contact. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_tiebreak() + + + Set the contact allow for failure. + + A tieback is a special case of this. After failure, the contact + usually becomes a normal one-way, two-way, or single surface version. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_friction_coefficient(static=0, dynamic=0) + + + Set the coefficient of friction. + + + :Parameters: + + **static** : :class:`python:float`, :obj:`optional` + Static coefficient of friction. The default is ``0``. + + **dynamic** : :class:`python:float`, :obj:`optional` + Dynamic coefficient of friction. The default is ``0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_active_time(birth_time=0, death_time=1e+20) + + + Set the birth and death time to active and deactivate the contact. + + + :Parameters: + + **birth_time** : :class:`python:int`, :obj:`optional` + Time to activate the contact. The default is ``0``. + + **death_time** : :class:`python:float`, :obj:`optional` + Time to deactivate the contact. The default is ``1e20``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_initial_penetration() + + + Ignore initial penetrations. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_slave_surface(surface) + + + Set the slave contact interface. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_master_surface(surface) + + + Set the master contact interface. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_penalty_algorithm(formulation=ContactFormulation.STANDARD_PENALTY, segment_based_contact_option=SBOPT.ASSUME_PLANER_SEGMENTS) + + + Set the contact formulation. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create a contact. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ContactGroup + + + + Create a contact group. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: add(contact) + + + Add a contact in the group. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create contacts. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: num() + + + Get the number of contact objects. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Constraint + + + + Provides a way of constraining degrees of freedom to move together in some way. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create_spotweld(nodeid1, nodeid2) + + + Define massless spot welds between non-contiguous nodal pairs. + + + :Parameters: + + **nodeid1** : :class:`python:int` + ID for the first node. + + **nodeid2** : :class:`python:int` + ID for the second node. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_cnrb(nodeset) + + + Create a nodal rigid body, which is a rigid body that consists of defined nodes. + + + :Parameters: + + **nodeset** : :obj:`NodeSet` + Node set that defines the rigid body. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_joint_spherical(nodes, relative_penalty_stiffness=1.0, damping_scale_factor=1.0) + + + Create a joint between two rigid bodies. + + + :Parameters: + + **nodes** : :class:`python:list` + List of nodes for creating the joint. + + **relative_penalty_stiffness** : :class:`python:int`, :obj:`optional` + Relative penalty stiffness. The default is ``1.0``. + + **damping_scale_factor** : :class:`python:int`, :obj:`optional` + Damping scale factor on the default damping value. + The default is ``1.0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: merge_two_rigid_bodies(lead_rigidbody=0, constrained_rigidbody=0) + + + Merge two rigid bodies. + + One rigid body, called the constrained rigid body, + is merged into another rigid body, called the lead rigid body. + + :Parameters: + + **lead_rigidbody** : :class:`python:int`, :obj:`optional` + Part ID for the lead rigid body. The default is ``0``. + + **constrained_rigidbody** : :class:`python:int` + Part ID for the constrained rigid body. The default is ``0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create a constraint. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: BoundaryCondition + + + + Provides a way of defining imposed motions on boundary nodes. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create_spc(nodeset, tx=True, ty=True, tz=True, rx=True, ry=True, rz=True, cid=0, birth=0, death=1e+20) + + + Define nodal single point constraints. + + + :Parameters: + + **nodeset** : NodeSet. + Node set. + + **contraint_x/y/z_direction** : :class:`python:int` + Translational constraint in local x/y/z-direction. + + **contraint_x/y/zaxis_rotate** : :class:`python:int` + Rotational constraint about local x/y/z-axis. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_imposed_motion(set, curve, motion=Motion.DISPLACEMENT, dof=DOF.X_TRANSLATIONAL, scalefactor=1, birthtime=0) + + + Create an imposed nodal motion on a node or set of nodes. + + An imposed nodal motion can be a velocity, acceleration, or displacement. + + :Parameters: + + **partset** : PartSet. + Part set. + + **curve** : :obj:`Curve` + Curve ID or function ID to describe the motion value as a function of time. + + **motion** : :obj:`enum` + Velocity/Acceleration/Displacement flag. + + **dof** : :obj:`enum` + Applicable degrees of freedom. + + **scalefactor** : :class:`python:int`, :obj:`optional` + Load curve scale factor. The default is ``1``. + + **birthtime** : :class:`python:int`, :obj:`optional` + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_temperature(nodeset, curve=None, scalefactor=1) + + + Create temperature boundary conditions for a thermal or coupled thermal/structural analysis. + + + :Parameters: + + **nodeset** : NodeSet. + Node set. + + **curve** : :obj:`Curve`, :obj:`optional` + Temperature, T, specification. The default is ``None``. + + **scalefactor** : :class:`python:float`, :obj:`optional` + Temperature, T, curve multiplier. The default is ``1``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create a boundary condition. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: InitialCondition + + + + Provides a way of initializing velocities and detonation points. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create_velocity(velocityset, angular_velocity=0, velocity=Velocity(0, 0, 0), direction=Direction(0, 0, 0), stime=0) + + + Create initial velocities for rotating and/or translating bodies. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_velocity_node(nodeid, trans=Velocity(0, 0, 0), rot=RotVelocity(0, 0, 0)) + + + Define initial nodal point velocities for a node. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_temperature(nodeset=None, temperature=0) + + + Create an initial nodal point temperature. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create an initial condition. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: RigidwallCylinder(tail=Point(0, 0, 0), head=Point(0, 0, 0), radius=1, length=10) + + + + Defines a rigid wall with a cylinder form. + + + :Parameters: + + **tail** : :obj:`Point`, :obj:`optional` + Coordinates of the tail of the normal vector. + The default is ``(0, 0, 0)``. + + **head** : :obj:`Point`, :obj:`optional` + Coordinates of the head of the normal vector. + The default is ``(0, 0, 0)``. + + **radius** : :class:`python:float`, :obj:`optional` + Radius of the cylinder. The default is ``1``. + + **length** : :class:`python:float`, :obj:`optional` + Length of cylinder. The default is ``10``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_motion(curve, motion=Motion.VELOCITY, dir=Direction(1, 0, 0)) + + + Set the prescribed motion. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create a rigidwall cylinder. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: RigidwallPlanar(tail=Point(0, 0, 0), head=Point(0, 0, 0), coulomb_friction_coefficient=0.5) + + + + Defines planar rigid walls with either finite or infinite size. + + + :Parameters: + + **tail** : :obj:`Point` + Coordinate of the tail of the normal vector. + The default is ``(0, 0, 0)``. + + **head** : :obj:`Point` + Coordinate of the head of the normal vector. + The default is ``(0, 0, 0)``. + + **coulomb_friction_coefficient** : :class:`python:float`, :obj:`optional` + Friction coefficieint in coulomb units. The default is ``0.5``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create() + + + Create planar rigid walls. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: GravityOption + + + Bases: :py:obj:`enum.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: DIR_X + :value: 'X' + + + + .. py:attribute:: DIR_Y + :value: 'Y' + + + + .. py:attribute:: DIR_Z + :value: 'Z' + + + + +.. py:class:: Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0], y=[0, 0])) + + + + Defines body force loads using global axes directions. + + Body force loads are due to a prescribed base acceleration or + angular velocity. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create() + + + Define a body force. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynadem/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynadem/index.rst.txt new file mode 100644 index 000000000..db78f0cc5 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynadem/index.rst.txt @@ -0,0 +1,275 @@ +:py:mod:`ansys.dyna.core.pre.dynadem` +===================================== + +.. py:module:: ansys.dyna.core.pre.dynadem + +.. autoapi-nested-parse:: + + DEM API + ======= + + Module for creating a DEM DYNA input deck. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynadem.DynaDEM + ansys.dyna.core.pre.dynadem.DEMAnalysis + + + + +.. py:class:: DynaDEM + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.DynaBase` + + + Contains methods for creating a keyword related to a discrete element method. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_des(ndamp=0.0, tdamp=0.0, frics=0.0, fricr=0.0, normk=0.01, sheark=0.2857) + + + Set global control parameters for discrete element spheres. + + + :Parameters: + + **ndamp** : :class:`python:float`, :obj:`optional` + Normal damping coefficient. The default is ``0.0``. + + **tdamp** : :class:`python:float`, :obj:`optional` + Tangential damping coefficient. The default is ``0.0``. + + **frics** : :class:`python:float`, :obj:`optional` + Static coefficient of friction. The default is ``0.0``. + + - EQ.0: 3 DOF + - NE.0: 6 DOF + + **fricr** : :class:`python:float`, :obj:`optional` + Rolling friction coefficient. The default is ``0.0``. + + **normk** : :class:`python:float`, :obj:`optional` + Scale factor of the normal spring constant. The default is ``0.01``. + + **sheark** : :class:`python:float`, :obj:`optional` + Ratio between the sheark/normk. The default is ``0.2857``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_define_de_mesh_surface(sid, type, despid, desxid, nquad=1, nsid=0, rsf=1.0) + + + Create discrete element sphere (DES) elements on the surface of shell elements. + + + :Parameters: + + **sid** : :class:`python:int` + Part or part set ID for the region of the mesh to place DES elements on. + + **type** : :class:`python:int` + SID type: + + - type=0: Part set ID + - type=1: Part ID + + **despid** : :class:`python:int` + Part ID for the generated DES elements. + + **desxid** : :class:`python:int` + Section ID for the generated DES elements. + + **nquad** : :class:`python:int`, :obj:`optional` + Number of equally spaced DES elements created on a shell element in each + local shell direction. The default is ``1``. + + **nsid** : :class:`python:int`, :obj:`optional` + If defined, this card creates a node set with ID NSID for the nodes generated + by this card. The default is ``0``. + + **rsf** : :class:`python:float`, :obj:`optional` + Scale factor for determining the DES radius. The default is ``1.0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file() + + + Save keyword files. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: DEMAnalysis + + + + Activates DEM analysis and defines associated control parameters. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_des(normal_damping_coeff=0.0, tangential_damping_coeff=0.0, static_friction_coeff=0.0, rolling_friction_coeff=0.0, normal_spring_constant_sf=0.01, ratio=0.2857) + + + Set global control parameters for discrete element spheres. + + + :Parameters: + + **normal_damping_coeff** : :class:`python:float`, :obj:`optional` + Normal damping coefficient. The default value is ``0.0``. + + **tangential_damping_coeff** : :class:`python:float`, :obj:`optional` + Tangential damping coefficient. The default value is ``0.0``. + + **static_friction_coeff** : :class:`python:float`, :obj:`optional` + Static coefficient of friction. The default is ``0.0``. + + **rolling_friction_coeff** : :class:`python:float`, :obj:`optional` + Rolling coefficient of friction. The default is ``0.0``. + + **normal_spring_constant_sf** : :class:`python:float`, :obj:`optional` + Normal spring constant. The default is ``0.01``. + + **ratio** : :class:`python:float`, :obj:`optional` + Ratio. The default is ``0.2857``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create a DEM analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaem/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaem/index.rst.txt new file mode 100644 index 000000000..b262d8e7b --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaem/index.rst.txt @@ -0,0 +1,1582 @@ +:py:mod:`ansys.dyna.core.pre.dynaem` +==================================== + +.. py:module:: ansys.dyna.core.pre.dynaem + +.. autoapi-nested-parse:: + + EM API + ====== + + Module for creating an electromagnetism (EM) input deck. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynaem.Isopotential_ConnType + ansys.dyna.core.pre.dynaem.DynaEM + ansys.dyna.core.pre.dynaem.EMType + ansys.dyna.core.pre.dynaem.EMDimension + ansys.dyna.core.pre.dynaem.BEMSOLVER + ansys.dyna.core.pre.dynaem.FEMSOLVER + ansys.dyna.core.pre.dynaem.EMAnalysis + ansys.dyna.core.pre.dynaem.CircuitType + ansys.dyna.core.pre.dynaem.Circuit + ansys.dyna.core.pre.dynaem.EMContactType + ansys.dyna.core.pre.dynaem.EMContact + ansys.dyna.core.pre.dynaem.EMRandlesLayer + ansys.dyna.core.pre.dynaem.Isopotential + ansys.dyna.core.pre.dynaem.RogoCoil + ansys.dyna.core.pre.dynaem.RandlesCellType + ansys.dyna.core.pre.dynaem.RandlesCell + + + + +.. py:class:: Isopotential_ConnType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: SHORT_CIRCUIT + :value: 1 + + + + .. py:attribute:: RESISTANCE + :value: 2 + + + + .. py:attribute:: VOLTAGE_SOURCE + :value: 3 + + + + .. py:attribute:: CURRENT_SOURCE + :value: 4 + + + + .. py:attribute:: RLC_CIRCUIT + :value: 6 + + + + +.. py:class:: DynaEM + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.DynaBase` + + + Contains methods for creating keywords related to EM. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create_em_control(emsol=0, numls=100, macrodt=0, ncylfem=5000, ncylbem=5000) + + + Enable the EM solver and set its options. + + + :Parameters: + + **emsol** : :class:`python:int`, :obj:`optional` + EM solver. The default is ``0``. Options are: + + - EQ.-1: Turn off the EM solver after reading the EM keywords. + - EQ.1: Eddy current solver. + - EQ.2: Induced heating solver. + - EQ.3: Resistive heating solver. + - EQ.11: Electrophysiology monodomain. + - EQ.12: Electrophysiology bidomain. + - EQ.13: Electrophysiology monodomain coupled with bidomain. + + **numls** : :class:`python:int`, :obj:`optional` + Number of local EM steps in a whole period for when ``emsol = 2``. + The default is ``100``. + + **macrodt** : :class:`python:int`, :obj:`optional` + Macro time step for when ``emsol = 2``. The default is ``0``. + + **ncylfem** : :class:`python:int`, :obj:`optional` + Number of electromagnetism cycles between the recalculation of FEM matrices. + The default is ``5000``. + + **ncylbem** : :class:`python:int`, :obj:`optional` + Number of electromagnetism cycles between the recalculation of BEM matrices. + The default is ``5000``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_em_timestep(tstype, dtconst) + + + Control the EM time step and its evolution. + + + :Parameters: + + **tstype** : :class:`python:int` + Time step type. Options are: + + - EQ.1: Constant time step given in DTCONST + - EQ.2: Time step as a function of time given by a load curve specified in LCID + - EQ.3: Automatic time step computation, depending on the solver type + + This time step is then multiplied by FACTOR. + + **dtconst** : :class:`python:float` + Constant value for the time step for when ``tstype = 1``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_em_contact(contid=0, dtype=0, psidm=0, psids=0, eps1=0.3, eps2=0.3, eps3=0.3, d0=0) + + + Create an optional card for defining options on electromagnetic contacts between two sets of parts. + + + :Parameters: + + **contid** : :class:`python:int`, :obj:`optional` + Electromagnetic contact ID. The default is ``0``. + + **dtype** : :class:`python:int`, :obj:`optional` + Detection type. The default is ``0``. Options are: + + - EQ.0: Contact type 0 + - EQ.1: Contact type 1 + + **psidm** : :class:`python:int`, :obj:`optional` + Master part set ID. The default is ``0``. + + **psids** : :class:`python:int` + Slave part set ID. The default is ``0``. + + **eps1** : :class:`python:float`, :obj:`optional` + First contact coefficient for contact detection conditions. + The default is ``0.3``. + + **eps2** : :class:`python:float`, :obj:`optional` + Second contact coefficient for contact detection conditions. + The default is ``0.3``. + + **eps3** : :class:`python:float`, :obj:`optional` + Third contact coefficient for contact detection conditions. + The default is ``0.3``. + + **d0** : :class:`python:float`, :obj:`optional` + Contact condition 3 when ``dtype = 1``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_rogowsky_coil_to_output_current(segmentset=SegmentSet([[]]), settype=1, curtyp=1) + + + Define Rogowsky coils to measure a global current versus time through a segment set or a node set. + + + :Parameters: + + **rogid** : :class:`python:int` + Rogowsky coil ID. + + **setid** : :class:`python:int` + Segment or node set ID. + + **settype** : :class:`python:int`, :obj:`optional` + Type of set. The default is ``1``. Options are: + + - EQ.1: Segment set + - EQ.2: Node set + + **curtyp** : :class:`python:int` + Type of current measured. The default is ``1``. Options are: + + - EQ.1: Volume current + - EQ.2: Surface current (not available yet} + - EQ.3: Magnetic field flow (B field times area) + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_em_mat001(mid, mtype, sigma) + + + Create an electromagnetic material type and set properties + for a material whose permeability equals the free space permeability. + + + :Parameters: + + **mid** : :class:`python:int` + Material ID. + + **mtype** : :class:`python:int` + Electromagnetism type of the material. Options are: + + - EQ.0: Air or vacuum + - EQ.1: Insulator material (These materials have the same electromagnetism behavior as EQ.0.) + - EQ.2: Conductor carrying a source + - EQ.3: Fluid conductor + - EQ.4: Conductor not connected to any current or voltage source, where the eddy current problem is solved + + **sigma** : :class:`python:float` + Initial electrical conductivity of the material. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_em_mat002(mid, mtype, sigma, eosid, murel) + + + Create an electromagnetic material type and set properties + whose permeability is different than the free space permeability. + + + :Parameters: + + **mid** : :class:`python:int` + Material ID. + + **mtype** : :class:`python:int` + Electromagnetism type of the material. Options are: + + - EQ.0: Air or vacuum + - EQ.1: Insulator material (These materials have the same electromagnetism behavior as EQ.0.) + - EQ.2: Conductor carrying a source + - EQ.4: Conductor not connected to any current or voltage source, where the wddy current problem is solved + + **sigma** : :class:`python:float` + Initial electrical conductivity of the material. + + **eosid** : :class:`python:int` + ID of the EOS to use for the electrical conductivity. + + **murel** : :class:`python:float` + Relative permeability, which is the ratio of the permeability of a specific + medium to the permeability of the free space. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_em_solver_fembem_monolithic(mtype=0, stype=0, abstol=1e-06, reltol=0.0001, maxit=500) + + + Turn on the monolithic FEM-BEM solver. + + + :Parameters: + + **mtype** : :class:`python:int`, :obj:`optional` + Monolithic solver type. The default is ``0``. The only option is EQ.0: Direct symmetric solver. + + **stype** : :class:`python:int` + Solver type. The default is ``0``. Options are: + + - EQ.0: MINRES iterative solver + - EQ.1: GMRES iterative solver + + **abstol** : :class:`python:float`, :obj:`optional` + Absolute tolerance. The default is ``1e-6``. + + **reltol** : :class:`python:float`, :obj:`optional` + Relative tolerance. The default is ``1e-4``. + + **maxit** : :class:`python:int`, optional. + Maximum number of iterations. The default is 500. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_em_output(mats=0, matf=0, sols=0, solf=0) + + + Define the level of EM-related output on the screen and in the message file. + + + :Parameters: + + **mats** : :class:`python:int`, :obj:`optional` + Level of matrix assembly output to show on the screen. The default is ``0``. + Options are: + + - EQ.0: No output + - EQ.1: Basic assembly steps + - EQ.2: Basic assembly steps + percentage completed + final statistics + - EQ.3: Basic assembly steps + percentage completed + statistics at each percentage of completion + + **matf** : :class:`python:int`, :obj:`optional` + Level of matrix assembly output to write to the message file. The default + is ``0``. Options are: + + - EQ.0: No output + - EQ.1: Basic assembly steps + - EQ.2: Basic assembly steps + percentage completed + final statistics + - EQ.3: Vasic assembly steps + percentage completed + statistics at each percentage of completion + + **sols** : :class:`python:int` + Level of solver output to show on the screen. The default is ``0``. Options are: + + - EQ.0: No output + - EQ.1: Global information at each FEM iteration + - EQ.2: Detailed information at each FEM iteration + + **solf** : :class:`python:int`, :obj:`optional` + Level of solver output to write to the message file. The default is ``0``. + Options are: + + - EQ.0: No output + - EQ.1: Global information at each FEM iteration + 0 EQ.2: Detailed information at each FEM iteration + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: connect_isopotential(contype=Isopotential_ConnType.SHORT_CIRCUIT, isopotential1=None, isopotential2=None, value=0, func=None, curve=None, inductance=0, capacity=0, initial_voltage=0) + + + Define a connection between two isopotentials or between an isopotential and the ground. + + + :Parameters: + + **contype** : :obj:`Isopotential_ConnType` + Isopotential connection type. The default is ``SHORT_CIRCUIT``. + + **isopotential1** : :obj:`Isopotential` + First isopotential to connect. + + **isopotential2** : :obj:`Isopotential` + Second isopotential to connect. + + **value** : :class:`python:float`, :obj:`optional` + Value of the resistance, voltage, or current depending on the isopotential + connection type. The default is ``0``. + + **func** + .. + + **curve** + .. + + **inductance** + .. + + **capacity** + .. + + **initial voltage** + .. + + :Returns: + + :class:`python:int` + Connection ID. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_em_database_globalenergy(outlv=0) + + + Enable the output of global EM. + + + :Parameters: + + **outlv** : :class:`python:int`, :obj:`optional` + Flag for whether to generate the output file. The default is ``0``. + Options are: + + - EQ.0: No output file is generated. + - EQ.1: The output file is generated. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_Permanent_magnet(id, partid, mtype, north, sourth, hc) + + + Create a permanent magnet. + + + :Parameters: + + **id** : :class:`python:int` + ID of the magnet. + + **partid** : :class:`python:int` + Part ID. + + **mtype** : :class:`python:int`, :obj:`optional` + Magnet definition type. Options are: + + - EQ.0: Magnet defined by two node set for the north and south poles + - EQ.1: Magnet defined by two segments set for the north and south poles + - EQ.3: Magnet defined by a global vector orientation + - EQ.4: Magnet defined by a global vector orientation given by two node IDs + + **north** : :class:`python:int` + ID of the magnet's north face for ``mtype = 0`` and ``mtype = 1``. + + **sourth** : :class:`python:int` + ID of the magnet's south face for ``mtype = 0`` and ``mtype = 1``. + + **hc** : :class:`python:int` + Coercive force. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_em_eos_permeability(eosid, eostype, lcid) + + + Define the parameters for the behavior of a material's permeability. + + + :Parameters: + + **eosid** : :class:`python:int` + EM EOS ID. + + **eostype** : :class:`python:int` + Define the type of EOS. Options are: + + - EQ.1: Permeability defined by a B function of the H curve + - EQ.2: Permeability defined by an H function of the B curve + + **lcid** : :class:`python:int` + Load curve ID. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file() + + + Save keyword files. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: EMType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: EDDY_CURRENT + :value: 1 + + + + .. py:attribute:: INDUCTIVE_HEATING + :value: 2 + + + + .. py:attribute:: RESISTIVE_HEATING + :value: 3 + + + + .. py:attribute:: ELECTROPHYSIOLOGY + :value: 11 + + + + +.. py:class:: EMDimension + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: SOLVER_3D + :value: 0 + + + + .. py:attribute:: PLANAR_2D + :value: 1 + + + + .. py:attribute:: AXISYMMETRIC_2D + :value: 3 + + + + +.. py:class:: BEMSOLVER + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: DIRECT_SOLVER + :value: 1 + + + + .. py:attribute:: PCG + :value: 2 + + + + +.. py:class:: FEMSOLVER + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: DIRECT_SOLVER + :value: 1 + + + + .. py:attribute:: PCG + :value: 2 + + + + +.. py:class:: EMAnalysis(type=EMType.EDDY_CURRENT) + + + + Enables the EM solver and sets its options. + + + :Parameters: + + **type** : :class:`python:int` + Electromagnetism solver. The default is ``EDDY_CURRENT``. Options are: + + - EQ.1: Eddy current solver + - EQ.2: Induced heating solver + - EQ.3: Resistive heating solver + - EQ.11: Electrophysiology monodomain + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: p_matrix_tol + :value: 1e-06 + + + + .. py:attribute:: q_matrix_tol + :value: 1e-06 + + + + .. py:attribute:: w_matrix_tol + :value: 1e-06 + + + + .. py:method:: set_timestep(timestep) + + + Set the EM time step and its evolution. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_em_solver(type=EMType.EDDY_CURRENT, dimtype=EMDimension.SOLVER_3D) + + + Set the EM solver. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_solver_bem(solver=BEMSOLVER.PCG, relative_tol=1e-06, max_iteration=1000) + + + Set the type of linear solver, pre-conditioner, and tolerance for the EM BEM solver. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-06, max_iteration=1000) + + + Set some parameters for the EM FEM solver. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_bem_matrix_tol(p_matrix_tol=1e-06, q_matrix_tol=1e-06, w_matrix_tol=1e-06) + + + Set the type of BEM matrices and the way that they are assembled. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create an EM analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: CircuitType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: IMPOSED_CURRENT_VS_TIME + :value: 1 + + + + .. py:attribute:: IMPOSED_VOLTAGE_VS_TIME + :value: 2 + + + + +.. py:class:: Circuit(loadcurve, circuit_type=CircuitType.IMPOSED_CURRENT_VS_TIME) + + + + Defines an electrical circuit. + + + :Parameters: + + **circtyp** : :class:`python:int` + Circuit type. Options are: + + - EQ.1: Imposed current vs time defined by a load curve + - EQ.2: Imposed voltage vs time defined by a load curve + + **loadcurve** : :obj:`Curve` + Load curve for when the ``circtyp`` parameter is set to ``1``, + ``2``, ``21`` or ``22``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_current(current, current_inlet, current_outlet) + + + Define the segment set for the current. + + + :Parameters: + + **current** : :obj:`SegmentSet` + Segment set for the current. + + **current_inlet** : :obj:`SegmentSet` + Segment set for input voltage or input current + for CIRCTYP.EQ.2/3/12/22 and CIRCTYP.EQ 1/11/21 respectively. + + **current_outlet** : :obj:`SegmentSet` + Segment set for the output voltage or output current for + CIRCTYP = 2/3/12/22 and CIRCTYP = 1/11/21 respectively. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create a circuit. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: EMContactType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: NODE_TO_NODE_BASED_ON_CONSTRAINTS + + + + .. py:attribute:: NODE_TO_NODE_PENALTY_BASED_CONTACT + :value: 0 + + + + .. py:attribute:: DISCRETE_MORTAR_PENALTY_CONTACT + :value: 1 + + + + +.. py:class:: EMContact(contact_type=EMContactType.NODE_TO_NODE_PENALTY_BASED_CONTACT) + + + + Detects contact between conductors. + + If no contact parts are defined, this method detects contact between + all active parts associated with a conducting material. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create() + + + Create an EM contact. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: EMRandlesLayer + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: DEFAULT + :value: 0 + + + + .. py:attribute:: CURRENT_COLLECTOR_POSITIVE + :value: 1 + + + + .. py:attribute:: POSITIVE_ELECTRODE + :value: 2 + + + + .. py:attribute:: SEPARATOR + :value: 3 + + + + .. py:attribute:: NEGATIVE_ELECTRODE + :value: 4 + + + + .. py:attribute:: CURRENT_COLLECTOR_NEGATIVE + :value: 5 + + + + +.. py:class:: Isopotential(set=None, layer=EMRandlesLayer.DEFAULT) + + + + Defines an isopotential. + + This method constrain nodes so that they have the same scalar potential value. + + :Parameters: + + **set** : :obj:`Set` + Segment set or node set. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: isopotlist + :value: [] + + + + .. py:method:: create() + + + Create an isopotential. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: RogoCoil(set=None) + + + + Measures the total current flowing through a given section of the conductor. + + + :Parameters: + + **set** : :obj:`Set` + Segment set. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create() + + + Create a Rogowsky coil. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: RandlesCellType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: USER_DEFINED_EQUIVALENT_CIRCUIT_MODEL + + + + .. py:attribute:: RANDLES_CELL_0_ORDER + :value: 0 + + + + .. py:attribute:: RANDLES_CELL_1_ORDER + :value: 1 + + + + .. py:attribute:: RANDLES_CELL_2_ORDER + :value: 2 + + + + .. py:attribute:: RANDLES_CELL_3_ORDER + :value: 3 + + + + +.. py:class:: RandlesCell(set=None) + + + + Define parameters for a Randles Cell. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_batmac_model(cell_type=RandlesCellType.RANDLES_CELL_1_ORDER, cell_parts=None, area=2, cell_capacity=0, soc_conversion_factor=0, charge_init_state=0, circuit_parameter=None, constant_temperature=0, temperature_from_thermal_solver=False, add_heating_to_thermal_solver=False) + + + define the distributed Randles circuit parameters for a Randles cell when using the batmac model. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Set parameter for Randles Cell. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaicfd/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaicfd/index.rst.txt new file mode 100644 index 000000000..e9cf5b5d0 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaicfd/index.rst.txt @@ -0,0 +1,1803 @@ +:py:mod:`ansys.dyna.core.pre.dynaicfd` +====================================== + +.. py:module:: ansys.dyna.core.pre.dynaicfd + +.. autoapi-nested-parse:: + + ICFD API + ======== + + Module for creating an ICFD (incompressible computational fluid dynamics) DYNA input deck. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynaicfd.DynaICFD + ansys.dyna.core.pre.dynaicfd.ICFD_SurfRemeshMethod + ansys.dyna.core.pre.dynaicfd.ICFD_AnalysisType + ansys.dyna.core.pre.dynaicfd.ICFD_MessageLevel + ansys.dyna.core.pre.dynaicfd.ICFD_CouplingForm + ansys.dyna.core.pre.dynaicfd.ICFD_CouplingDirection + ansys.dyna.core.pre.dynaicfd.ICFDAnalysis + ansys.dyna.core.pre.dynaicfd.Compressible + ansys.dyna.core.pre.dynaicfd.MatICFD + ansys.dyna.core.pre.dynaicfd.ICFDDOF + ansys.dyna.core.pre.dynaicfd.Vel + ansys.dyna.core.pre.dynaicfd.ICFDPart + ansys.dyna.core.pre.dynaicfd.ICFDVolumePart + ansys.dyna.core.pre.dynaicfd.MeshedVolume + + + + +.. py:class:: DynaICFD + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.DynaBase` + + + Contains methods for create a keyword related to an ICFD analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_termination(termination_time) + + + Set the total time of the simulation for the fluid problem. + + + :Parameters: + + **termination_time** : :class:`python:float` + Total time of the simulation for the fluid problem. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_control_general(atype=0, mtype=0, dvcl=0, rdvcl=0) + + + Specify the type of CFD analysis. + + + :Parameters: + + **atype** : :class:`python:int`, :obj:`optional` + Analysis type. The default is ``0``. + + **mtype** : :class:`python:int`, :obj:`optional` + Solving method type. The default is ``0``. + + **dvcl** : :class:`python:int`, :obj:`optional` + Flag for divergence cleaning. The default is ``0``. + + **rdvcl** : :class:`python:int`, :obj:`optional` + Flag for remeshing divergence cleaning. The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_control_output(msgl) + + + Modify default values for screen and file outputs related to the fluid solver only. + + + :Parameters: + + **msgl** : :class:`python:int` + Message level. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_control_turbulence(tmod) + + + Modify the default values for the turbulence model. + + + :Parameters: + + **tmod** : :class:`python:int` + Turbulence model to use. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_control_dem_coupling(ctype=0, bt=0, dt=1e+28, sf=1) + + + Activate coupling between the ICFD and DEM solvers. + + + :Parameters: + + **ctype** : :class:`python:int`, :obj:`optional` + Coupling direction to the solver. The default is ``0``. + + **bt** : :class:`python:float`, :obj:`optional` + Birth time for the DEM coupling. The default is ``0``. + + **dt** : :class:`python:float`, :obj:`optional` + Death time for the DEM coupling. The default is ``1e28``. + + **sf** : :class:`python:float`, :obj:`optional` + Scale factor to apply to the force transmitted by the fluid to the structure. + The default is ``1``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_section_icfd(sid) + + + Define a section for the ICFD solver. + + + :Parameters: + + **sid** : :class:`python:int` + Section ID. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_part_icfd(pid, secid, mid) + + + Define parts for the ICFD solver. + + + :Parameters: + + **pid** : :class:`python:int` + Part ID for fluid surfaces. + + **secid** : :class:`python:int` + Section ID defined with the ``\*ICFD_SECTION`` card. + + **mid** : :class:`python:int` + Material ID defined with the ``\*ICFD_MAT`` card. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_solver_tol_mmov(atol=1e-08, rtol=1e-08) + + + Change the default tolerance values for the mesh movement algorithm. + + + :Parameters: + + **atol** : :class:`python:float`, :obj:`optional` + Absolute convergence criteria. The default is ``1e-8``. + + **rtol** : :class:`python:float`, :obj:`optional` + Relative convergence criteria. The default is ``1e-8``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_initial(velocity=Velocity(0, 0, 0), temperature=0, pressure=0) + + + Assign the initial condition to all nodes at once. + + + :Parameters: + + **velocity** : :obj:`Velocity`, :obj:`optional` + Initial velocity. The default is ``(0, 0, 0)``, + + **temperature** : :class:`python:float`, :obj:`optional` + Initial temperature. The default is ``0``. + + **pressure** : :class:`python:float`, :obj:`optional` + Initial pressure. The default is ``0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_imposed_move(vx=None, vy=None, vz=None) + + + Impose a velocity on the whole volume mesh. + + + :Parameters: + + **vx** + .. + + **vy** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file() + + + Save keyword files. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ICFD_SurfRemeshMethod + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: LAPLACIAN_SMOOTHING + :value: 1 + + + + .. py:attribute:: CURVATURE_PRESERVING + :value: 2 + + + + +.. py:class:: ICFD_AnalysisType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: TURNOFF_ICFD_SOLVER + + + + .. py:attribute:: TRANSIENT_ANALYSIS + :value: 0 + + + + .. py:attribute:: STEADY_STATE_ANALYSIS + :value: 1 + + + + +.. py:class:: ICFD_MessageLevel + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: TIMESTEP_INFORMATION + :value: 0 + + + + .. py:attribute:: FULL_OUTPUT_INFORMATION + :value: 4 + + + + +.. py:class:: ICFD_CouplingForm + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: FORCE_BASED_ON_VELOCITY_DRAG_VALUE + :value: 0 + + + + .. py:attribute:: FORCE_USING_FLUID_PRESSURE_GRADIENT + :value: 1 + + + + +.. py:class:: ICFD_CouplingDirection + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: TWO_WAY_COUPLING + :value: 0 + + + + .. py:attribute:: ONE_WAY_COUPLING_MECHANICS_TRANS_DISPLACEMENT_TO_FLUID + :value: 1 + + + + .. py:attribute:: ONE_WAY_COUPLING_FLUID_TRANS_STRESS_TO_SOLID + :value: 2 + + + + .. py:attribute:: TWO_WAY_WEAK_COUPLING + :value: 3 + + + + +.. py:class:: ICFDAnalysis + + + + Activates an ICFD analysis and defines associated control parameters. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_type(analysis_type=ICFD_AnalysisType.TRANSIENT_ANALYSIS) + + + Set the type of the CFD analysis. + + + :Parameters: + + **analysis_type** : :obj:`ICFD_AnalysisType` + Analysis type. The default is ``TRANSIENT_ANALYSIS``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_output(messagelevel=ICFD_MessageLevel.TIMESTEP_INFORMATION, iteration_interval=0) + + + Modify default values for screen and file outputs related to the fluid solver only. + + + :Parameters: + + **messagelevel** : :obj:`ICFD_MessageLevel`, :obj:`optional` + Message level. The default is ``TIMESTEP_INFORMATION``. + + **iteration_interval** : :class:`python:int`, :obj:`optional` + Iteration interval to print the output at. The default is ``0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_fsi(couplingdir=ICFD_CouplingDirection.TWO_WAY_COUPLING) + + + Modify default values for the fluid-structure interaction coupling algorithm. + + + :Parameters: + + **couplingdir** : :obj:`ICFD_CouplingDirection`, :obj:`optional` + Coupling direction to the solver. The default is ``TWO_WAY_COUPLING``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_steady_state(max_iteration=1000000.0, momentum_tol_limit=0.001, pressure_tol_limit=0.001, temperature_tol_limit=0.001, velocity_relax_param=0.3, pressure_relax_param=0.7) + + + Set convergence options for the steady state solver. + + + :Parameters: + + **max_iteration** : :class:`python:int`, :obj:`optional` + Maximum number of iterations to reach convergence. The default is + ``1000000.0``. + + **momentum_tol_limit** : :class:`python:float`, :obj:`optional` + Tolerance limits for the momentum equations. The default is ``0.001``. + + **pressure_tol_limit** : :class:`python:float`, :obj:`optional` + Tolerance limits for the pressure equations. The default is ``0.001``. + + **temperature_tol_limit** : :class:`python:float`, :obj:`optional` + Tolerance limits for the temperature equations. The default is ``0.001``. + + **velocity_relax_param** : :class:`python:float`, :obj:`optional` + Relaxation parameters for the velocity. The default is ``0.3``. + + **pressure_relax_param** : :class:`python:float`, :obj:`optional` + Relaxation parameters for the pressure. The default is ``0.7``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_timestep(timestep=0) + + + Set the time step for the fluid problem. + + + :Parameters: + + **dt** : :class:`python:float`, :obj:`optional` + Time step for the fluid problem. The default is ``0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_volume_mesh(mesh_growth_scale_factor=1.41) + + + Modify the default value for automatic volume mesh generation. + + + :Parameters: + + **mesh_growth_scale_factor** : :class:`python:float`, :obj:`optional` + Maximum mesh size that the volume mesher is allowed to use when generating + the volume mesh. The default is ``1.41``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_mesh_adaptivity(min_mesh_size=0, max_mesh_size=0, max_perceptual_error=0, num_iteration=0) + + + Activate the adaptive mesh refinement feature. + + + :Parameters: + + **min_mesh_size** : :class:`python:float`, :obj:`optional` + Minimum mesh size for the mesh generator. The default is ``0``. + + **max_mesh_size** : :class:`python:float`, :obj:`optional` + Maximum mesh size. The default is ``0``. + + **max_perceptual_error** : :class:`python:float`, :obj:`optional` + Maximum perceptual error allowed in the whole domain. The default + is ``0``. + + **num_iteration** : :class:`python:int`, :obj:`optional` + Number of iterations before a forced remeshing. The default is + ``0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_surface_mesh(remesh_method=ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING) + + + Enable automatic surface remeshing. + + + :Parameters: + + **remesh_method** : :obj:`ICFD_SurfRemeshMethod`, :obj:`optional` + Whether to perform a surface remeshing. The default is ``LAPLACIAN_SMOOTHING``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_coupling_dem(coupling_type=0, birth_time=0, death_time=1e+28, scale_factor=1, formulation=ICFD_CouplingForm.FORCE_BASED_ON_VELOCITY_DRAG_VALUE) + + + Activate coupling between the ICFD and DEM solvers. + + + :Parameters: + + **coupling_type** : :class:`python:int`, :obj:`optional` + Coupling direction to the solver. The default is ``0``. + + **birth_time** : :class:`python:float`, :obj:`optional` + Birth time for the DEM coupling. The default is ``0``. + + **death_time** : :class:`python:float`, :obj:`optional` + Death time for the DEM coupling. The default is ``1e+28``. + + **scale_factor** : :class:`python:float`, :obj:`optional` + Scale factor applied to the force transmitted by the fluid to + the structure. The default is ``1``. + + **formulation** : :class:`python:int`, :obj:`optional` + Type of formulation to use in the coupling. The default is + ``FORCE_BASED_ON_VELOCITY_DRAG_VALUE``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create ICFD analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Compressible + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: VACUUM + :value: 0 + + + + .. py:attribute:: FULLY_INCOMPRESSIBLE_FLUID + :value: 1 + + + + +.. py:class:: MatICFD(flag=Compressible.FULLY_INCOMPRESSIBLE_FLUID, flow_density=0, dynamic_viscosity=0, heat_capacity=0, thermal_conductivity=0, thermal_expansion_coefficient=0) + + + + Defines physical properties for the fluid material. + + + :Parameters: + + **flag** : :class:`python:int` + Flag for chooseing between fully incompressible, slightly compressible, or barotropic flows. + The default is ``FULLY_INCOMPRESSIBLE_FLUID``. Options are: + + - EQ.0: Vacuum (free surface problems only) + - EQ.1: Fully incompressible fluid + + **flow_density** : :class:`python:float`, :obj:`optional` + Flow density. The default is ``0``. + + **dynamic_viscosity** : :class:`python:float`, :obj:`optional` + Dynamic viscosity. The default is ``0``. + + **heat_capacity** + .. + + **thermal_conductivity** + .. + + **thremal_expansion_coefficent** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create an ICFD material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ICFDDOF + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: X + :value: 1 + + + + .. py:attribute:: Y + :value: 2 + + + + .. py:attribute:: Z + :value: 3 + + + + +.. py:class:: Vel + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: LINEAR_VELOCITY + :value: 1 + + + + .. py:attribute:: ANGULAR_VELOCITY + :value: 2 + + + + +.. py:class:: ICFDPart(id) + + + + Defines a part for the ICFD solver. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_material(mat) + + + Set a material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_prescribed_velocity(motion, dof=ICFDDOF.X, velocity_flag=Vel.LINEAR_VELOCITY) + + + Impose the fluid velocity on the boundary. + + + :Parameters: + + **dof** : :class:`python:int`, :obj:`optional` + Applicable degrees of freedom. The default is ``ICFDDOF.X``. + Options are: + + - EQ.1: x-degree of freedom + - EQ.2: y-degree of freedom + - EQ.3: z-degree of freedom + - EQ.4: Normal direction degree of freedom + + **velocity_flag** : :class:`python:int`, :obj:`optional` + Velocity flag. The default is ``LINEAR_VELOCITY``. Options are: + + - EQ.1: Linear velocity + - EQ.2: Angular velocity + - EQ.3: Parabolic velocity profile + - EQ.4: Activates synthetic turbulent field on part + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_prescribed_pressure(pressure) + + + Impose a fluid pressure on the boundary. + + + :Parameters: + + **pressure** : :obj:`Curve` + Load curve to describe the pressure value versus time. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_prescribed_temperature(temperature) + + + Impose a fluid temperature on the boundary. + + + :Parameters: + + **temperature** : :obj:`Curve` + Load curve to describe the temperature value versus time. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_free_slip() + + + Specify the fluid boundary with a free-slip boundary condition. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_non_slip() + + + Specify the fluid boundary with a non-slip boundary condition. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_fsi() + + + Define the fluid surface to consider in contact with the solid surfaces + for fluid-structure interaction (FSI) analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: compute_drag_force() + + + Enable the computation of drag forces over given surface parts of the model. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: compute_flux() + + + Enable the computation of the flow rate and average pressure over given parts of the model. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: compute_temperature() + + + Enable the computation of the average temperature and the heat flux over given parts of the model. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_boundary_layer(number=3) + + + Define a boundary layer mesh as a refinement on the volume mesh. + + + :Parameters: + + **number** : :class:`python:int`, :obj:`optional` + Number of elements normal to the surface (in the boundary layer). + The default is ``3.`` + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_boundary_layer_symmetry_condition() + + + Specify the part that is to have symmetry conditions for the boundary layer. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_imposed_move(vx=None, vy=None, vz=None) + + + Impose a velocity on a specific ICFD part. + + + :Parameters: + + **vx** + .. + + **vy** + .. + + **vz** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for an ICFD part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ICFDVolumePart(surfaces) + + + + Assigns material properties to the nodes enclosed by surface ICFD parts. + + + :Parameters: + + **surfaces** : :class:`python:list` + List of part IDs for the surface elements that define the volume mesh. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_material(mat) + + + Set a material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_imposed_move(vx=None, vy=None, vz=None) + + + Impose a velocity on a specific ICFD part. + + + :Parameters: + + **vx** + .. + + **vy** + .. + + **vz** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create an ICFD volume part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MeshedVolume(surfaces) + + + + Defines the volume space to mesh. + + + :Parameters: + + **surfaces** : :class:`python:list` + List of part IDs for the surface elements to use to define the volume. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: embed_shell(embeded) + + + Define surfaces that the mesher is to embed inside the volume mesh. + + + :Parameters: + + **embeded** : :class:`python:list` + List of part IDs for the surface elements. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: meshsize_box(size, min_point, max_point) + + + Define a local mesh size in specific zones corresponding to given geometrical shapes. + + + :Parameters: + + **size** : :class:`python:float` + Mesh size to apply in the zone of the shape defined by ``SNAME``. + + **parameter** : :class:`python:list` + List of the parameters that define the shape. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_meshsize(surfaces) + + + Define the surfaces that the mesher is to use to specify a local mesh size inside the volume. + + + :Parameters: + + **surfaces** : :class:`python:list` + List of part IDs for the surface elements. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_fluid_interfaces(surfaces) + + + Define the surfaces that the mesher is to use to specify fluid interfaces in multi-fluid simulations. + + + :Parameters: + + **surfaces** : :class:`python:list` + List of part IDs for the surface elements. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create mesh volume. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaiga/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaiga/index.rst.txt new file mode 100644 index 000000000..1fe8b220c --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaiga/index.rst.txt @@ -0,0 +1,123 @@ +:py:mod:`ansys.dyna.core.pre.dynaiga` +===================================== + +.. py:module:: ansys.dyna.core.pre.dynaiga + +.. autoapi-nested-parse:: + + IGA API + ========== + + Module for creating an IGA DYNA input deck. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynaiga.DynaIGA + + + + +.. py:class:: DynaIGA + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.DynaBase` + + + Contains methods for creating a keyword related to IGA. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create_section_igashell(secid, elform, shrf, thickness) + + + Define section properties for isogeometric shell elements. + + + :Parameters: + + **secid** : :class:`python:int` + Section ID. ``SECID`` is referenced on the ``\*PART`` card. + A unique number or label must be specified. + + **elform** : :class:`python:int` + Element formulation. + + **shrf** : :class:`python:float` + Shear correction factor, which scales the transverse shear stress. + + **thickness** : :class:`python:float` + Shell thickness. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file() + + + Save keyword files. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaisph/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaisph/index.rst.txt new file mode 100644 index 000000000..e006d5868 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynaisph/index.rst.txt @@ -0,0 +1,691 @@ +:py:mod:`ansys.dyna.core.pre.dynaisph` +====================================== + +.. py:module:: ansys.dyna.core.pre.dynaisph + +.. autoapi-nested-parse:: + + ISPH API + ========== + + Module for creating an ISPH (incompressible smooth particle hydrodynamics) DYNA input deck. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynaisph.DynaISPH + ansys.dyna.core.pre.dynaisph.ISPHAnalysis + ansys.dyna.core.pre.dynaisph.SPHSection + ansys.dyna.core.pre.dynaisph.MassflowPlane + ansys.dyna.core.pre.dynaisph.ISPHFluidPart + ansys.dyna.core.pre.dynaisph.ISPHStructPart + + + + +.. py:class:: DynaISPH + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.DynaBase` + + + Contains methods for creating a keyword related to ISPH. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_des(num_timestep=1, boxid=0, space_dimension=3, neighbors=150, approximation_theory=0, max_velocty=1000000000000000.0) + + + Provide controls related to ISPH. + + + :Parameters: + + **num_timestep** : :class:`python:int`, :obj:`optional` + Number of time steps between particle sorting. The default + is ``1``. + + **boxid** : :class:`python:int`, :obj:`optional` + Box ID. The default is ``0``. ISPH approximations are computed + inside the specified box. When a particle has gone outside this + box, it is deactivated. + + **space_dimension** : :class:`python:int`, :obj:`optional` + Space dimension for ISPH particles. The default is ``3``. Options + are: + + - EQ.3: 3D problems + - EQ.2: 2D plane strain problems + - EQ.-2: 2D axisymmetric problems + + **neighbors** : :class:`python:int`, :obj:`optional` + Initial number of neighbors per particle. The default is ``150``. + + **approximation_theory** : :class:`python:int`, :obj:`optional` + Particle approximation theory. The default is ``0``. + + **max_velocty** : :class:`python:float`, :obj:`optional` + Maximum value for velocity for the ISPH particles. The default + is ``1000000000000000.0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file() + + + Save keyword files. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ISPHAnalysis(num_timestep=1) + + + + Provide controls related to ISPH. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_num_timestep(num_timestep) + + + Set the number of time steps between particle sorting. + + + :Parameters: + + **num_timestep** : :class:`python:int`, :obj:`optional` + Number of time steps between particle sorting. The default + is ``1``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_box(box) + + + Set the box. ISPH approximations are computed inside a specified box. + + + :Parameters: + + **box** : :obj:`Box` + Box for computing ISHPH approximattions. When a particle has gone + outside this box, it is deactivated. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_neighbors(neighbors) + + + Set the initial number of neighbors per particle. + + + :Parameters: + + **neighbors** : :class:`python:int`, :obj:`optional` + Initial number of neighbors per particle. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_particle_deactivation(deactivation) + + + Set the type of BEM matrices and the way they are assembled. + + + :Parameters: + + **deactivation** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_velocity_scaling(scaling) + + + Set the type of BEM matrices and the way they are assembled. + + + :Parameters: + + **scaling** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create an ISPH analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: SPHSection(cslh=1.2, hmin=0.2, hmax=2.0, sphini=0) + + + + Defines section properties for ISPH particles. + + + :Parameters: + + **cslh** : :class:`python:float`, :obj:`optional` + .. + + **hmin** : :class:`python:float`, :obj:`optional` + .. + + **hmax** : :class:`python:float`, :obj:`optional` + .. + + **sphini** : :class:`python:int`, :obj:`optional` + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: MassflowPlane(particles, surface) + + + + Measures ISPH mass flow rate across a defined plane. + + + :Parameters: + + **particles** : :obj:`NodeSet`, :obj:`PartSet` + Node set or part set specifying the ISPH particles to measure. + + **surface** : :obj:`PartSet` + Part set ID or part ID defining the surface across which to measure the flow rate. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a mass flow plane. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ISPHFluidPart(pid, minpoint, length, numdirx, numdiry, numdirz) + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Part` + + + Generates ISPH particles inside a box. + + + :Parameters: + + **pid** : :class:`python:int` + Part ID. + + **minpoint** : :obj:`Point` + Minimum x,y,z-coordinate. + + **length** : :obj:`Point` + Box length in the x,y,z-direction. + + **numdirx** : :class:`python:int` + Number of ISPH particles in the x-direction. + + **numdiry** : :class:`python:int` + Number of ISPH particles in the y-direction. + + **numdirz** : :class:`python:int` + Number of ISPH particles in the z-direction. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_smoothing_length(initial, min, max, optional) + + + Calculate the smoothing length of the particles. + + + :Parameters: + + **initial** : :class:`python:float` + Constant for calculating the initial smoothing length of the particles. + + **min** : :class:`python:float` + Scale factor for the minimum smoothing length. + + **max** : :class:`python:float` + Scale factor for the maximum smoothing length. + + **optional** : :class:`python:float`, :obj:`optional` + Initial smoothing length, which overrides the true smoothing length. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_particles() + + + Create ISPH particles inside the box. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_massflow_plane(surfaces) + + + Measure ISPH mass flow rate across a defined plane. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for an ISPH fluid part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ISPHStructPart(pid, couple_partset, space) + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Part` + + + Generates and places ISPH elements on the surface of triangular shell elements. + + + :Parameters: + + **pid** : :class:`python:int` + Part ID. + + **couple_partset** : :obj:`PartSet` + Part or part set ID for the region of the mesh to place the ISPH elements on. + + **space** : :class:`python:float` + Maximum space between ISPH elements. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_smoothing_length(initial, min, max, optional) + + + Calculate the smoothing length of the particles. + + + :Parameters: + + **Parameters** + .. + + **----------** + .. + + **initial** : :class:`python:float` + Constant for calculating the initial smoothing length of the particles. + + **min** : :class:`python:float` + Scale factor for the minimum smoothing length. + + **max** : :class:`python:float` + Scale factor for the maximum smoothing length. + + **optional** : :class:`python:float`, :obj:`optional` + Initial smoothing length, which overrides the true smoothing length. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_particles() + + + Create ISPH elements on the surface of triangular shell elements. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_property() + + + Set properties for the ISPH structural part. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynalogging/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynalogging/index.rst.txt new file mode 100644 index 000000000..a3aa4eec3 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynalogging/index.rst.txt @@ -0,0 +1,811 @@ +:py:mod:`ansys.dyna.core.pre.dynalogging` +========================================= + +.. py:module:: ansys.dyna.core.pre.dynalogging + +.. autoapi-nested-parse:: + + Logging module supplying a general framework for logging in the PyDYNA + ``pre`` service. + + This module is built upon the `Python logging `_ + module. It is not intended to replace this Python module but rather to provide a way + for it and the PyDyna ``pre`` service to interact. + + The loggers used in this PyDyna logging mdoule include the name of the instance, + which is intended to be unique. This name is printed in all the active + outputs and is used to track the different instances of the PyDyNA ``pre`` + service. + + Global logger + ------------- + The global logger, named ``pydyna_global``, is created at + ``ansys.dyna.core.__init__``. If you want to use the global logger, + you must call it at the top of your module: + + .. code:: python + + from ansys.dyna.core.pre import LOG + + You can rename the global logger to avoid conflicts with other loggers (if any): + + .. code:: python + + from ansys.dyna.core.pre import LOG as logger + + + The default logging level of ``LOG`` is ``ERROR``. To change this to output + lower-level messages, you can use this code: + + .. code:: python + + LOG.logger.setLevel("DEBUG") + LOG.file_handler.setLevel("DEBUG") # If present. + LOG.stdout_handler.setLevel("DEBUG") # If present. + + + Alternatively, you can set the logging level of ``LOG`` to ``DEBUG`` + with one line of code:: + + .. code:: python + + LOG.setLevel("DEBUG") + + Using the preceding line ensures that all the handlers are set to the input log level. + + By default, this logger does not log to a file. If you want to log to a file, + you can add a file handler: + + .. code:: python + + import os + + file_path = os.path.join(os.getcwd(), "pydyna.log") + LOG.log_to_file(file_path) + + The preceding code sets the logger to also redirect to a file. If you want + to change the characteristics of the global logger from the beginning + of the execution, you must edit the ``__init__`` file in the + ``ansys.dyna.core.pre`` directory. + + To log using this logger, call the desired method as a normal logger. + + + Instance loggers + ---------------- + Every time an instance of the :class:`Mapdl ` + class is created, a logger is created and stored in two places: + + * ``_MapdlCore._log``: For backward compatibility. + * ``LOG._instances``: This field is a dictionary where the key is the name + of the created logger. + + Instance loggers inheritate the ``pydyna_global`` output handlers and + logging level unless otherwise specified. Instance loggers work in a + similar way to the global logger. You can use the + :func:`log_to_file() ` method to add + a file handler or the :func:`logger.Logging.setLevel` method to change + the log level. + + Other loggers + ~~~~~~~~~~~~~ + You can create your own loggers using the Python ``logging`` module as + you would do in any other script. No conflicts between these loggers exist. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynalogging.PymapdlCustomAdapter + ansys.dyna.core.pre.dynalogging.PymapdlPercentStyle + ansys.dyna.core.pre.dynalogging.PymapdlFormatter + ansys.dyna.core.pre.dynalogging.InstanceFilter + ansys.dyna.core.pre.dynalogging.Logger + + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynalogging.addfile_handler + ansys.dyna.core.pre.dynalogging.add_stdout_handler + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynalogging.LOG_LEVEL + ansys.dyna.core.pre.dynalogging.FILE_NAME + ansys.dyna.core.pre.dynalogging.DEBUG + ansys.dyna.core.pre.dynalogging.INFO + ansys.dyna.core.pre.dynalogging.WARN + ansys.dyna.core.pre.dynalogging.ERROR + ansys.dyna.core.pre.dynalogging.CRITICAL + ansys.dyna.core.pre.dynalogging.STDOUT_MSG_FORMAT + ansys.dyna.core.pre.dynalogging.FILE_MSG_FORMAT + ansys.dyna.core.pre.dynalogging.DEFAULT_STDOUT_HEADER + ansys.dyna.core.pre.dynalogging.DEFAULT_FILE_HEADER + ansys.dyna.core.pre.dynalogging.NEW_SESSION_HEADER + ansys.dyna.core.pre.dynalogging.string_to_loglevel + + +.. py:data:: LOG_LEVEL + + + +.. py:data:: FILE_NAME + :value: 'pydyna.log' + + + +.. py:data:: DEBUG + + + +.. py:data:: INFO + + + +.. py:data:: WARN + + + +.. py:data:: ERROR + + + +.. py:data:: CRITICAL + + + +.. py:data:: STDOUT_MSG_FORMAT + :value: '%(levelname)s - %(instance_name)s - %(module)s - %(funcName)s - %(message)s' + + + +.. py:data:: FILE_MSG_FORMAT + + + +.. py:data:: DEFAULT_STDOUT_HEADER + :value: Multiline-String + + .. raw:: html + +
Show Value + + .. code-block:: python + + """ + LEVEL - INSTANCE NAME - MODULE - FUNCTION - MESSAGE + """ + + .. raw:: html + +
+ + + +.. py:data:: DEFAULT_FILE_HEADER + + + +.. py:data:: NEW_SESSION_HEADER + + + +.. py:data:: string_to_loglevel + + + +.. py:class:: PymapdlCustomAdapter(logger, extra=None) + + + Bases: :py:obj:`logging.LoggerAdapter` + + + Adapter for keeping the reference to an MAPDL instance name dynamic. + + Using the standard approach, extra parameters must be supplied + to the logger to indicate the MAPDL instance for which messages + must be logged. + + With this class, you only have to specify the MAPDL instance + that you are referring to once. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: level + + + + .. py:attribute:: file_handler + + + + .. py:attribute:: stdout_handler + + + + .. py:method:: process(msg, kwargs) + + + Process the logging message and keyword arguments passed in to + a logging call to insert contextual information. You can either + manipulate the message itself, the keyword args or both. Return + the message and kwargs modified (or not) to suit your needs. + + Normally, you'll only need to override this one method in a + LoggerAdapter subclass for your specific needs. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: log_to_file(filename=FILE_NAME, level=LOG_LEVEL) + + + Add a file handler to the logger. + + + :Parameters: + + **filename** : :class:`python:str`, :obj:`optional` + Name of the file where logs are recorded. The default is ``FILE_NAME``. + + **level** : :class:`python:str`, :obj:`optional` + Level of logging. The default is ``LOG_LEVEL``, which causes all messages + to be recorded. For example, you can set the level of logging to ``DEBUG``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: log_to_stdout(level=LOG_LEVEL) + + + Add a standard output handler to the logger. + + + :Parameters: + + **level** : :class:`python:str`, :obj:`optional` + Level of logging record. The default is ``LOG_LEVEL``, which causes all messages + to be recorded. For example, you can set the level of logging to ``"DEBUG"``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: setLevel(level='DEBUG') + + + Change the log level of the object and the attached handlers. + + + :Parameters: + + **level** : :class:`python:str`, :obj:`optional` + Level of logging record. The default is ``"DEBUG``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: PymapdlPercentStyle(fmt, *, defaults=None) + + + Bases: :py:obj:`logging.PercentStyle` + + +.. py:class:: PymapdlFormatter(fmt=STDOUT_MSG_FORMAT, datefmt=None, style='%', validate=True, defaults=None) + + + Bases: :py:obj:`logging.Formatter` + + + Provides a customized ``Formatter`` class for overwriting the default format styles. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: InstanceFilter(name='') + + + Bases: :py:obj:`logging.Filter` + + + Ensures that the ``instance_name`` record always exists. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: filter(record) + + + Determine if the specified record is to be logged. + + Returns True if the record should be logged, or False otherwise. + If deemed appropriate, the record may be modified in-place. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Logger(level=logging.DEBUG, to_file=False, to_stdout=True, filename=FILE_NAME) + + + + Provides the logger used for each PyDyna ``pre`` session. + + This class allows you to add handlers to the logger to output to a file or + standard output. + + :Parameters: + + **level** : :class:`python:int`, :obj:`optional` + Logging level to filter the message severity allowed in the logger. + The default is ``logging.DEBUG``. + + **to_file** : :ref:`bool `, :obj:`optional` + Whether to write log messages to a file. The default is ``False``. + + **to_stdout** : :ref:`bool `, :obj:`optional` + Whether to write log messages to the standard output. The default is + ``True``. + + **filename** : :class:`python:str`, :obj:`optional` + Name of the file to write log messages to if ``to_file=True``. The default + is ``FILE_NAME``. + + + + + + + + + + + + .. rubric:: Examples + + Demonstrate logger usage from an MAPDL instance mapdl. This logger is + automatically created when an MAPDL instance is created. + + >>> from ansys.mapdl.core import launch_mapdl + >>> mapdl = launch_mapdl(loglevel='DEBUG') + >>> mapdl._log.info('This is a useful message') + INFO - - - - This is LOG debug message. + + Import the global PYMAPDL logger and add a file output handler. + + >>> import os + >>> from ansys.mapdl.core import LOG + >>> file_path = os.path.join(os.getcwd(), 'pymapdl.log') + >>> LOG.log_to_file(file_path) + + + + .. + !! processed by numpydoc !! + .. py:attribute:: file_handler + + + + .. py:attribute:: std_out_handler + + + + .. py:method:: log_to_file(filename=FILE_NAME, level=LOG_LEVEL) + + + Add a file handler to logger. + + + :Parameters: + + **filename** : :class:`python:str`, :obj:`optional` + Name of the file where the logs are recorded. The default + is ``FILE_NAME``, in which case they are recorded in the + ``'pymapdl.log'`` file. + + **level** : :class:`python:str`, :obj:`optional` + Level of logging. The default is ``LOG_LEVEL``, in which + case ``'DEBUG'`` is used. + + + + + + + + + + + + .. rubric:: Examples + + Write to the ``pymapdl.log`` file in the current working directory. + + >>> from ansys.mapdl.core import LOG + >>> import os + >>> file_path = os.path.join(os.getcwd(), 'pymapdl.log') + >>> LOG.log_to_file(file_path) + + + + .. + !! processed by numpydoc !! + + .. py:method:: log_to_stdout(level=LOG_LEVEL) + + + Add a standard output handler to the logger. + + + :Parameters: + + **filename** : :class:`python:str`, :obj:`optional` + Name of the file where the logs are recorded. The default + is ``FILE_NAME``, in which case they are recorded in the + ``'pymapdl.log'`` file. + + **level** : :class:`python:str`, :obj:`optional` + Level of logging. The default is ``LOG_LEVEL``, in which + case ``'DEBUG'`` is used. + + **write_headers** : :ref:`bool `, :obj:`optional` + Whether to write the headers to the file. The default is ``True``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: setLevel(level='DEBUG') + + + Change the log level of the object and the attached handlers. + + + :Parameters: + + **level** : :class:`python:str`, :obj:`optional` + Level of logging. The default is ``'DEBUG'``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: add_child_logger(sufix, level=None) + + + Add a child logger to the main logger. + + This child logger is more general than an instance logger, which is designed to + track the state of MAPDL instances. + + If the logging level is in the arguments, a new logger with a reference + to the ``_global`` logger handlers is created instead of a child logger. + + :Parameters: + + **sufix** : :class:`python:str` + Name of the logger. + + **level** : :class:`python:str`, :obj:`optional` + Level of logging. The default is ``None``. + + :Returns: + + :obj:`logging.logger` + Logger class. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: add_instance_logger(name, mapdl_instance, level=None) + + + Create a logger for an MAPDL instance. + + The MAPDL instance logger is a logger with an adapter that adds + contextual information, such as the MAPDL instance name. This logger is + returned, and you can use it to log events as a normal logger. It is also + stored in the ``_instances`` field. + + :Parameters: + + **name** : :class:`python:str` + Name for the new logger. + + **mapdl_instance** : :obj:`ansys.mapdl.core.mapdl._MapdlCore` + MAPDL instance object. This should contain the ``name`` attribute. + + :Returns: + + :obj:`ansys.mapdl.core.logging.PymapdlCustomAdapter` + Logger adapter customized to add MAPDL information to the + logs. You can use this class to log events in the same + way you use the ``logger`` class. + + + + + :Raises: + + :obj:`Exception` + You can only input strings as ``name`` to this method. + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: __getitem__(key) + + + .. py:method:: add_handling_uncaught_expections(logger) + + + Redirect the output of an exception to the logger. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:function:: addfile_handler(logger, filename=FILE_NAME, level=LOG_LEVEL, write_headers=False) + + + Add a file handler to the input. + + + :Parameters: + + **logger** : :obj:`logging.Logger` or :obj:`logging.Logger` + Logger to add the file handler to. + + **filename** : :class:`python:str`, :obj:`optional` + Name of the output file. The default is ``FILE_NAME``. + + **level** : :class:`python:str`, :obj:`optional` + Level of logging. The default is ``LOG_LEVEL``. + + **write_headers** : :ref:`bool `, :obj:`optional` + Whether to write the headers to the file. The default is ``False``. + + :Returns: + + :obj:`logger` + Logger or Logger object. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:function:: add_stdout_handler(logger, level=LOG_LEVEL, write_headers=False) + + + Add a file handler to the logger. + + + :Parameters: + + **logger** : :obj:`logging.Logger` or :obj:`logging.Logger` + Logger to add the file handler to. + + **level** : :class:`python:str`, :obj:`optional` + Level of logging. The default is ``LOG_LEVEL``, in which + case ``""DEBUG" is used``. + + **write_headers** : :ref:`bool `, :obj:`optional` + Whether to write the headers to the file. The default is ``False``. + + :Returns: + + :obj:`logger` + Logger or Logger object. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynamaterial/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynamaterial/index.rst.txt new file mode 100644 index 000000000..2f097460a --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynamaterial/index.rst.txt @@ -0,0 +1,1727 @@ +:py:mod:`ansys.dyna.core.pre.dynamaterial` +========================================== + +.. py:module:: ansys.dyna.core.pre.dynamaterial + +.. autoapi-nested-parse:: + + Material API + ============= + + Module for creating a material. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynamaterial.Air + ansys.dyna.core.pre.dynamaterial.Liner + ansys.dyna.core.pre.dynamaterial.HighExplosive + ansys.dyna.core.pre.dynamaterial.Vacuum + ansys.dyna.core.pre.dynamaterial.MatNull + ansys.dyna.core.pre.dynamaterial.EMEOSTabulated1 + ansys.dyna.core.pre.dynamaterial.EMMATTYPE + ansys.dyna.core.pre.dynamaterial.MatAdditional + ansys.dyna.core.pre.dynamaterial.MatElastic + ansys.dyna.core.pre.dynamaterial.MatPlasticKinematic + ansys.dyna.core.pre.dynamaterial.MatElasticPlasticThermal + ansys.dyna.core.pre.dynamaterial.MatRigid + ansys.dyna.core.pre.dynamaterial.MatCrushableFoam + ansys.dyna.core.pre.dynamaterial.MatThermalIsotropic + ansys.dyna.core.pre.dynamaterial.MatThermalOrthotropic + ansys.dyna.core.pre.dynamaterial.MatRigidDiscrete + ansys.dyna.core.pre.dynamaterial.MatPiecewiseLinearPlasticity + ansys.dyna.core.pre.dynamaterial.MatModifiedPiecewiseLinearPlasticity + ansys.dyna.core.pre.dynamaterial.MatSpotweld + ansys.dyna.core.pre.dynamaterial.MatFabric + ansys.dyna.core.pre.dynamaterial.MatSpringNonlinearElastic + ansys.dyna.core.pre.dynamaterial.MatDamperViscous + ansys.dyna.core.pre.dynamaterial.MatDamperNonlinearViscous + ansys.dyna.core.pre.dynamaterial.MatSPHIncompressibleFluid + ansys.dyna.core.pre.dynamaterial.MatSPHIncompressibleStructure + + + + +.. py:class:: Air(mass_density=0.00128, pressure_cutoff=-1e-09, initial_internal_energy=2.5331e-06, initial_relative_volume=1.0, equation_coefficient=[0, 0, 0, 0, 0.4, 0.4, 0]) + + + + Defines an air material. + + + :Parameters: + + **name** : :class:`python:str` + Material name. + + **mass_density** : :class:`python:float`, :obj:`optional` + Mass density. The default is ``0.00128``. + + **pressure_cutoff** : :class:`python:float`, :obj:`optional` + pressure cutoff. The default is ``1e-09``. + + **initial_internal_energy** : :class:`python:float`, :obj:`optional` + Initial internal energy per unit reference volume. + The default is ``2.5331e-06``. + + **initial_relative_volume** : :class:`python:float`, :obj:`optional` + Initial relative volume. The default is ``1.0``. + + **equation_coefficient** : :class:`python:list`, :obj:`optional` + Six polynomial equation coefficient. The default is + ``[0, 0, 0, 0, 0.4, 0.4, 0])``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create an air material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Liner(mass_density=8.96, shear_modulus=0.46, youngs_modulus=0, poissons_ratio=0.34, constants=[0.0009, 0.00292, 0.31, 0.025, 1.09], melt_temperature=1356, room_temperature=293, strain_rate=1e-06, specific_heat=3.83e-06, tensile_failure_stress=-0.012, spall_type=2, iteration_option=0, failure_parameters=[0.54, 4.89, 3.03, 0.014, 1.12], equation_constants=[0.394, 1.489, 0, 0, 2.02], volume_correction_coefficient=0.47, initial_internal_energy=0) + + + + Defines a liner material. + + + :Parameters: + + **mass_density** : :class:`python:float`, :obj:`optional` + Mass density. The default is ``8.96``. + + **shear_modulus** : :class:`python:float`, :obj:`optional` + .. + + **youngs_modulus** : :class:`python:float`, :obj:`optional` + .. + + **poissons_ratio** : :class:`python:float` :obj:`optional` + .. + + **constants** : :class:`python:list`, :obj:`optional` + .. + + **melt_temperature** : :class:`python:int`, :obj:`optional` + .. + + **room_temperature** : :class:`python:int`, :obj:`optional` + .. + + **strain_rate** : :class:`python:float`, :obj:`optional` + .. + + **specific_heat** : :class:`python:float`, :obj:`optional` + .. + + **tensile_failure_stress** : :class:`python:float`, :obj:`optional` + .. + + **spall_type, int, optional** + .. + + **iteration_option ; int, optional** + .. + + **failure_parameters** : :class:`python:list`, :obj:`optional` + .. + + **equation_constants, list, optional** + .. + + **volume_correction_coefficient** : :class:`python:float`, :obj:`optional` + .. + + **initial_internal_energy** : :class:`python:float`, :obj:`optional` + Initial internal energy per unit reference volume. + The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a liner material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: HighExplosive(mass_density=1.835, detonation_velocity=0.88, chapman_jouget_pressure=0.37, jwl_equation_parameters=[8.261, 0.1724, 4.55, 1.32, 0.38, 0.102, 1.0]) + + + + Defines a high-explosive material. + + + :Parameters: + + **mass_density** : :class:`python:float`, :obj:`optional` + Mass density. The default is ``8.96``. + + **detonation_velocity** : :class:`python:float`, :obj:`optional` + .. + + **chapman_jouget_pressure** : :class:`python:float`, :obj:`optional` + .. + + **jwl_equation_parameters** : :class:`python:list`, :obj:`optional` + .. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a high-explosive material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Vacuum(estimated_material_density=1e-09) + + + + Defines a vacuum material. + + + :Parameters: + + **estimated_material_density** : :class:`python:float` + Estimated material density. The default is ``1e-09``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a null material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatNull(mass_density=0, pressure_cutoff=0) + + + + Defines a null material. + + Young's modulus and Poisson's ratio are used to set the contact stiffness. + + :Parameters: + + **mass_density** : :class:`python:float`, :obj:`optional` + Mass density. The default is ``0``. + + **pressure_cutoff** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a null material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: EMEOSTabulated1(curve=None) + + + + Defines electrical conductivity or permeability. + + + :Parameters: + + **curve** : :obj:`Curve` + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create an EM EOS tabulated1. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: EMMATTYPE + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: AIR_OR_VACUUM + :value: 0 + + + + .. py:attribute:: INSULATOR + :value: 1 + + + + .. py:attribute:: CONDUCTOR + :value: 2 + + + + +.. py:class:: MatAdditional + + + + Defines additional properties for a material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_electromagnetic_property(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0, eos=None) + + + Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + + :Parameters: + + **material_type** + .. + + **initial_conductivity** + .. + + **eos** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0, eos=None) + + + Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + + :Parameters: + + **material_type** + .. + + **initial_conductivity** + .. + + **eos** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_em_permeability_different(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0, eos=None, murel=0) + + + Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + + :Parameters: + + **material_type** + .. + + **initial_conductivity** + .. + + **eos** + .. + + **murel** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_em_conducting_shells_3d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0) + + + Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + + :Parameters: + + **material_type** + .. + + **initial_conductivity** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=0) + + + Define the electromagnetic material type and properties + for a material whose permeability equals the free space permeability. + + + :Parameters: + + **material_type** + .. + + **initial_conductivity** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_em_randles_batmac(positive_current_collector_conductivity=0, negative_current_collector_conductivity=0) + + + Define two conductivities per EM node for special applications (Randles Batmac). + + + :Parameters: + + **positive_current_collector_conductivity** : :class:`python:float` + conductivities of the positive current collector materials + + **negative_current_collector_conductivity** : :class:`python:float` + conductivities of the negative current collector materials + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_thermal_isotropic(density=0, generation_rate=0, generation_rate_multiplier=0, specific_heat=0, conductivity=0) + + + Define isotropic thermal properties. + + + :Parameters: + + **density** + .. + + **generation_rate** + .. + + **generation_rate_multiplier** + .. + + **specific_heat** + .. + + **conductivity** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create(stub, matid) + + + Define additional properties for a material. + + + :Parameters: + + **matid** + Material ID. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatElastic(mass_density=0, young_modulus=0, poisson_ratio=0.3) + + + Bases: :py:obj:`MatAdditional` + + + Defines an isotropic hypoelastic material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create an elastic material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatPlasticKinematic(mass_density=0, young_modulus=0, poisson_ratio=0.3, yield_stress=0, tangent_modulus=0, hardening=0) + + + + Define material of modelling isotropic and kinematic hardening plasticity. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create plastic kinematic material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatElasticPlasticThermal(mass_density=0, temperatures=None, young_modulus=None, poisson_ratio=None, thermal_expansion=None, yield_stress=None) + + + Bases: :py:obj:`MatAdditional` + + + Defines temperature-dependent material coefficients. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create elastic plastic thermal material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatRigid(mass_density=0, young_modulus=0, poisson_ratio=0.3, center_of_mass_constraint=0, translational_constraint=0, rotational_constraint=0) + + + Bases: :py:obj:`MatAdditional` + + + Defines a rigid material. + + Parts made from a rigid material are considered to belong to a rigid body. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create rigid material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatCrushableFoam(mass_density=0, young_modulus=0, poisson_ratio=0.3, yield_stress_curve=None, tensile_stress_cutoff=0) + + + Bases: :py:obj:`MatAdditional` + + + Define material of modelling crushable foam. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create crushable foam material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatThermalIsotropic(density=0, generation_rate=0, generation_rate_multiplier=0, specific_heat=0, conductivity=0) + + + + Defines isotropic thermal properties. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create isotropic thermal material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatThermalOrthotropic(specific_heat=0, conductivity_x=0, conductivity_y=0, conductivity_z=0) + + + + Defines orthotropic thermal properties. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create orthotropic thermal material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatRigidDiscrete(mass_density=0, young_modulus=0, poisson_ratio=0.3) + + + + Defines a rigid material for shells or solids. + + + :Parameters: + + **mass_density** + .. + + **young_modulus** + .. + + **poisson_ratio** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a rigid material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatPiecewiseLinearPlasticity(mass_density=0, young_modulus=0, poisson_ratio=0.3, yield_stress=0, tangent_modulus=0) + + + + Defines an elasto-plastic material with an arbitrary stress. + + The arbitrary stress is defined as a function of strain curve + that can also have an arbitrary strain rate dependency. + + :Parameters: + + **mass_density** + .. + + **young_modulus** + .. + + **poisson_ratio** + .. + + **yield_stress** + .. + + **tangent_modulus** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a piecewise linear plasticity material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatModifiedPiecewiseLinearPlasticity(mass_density=0, young_modulus=0, poisson_ratio=0, yield_stress=0, tangent_modulus=0, plastic_strain_to_failure=0, integration_points_number=0) + + + + Defines an elasto-plastic material supporting an arbitrary stress. + + The arbitrary stress is defined as a function of strain curve and arbitrary + strain rate dependency. + + :Parameters: + + **mass_density** + .. + + **young_modulus** + .. + + **poisson_ratio** + .. + + **yield_stress** + .. + + **tangent_modulus** + .. + + **plastic_strain_to_failure** + .. + + **integration_points_number** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a modified piecewise linear plasticity. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatSpotweld(mass_density=0, young_modulus=0, poisson_ratio=0, yield_stress=0, plastic_hardening_modulus=0, axial_force_resultant_at_failure=0, force_resultant_nrs_at_failure=0, force_resultant_nrt_at_failure=0) + + + + Defines a spotweld material. + + + :Parameters: + + **mass_density** + .. + + **young_modulus** + .. + + **poisson_ratio** + .. + + **yield_stress** + .. + + **plastic_hardening_modulus** + .. + + **axial_force_resultant_at_failure** + .. + + **force_resultant_nrs_at_failure** + .. + + **force_resultant_nrt_at_failure** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a spotweld material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatFabric(mass_density=0, young_modulus_longitudinal_direction=0, young_modulus_transverse_direction=0, minor_poisson_ratio=0.35, major_poisson_ratio=0.35, shear_modulus=0) + + + + Define an airbag material. + + + :Parameters: + + **mass_density** : :class:`python:float`, :obj:`optional` + Mass density. The default is ``0``. + + **young_modulus_longitudinal_direction** : :class:`python:float`, :obj:`optional` + Young's modulus-longitudinal direction. The default is ``0``. + + **young_modulus_transverse_direction** : :class:`python:float`, :obj:`optional` + Young's modulus-transverse direction. The default is ``0``. + + **minor_poisson_ratio** : :class:`python:float`, :obj:`optional` + Minor Poisson's ratio ba direction. The default is ``0.35``. + + **major_poisson_ratio** : :class:`python:float`, :obj:`optional` + Major Poisson's ratio ab direction. The default is ``0.35``. + + **shear_modulus** : :class:`python:float`, :obj:`optional` + Shear modulus in the ab direction. The default is ``0``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create an airbag material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatSpringNonlinearElastic(curve) + + + + Provides a nonlinear elastic translational and rotational spring with an arbitrary force. + + The arbitrary force is defined as a function of displacement. The moment is defined + as a function of rotation. + + :Parameters: + + **curve** : :obj:`Curve` + Load curve describing force as a function of displacement or moment as a function of rotation relationship. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create material spring nonlinear elastic. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatDamperViscous(damping_constant=0) + + + + Provides a linear translational or rotational damper located between two nodes. + + + :Parameters: + + **damping_constant** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a material damper viscous. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatDamperNonlinearViscous(curve) + + + + Provides a viscous translational damper with an arbitrary force. + + The arbitrary force is defined as a function of velocity dependency or a rotational + damper with an arbitrary moment as a function of rotational velocity dependency. + + :Parameters: + + **curve** : :obj:`Curve` + Load curve defining force as a function of rate-of-displacement + relationship or a moment as a function of rate-of-rotation relationship. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create a material damper nonlinear viscous. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatSPHIncompressibleFluid(mass_density=0, dynamic_viscosity=0, tension_coefficient1=0, tension_coefficient2=0) + + + + Defines an ISPH (incompressible smooth particle hyrodynamics) fluid material. + + + :Parameters: + + **mass_density** : :class:`python:float`, :obj:`optional` + Mass density. The default is ``0``. + + **dynamic_viscosity** + .. + + **tension_coefficient1** + .. + + **tension_coefficient2** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create an ISPH fluid material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: MatSPHIncompressibleStructure(mass_density=0, adhesion_coefficient=0, roughness_coefficient=0, adhesion_scaling_coefficient=0) + + + + Defines an ISPH structure material. + + + :Parameters: + + **mass_density** : :class:`python:float`, :obj:`optional` + Mass density. The default is ``0``. + + **adhension_coefficient** + .. + + **roughness_coefficient** + .. + + **adhesion_scaling_coefficient** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create(stub) + + + Create an ISPH structure material. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynamech/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynamech/index.rst.txt new file mode 100644 index 000000000..a96b1b838 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynamech/index.rst.txt @@ -0,0 +1,562 @@ +:py:mod:`ansys.dyna.core.pre.dynamech` +====================================== + +.. py:module:: ansys.dyna.core.pre.dynamech + +.. autoapi-nested-parse:: + + Mechanical API + ============== + + Module for setting up explicit or implicit analysis. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynamech.AnalysisType + ansys.dyna.core.pre.dynamech.DynaMech + ansys.dyna.core.pre.dynamech.Airbag + + + + +.. py:class:: AnalysisType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: EXPLICIT + :value: 1 + + + + .. py:attribute:: IMPLICIT + :value: 2 + + + + .. py:attribute:: NONE + :value: 3 + + + + +.. py:class:: DynaMech(analysis=AnalysisType.EXPLICIT) + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.DynaBase` + + + Defines a Mechanical analysis. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create_control_output(npopt=0, neecho=0) + + + Set miscellaneous output parameters. + + + :Parameters: + + **npopt** : :class:`python:int`, :obj:`optional` + Print suppression during the input phase flag for the D3HSP file. + The default is ``0``. Options are: + + - EQ.0: No suppression. + - EQ.1: Nodal coordinates, element connectivities, rigid wall definitions, + nodal SPCs, initial velocities, initial strains, adaptive constraints, and + SPR2/SPR3 constraints are not printed. + + **neecho** : :class:`python:int`, :obj:`optional` + Print suppression during the input phase flag for the echo file. + The default is ``0``. Options are: + + - EQ.0: All data is printed. + - EQ.1: Nodal printing is suppressed. + - EQ.2: Element printing is suppressed. + - EQ.3: Both nodal and element printing is suppressed. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_init_velocity(translational=Velocity(0, 0, 0), rotational=RotVelocity(0, 0, 0)) + + + Define initial nodal point velocities using a nodal set ID. + + + :Parameters: + + **nsid** : :class:`python:int` + Nodal set ID. + + **translational** : :obj:`Velocity` + Initial translational velocity in the x,y,z-direction. + + **rotational** : :obj:`RotVelocity` + Initial rotational velocity about the x,y,z-axis. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_defineorientation(vid, iop, vector, node1, node2) + + + Define orientation vectors for discrete springs and dampers. + + + :Parameters: + + **vid** : :class:`python:int` + Orientation vector ID. + + **iop** : :class:`python:int` + Options are: + + - EQ.0: Deflections/rotations are measured and forces/moments are applied + along the following orientation vector. + - EQ.1: Deflections/rotations are measured and forces/moments are applied + along the axis between the two spring/damper nodes projected onto the plane normal + to the following orientation vector. + - EQ.2: Deflections/rotations are measured and forces/moments are applied + along a vector defined by the following two nodes. + - EQ.3: Deflections/rotations are measured and forces/moments are applied + along the axis between the two spring/damper nodes projected onto the + plane normal to the a vector defined by the following two nodes. + + **vector** : :class:`python:list` [x,y,z] + x,y,z : x,y,z-value of the orientation vector. + + **node1** : :class:`python:int` + Node 1 ID. + + **node2** : :class:`python:int` + Node 2 ID. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_shellset(option, title, sid, eids) + + + Define a set of shell elements with optional identical or unique attributes. + + + :Parameters: + + **option** : :class:`python:str` + Available options. Choices are ````,``LIST``, and ``GENERAL``. + + **title** : :class:`python:str` + Title for the shell set. + + **sid** : :class:`python:int` + Set ID. + + **eids** : :class:`python:list` + List of shell element IDs. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_solidset(title, sid, ki) + + + Define a set of solid elements. + + + :Parameters: + + **title** : :class:`python:str` + Title for the set of solid elements. + + **sid** : :class:`python:int` + Set ID. + + **ki** : :class:`python:list` + Solid element IDs. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_section_solid(title, secid, elform) + + + Define section properties for solid continuum and fluid elements. + + + :Parameters: + + **title** : :class:`python:str` + Title for section solid. + + **secid** : :class:`python:int` + Section ID. ``SECID`` is referenced on the ``\*PART`` card. + A unique number must be specified. + + **elform** : :class:`python:int` + Element formulation options. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_section_discrete(secid, dro=0, kd=0, v0=0, cl=0, fd=0, cdl=0, tdl=0) + + + Defined spring and damper elements for translation and rotation. + + + :Parameters: + + **secid** : :class:`python:int` + Section ID. + + **dro** : :class:`python:int`, :obj:`optional` + Displacement/rotation. The default is ``0``. Options are: + + - EQ.0: Material describes a translational spring/damper. + - EQ.1: Material describes a torsional spring/damper. + + **kd** : :class:`python:float`, :obj:`optional` + Dynamic magnification factor. The default is ``0``. + + **v0** : :class:`python:float`, :obj:`optional` + Test velocity. The default is ``0``. + + **cl** : :class:`python:float`, :obj:`optional` + Clearance. The default is ``0``. + + **fd** : :class:`python:float`, :obj:`optional` + Failure deflection. The default is ``0``. + + **cdl** : :class:`python:float`, :obj:`optional` + Deflection limit in compression. The default is ``0``. + + **td1** : :class:`python:float`, :obj:`optional` + Deflection limit in tension. The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_hourglass(ghid, ihq, qm=0.1, q1=1.5, q2=0.06, qb=1e-09, qw=1e-09) + + + Define hourglass and bulk viscosity properties. + + + :Parameters: + + **ghid** : :class:`python:int` + Hourglass ID. A unique number or label must be specified. + + **ihq** : :class:`python:int` + Hourglass control type. + + **qm** : :class:`python:float`, :obj:`optional` + Hourglass coefficient. The default is ``0.1``. + + **q1** : :class:`python:float`, :obj:`optional` + Quadratic bulk viscosity coefficient. The default is ``1.5``. + + **q2** : :class:`python:float`, :obj:`optional` + Linear bulk viscosity coefficient. The default is ``0.06``. + + **qb** : :class:`python:float`, :obj:`optional` + Hourglass coefficient for shell bending. The default is ``1e-09``. + + **qw** : :class:`python:float`, :obj:`optional` + Hourglass coefficient for shell warping. The default is ``1e-09``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file(defaultsetting=1) + + + Save keyword files. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: Airbag(set, heat_capacity_at_constant_volume=0, heat_capacity_at_constant_pressure=0, input_gas_temperature=0, input_mass_flow_rate=Curve(x=[], y=[]), shape_factor_for_exit_hole=0, ambient_pressure=0, ambient_density=0) + + + + Defines an airbag or control volume. + + + :Parameters: + + **Set** : :obj:`SegmentSet` or :obj:`PartSet` + Set. Options are: + + - EQ.0: Segment set ID. + - EQ.1: Part set ID. + + **heat_capacity_at_constant_volume** : :class:`python:float`, :obj:`optional` + Heat capacity at constant volume. The default is ``0``. + + **heat_capacity_at_constant_pressure** : :class:`python:float`, :obj:`optional` + Heat capacity at constant pressure. The default is ``0``. + + **input_gas_temperature** : :class:`python:float`, :obj:`optional` + Temperature of the input gas. The default is ``0``. + + **input_mass_flow_rate** : :class:`python:int`, :obj:`optional` + Load curve ID specifying the input mass flow rate. + The default is ``0``. + + **shape_factor_for_exit_hole** : :class:`python:float`, :obj:`optional` + Shape factor for exit hole. The default is ``0``. + + **ambient_pressure** : :class:`python:float`, :obj:`optional` + Ambient pressure. The default is ``0``. + + **ambient_density** : :class:`python:float`, :obj:`optional` + Ambient density. The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed.. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: create() + + + Create an airbag. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynanvh/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynanvh/index.rst.txt new file mode 100644 index 000000000..2dfdd9d58 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynanvh/index.rst.txt @@ -0,0 +1,385 @@ +:py:mod:`ansys.dyna.core.pre.dynanvh` +===================================== + +.. py:module:: ansys.dyna.core.pre.dynanvh + +.. autoapi-nested-parse:: + + NVH API + ========== + + Module for creating an NVH Dyna input deck. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynanvh.DynaNVH + ansys.dyna.core.pre.dynanvh.ExcitationDOF + ansys.dyna.core.pre.dynanvh.ExcitationType + ansys.dyna.core.pre.dynanvh.ResponseDOF + ansys.dyna.core.pre.dynanvh.ResponseType + ansys.dyna.core.pre.dynanvh.FrequencyDomain + + + + +.. py:class:: DynaNVH + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.DynaBase` + + + Contains methods for creating a keyword related to NVH. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: save_file() + + + Save keyword files. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: ExcitationDOF + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: VECTOR + :value: 0 + + + + .. py:attribute:: X + :value: 1 + + + + .. py:attribute:: Y + :value: 2 + + + + .. py:attribute:: Z + :value: 3 + + + + +.. py:class:: ExcitationType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: BASE_VELOCITY + :value: 0 + + + + .. py:attribute:: BASE_ACCELERATION + :value: 1 + + + + .. py:attribute:: BASE_DISPLACEMENT + :value: 2 + + + + .. py:attribute:: NODAL_FORCE + :value: 3 + + + + +.. py:class:: ResponseDOF + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: VECTOR + :value: 0 + + + + .. py:attribute:: X + :value: 1 + + + + .. py:attribute:: Y + :value: 2 + + + + .. py:attribute:: Z + :value: 3 + + + + +.. py:class:: ResponseType + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: BASE_VELOCITY + :value: 0 + + + + .. py:attribute:: BASE_ACCELERATION + :value: 1 + + + + .. py:attribute:: BASE_DISPLACEMENT + :value: 2 + + + + .. py:attribute:: NODAL_FORCE + :value: 3 + + + + +.. py:class:: FrequencyDomain + + + + Provides a way of defining and solving frequency domain vibration and acoustic problems. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_frequency_response_function(excitation_input_set=None, excitation_input_dof=ExcitationDOF.VECTOR, excitation_input_type=ExcitationType.NODAL_FORCE, max_natural_frequency=0, modal_damping_coefficient=0, modal_damping_coefficient_curve=None, modal_damping_coefficient_curve_type=0, response_output_set=None, response_output_dof=ResponseDOF.Y, response_output_type=ResponseType.BASE_VELOCITY, frf_output_min_frequency=0, frf_output_max_frequency=0, frf_output_num_frequency=0) + + + Compute frequency response functions due to nodal excitations. + + + :Parameters: + + **excitation_input_set** + .. + + **excitation_input_dof** + .. + + **excitation_input_type** + .. + + **max_natural_frequency** + .. + + **modal_damping_coefficient** + .. + + **modal_damping_coefficient_curve** + .. + + **modal_damping_coefficient_curve_type** + .. + + **response_output_set** + .. + + **response_output_dof** + .. + + **response_output_type** + .. + + **frf_output_min_frequency** + .. + + **frf_output_max_frequency** + .. + + **frf_output_num_frequency** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Define a frequency domain vibration and acoustic problem. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynasale/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynasale/index.rst.txt new file mode 100644 index 000000000..2eff43e56 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynasale/index.rst.txt @@ -0,0 +1,510 @@ +:py:mod:`ansys.dyna.core.pre.dynasale` +====================================== + +.. py:module:: ansys.dyna.core.pre.dynasale + +.. autoapi-nested-parse:: + + Airbag API + ========== + + Module for creating a S-ALE (Structured ALE) DYNA input deck. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynasale.AdvectionMethod + ansys.dyna.core.pre.dynasale.FillDirection + ansys.dyna.core.pre.dynasale.ControlPoint + ansys.dyna.core.pre.dynasale.StructuredMesh + ansys.dyna.core.pre.dynasale.DynaSALE + + + + +.. py:class:: AdvectionMethod + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: DONOR_CELL_WITH_HALF_INDEX_SHIFT + :value: 1 + + + + .. py:attribute:: VAN_LEER_WITH_HIS + :value: 2 + + + + .. py:attribute:: DONOR_CELL_WITH_HIS + :value: 3 + + + + .. py:attribute:: FINITE_VOLUME_METHOD + :value: 6 + + + + +.. py:class:: FillDirection + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.Enum` + + + Generic enumeration. + + Derive from this class to define new enumerations. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:attribute:: INSIDE_THE_GEOMETRY + :value: 0 + + + + .. py:attribute:: OUTSIDE_THE_GEOMETRY + :value: 1 + + + + +.. py:class:: ControlPoint(number, position, ratio) + + + + Provides spacing information for generating a 3D S-ALE mesh. + + + :Parameters: + + **number** : :class:`python:int` + Control point node number. + + **position** : :class:`python:float` + Control point position. + + **ratio** : :class:`python:float` + Ratio for progressive mesh spacing. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: StructuredMesh(control_points_x, control_points_y, control_points_z) + + + + Generates a structured 2D or 3D mesh and invokes the S-ALE solver. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: fill(material, geometry_type='NULL', nsample=4, define_geometry_parameters=[0, 0, 0, 0, 0], inout=FillDirection.INSIDE_THE_GEOMETRY, vid=0, reference_pressure=0) + + + Perform volume-filling operations on a S-ALE mesh. + + + :Parameters: + + **material_name** : :class:`python:str` + Material name. + + **geometry_type** : :class:`python:str` + Geometry type. The default is ``"Null"``. Options are: + + - BOXCOR + - BOXCPT + - CYLINDER + - PARTSET + - PART + - PLANE + - SEGSET + - SPHERE + + **nsample** : :class:`python:int`, :obj:`optional` + Number of sampling points. The default is ``4``. + + **define_geometry_parameters** : :class:`python:list` + List of values having different definitions for different options. + The default is ``[0, 0, 0, 0, 0]``. + + **in_out** : :class:`python:int`, :obj:`optional` + Flag for whether to fill inside or outside of the geometry. The + default is ``INSIDE_THE_GEOMETRY``. + + **vid** : :class:`python:int`, :obj:`optional` + Flag for assigning the initial velocity to the material filling the domain. + The default is ``0``. + + **reference_pressure** + .. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: refine(refine_factor_x=1, refine_factor_y=1, refine_factor_z=1) + + + Refine existing S-ALE meshes. + + + :Parameters: + + **refine_factor_x** : :class:`python:int`, :obj:`optional` + Refinement factor for the x-direction. The default is ``1``. + + **refine_factor_y** : :class:`python:int`, :obj:`optional` + Refinement factor for the y-direction. The default is ``1``. + + **refine_factor_z** : :class:`python:int`, :obj:`optional` + Refinement factor for the z-direction. The default is ``1``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: initial_detonation(detonation_point) + + + Define a point for initiating the location of a high-explosive detonation. + + + :Parameters: + + **detonation_point** : :obj:`Point` + Coordinates (x,y,z) of the detonation point. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create() + + + Create a mesh. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:class:: DynaSALE + + + Bases: :py:obj:`ansys.dyna.core.pre.dynabase.DynaBase` + + + Sets up the S-ALE simulation process. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: set_termination(endtime) + + + Set the time for ending the simulation. + + + :Parameters: + + **endtime** : :class:`python:float` + Time for ending the simulation. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_output_interval(database_plot_interval) + + + Request binary output. + + + :Parameters: + + **database_plot_interval** : :class:`python:float` + Time interval between output states. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_analysis_type(num_of_cycle=1, method=AdvectionMethod.DONOR_CELL_WITH_HALF_INDEX_SHIFT, background_pressure=0) + + + Set the analysis type. + + + :Parameters: + + **num_of_cycle** : :class:`python:float`, :obj:`optional` + Total time of simulation for the fluid problem. The + default is ``1``. + + **method** : :class:`python:float`, :obj:`optional` + Time step for the fluid problem. The default is + ``DONOR_CELL_WITH_HALF_INDEX_SHIFT``. + + **background_pressure** : :class:`python:int`, :obj:`optional` + Reference pressure for computing the internal forces. + The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_output_database(matsum=0, glstat=0) + + + Obtain output files containing the results. + + + :Parameters: + + **matsum** : :class:`python:float`, :obj:`optional` + Time interval between outputs of part energies. The + default is ``0``. + + **glstat** : :class:`python:float`, :obj:`optional` + Time interval between outputs of global statistics and energies. + The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file() + + + Save keyword files. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynasolution/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynasolution/index.rst.txt new file mode 100644 index 000000000..d1b8f9847 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/dynasolution/index.rst.txt @@ -0,0 +1,530 @@ +:py:mod:`ansys.dyna.core.pre.dynasolution` +========================================== + +.. py:module:: ansys.dyna.core.pre.dynasolution + +.. autoapi-nested-parse:: + + Solution + ======== + + Module for providing the top object that sets up a DYNA solution. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynasolution.DynaSolution + + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynasolution.init_log + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.dynasolution.CHUNK_SIZE + + +.. py:data:: CHUNK_SIZE + + + +.. py:function:: init_log(log_file) + + + Initialize a log file. + + + :Parameters: + + **log_file** : :class:`python:str` + Name of the log file. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: DynaSolution(hostname='localhost', port='50051') + + + + Contains methods for creating a general LS-DYNA keyword. + + + :Parameters: + + **hostname** : :class:`python:str`, :obj:`optional` + Host name. The default is ``"localhost"``. + + **port** : :class:`python:str`, :obj:`optional` + Port. the default is ``"50051"``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: grpc_local_server_on() -> bool + :staticmethod: + + + Check if the server is launched locally. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: get_stub() + + + Get the stub of the solution object. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: add(obj) + + + Add a case in the solution. + + + :Parameters: + + **obj** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: get_file_chunks(filename) + + + Get file chunks. + + + :Parameters: + + **filename** : :class:`python:str` + Name of the file. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: upload(stub_, filename) + + + Upload files to the server. + + + :Parameters: + + **stub_** + .. + + **filename** : :class:`python:str` + Name of the file. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: download(remote_name, local_name) + + + Download files from the server. + + + :Parameters: + + **stub_** + .. + + **remote_name** + .. + + **local_name** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: open_files(filenames) + + + Open initial model files. + + + :Parameters: + + **filenames** : :class:`python:list` + List of filenames. The main file is ``[0]``. The others are subfiles. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_termination(termination_time) + + + Set time for terminating the job. + + + :Parameters: + + **termination_time** : :class:`python:float` + Termination time. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_database_binary(filetype='D3PLOT', dt=0, maxint=3, ieverp=0, dcomp=1, nintsld=1) + + + Request binary output. + + + :Parameters: + + **filetype** : :class:`python:str`, :obj:`optional` + Type of file. The default is ``"D3PLOT"``. + + **dt** : :class:`python:float`, :obj:`optional` + Time interval between output states. The default is ``0``. + + **maxint** : :class:`python:int`, :obj:`optional` + Number of shell and thick shell through-thickness integration points + to output to the d3plot. The default is ``3``. + + **ieverp** : :class:`python:int`, :obj:`optional` + How to plot output states on plot files. The default is ``0``. Every output + state for the d3plot database is written to a separate file. Options are: + + - EQ.0: More than one state can be on each plot file. + - EQ.1: Only one state can be on each plot file. + + **dcomp** : :class:`python:int`, :obj:`optional` + Data compression to eliminate rigid body data. The default is ``1``. + + **nintsld** : :class:`python:int`, :obj:`optional` + Number of solid element integration points written to the LS-DYNA database. + The default is ``1``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: create_database_ascii(type, dt=0.0, binary=1, lcur=0, ioopt=0) + + + Obtain output files containing result information. + + + :Parameters: + + **type** : :class:`python:str` + Type of the database. Options are: + + - BNDOUT + - GLSTAT + - MATSUM + - NODFOR + - RCFORC + - SLEOUT + + **dt** : :class:`python:float`, :obj:`optional` + Time interval between outputs. The default is ``0.0``. + + **binary** : :class:`python:int`, :obj:`optional` + Flag for whether to generate binary output. The default is ``1``. + + **lcur** : :class:`python:int`, :obj:`optional` + Curve ID specifying the time interval between outputs. The default + is ``0``. + + **ioopt** : :class:`python:int`, :obj:`optional` + Flag for governing the behavior of the output frequency load curve + defined by the ``lcur`` parameter. The default is ``0``. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: set_output_database(matsum=0, glstat=0, elout=0, nodout=0, nodfor=0, rbdout=0, rcforc=0, secforc=0, rwforc=0, abstat=0, bndout=0, sleout=0, sphmassflow=0) + + + Obtain output files containing result information. + + + :Parameters: + + **matsum** : :class:`python:float`, :obj:`optional` + Time interval between outputs of part energies. The default is ``0``. + + **glstat** : :class:`python:float`, :obj:`optional` + Time interval between outputs of global statistics + and energies. The default is ``0``. + + **elout** + .. + + **nodout** + .. + + **modfor** + .. + + **rbdout** + .. + + **secforc** + .. + + **rwforce** + .. + + **bndout** + .. + + **sleout** + .. + + **sphmassflow** + .. + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: save_file() + + + Save keyword files. + + + + :Returns: + + :ref:`bool ` + ``True`` when successful, ``False`` when failed. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/errors/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/errors/index.rst.txt new file mode 100644 index 000000000..4f34c0f20 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/errors/index.rst.txt @@ -0,0 +1,175 @@ +:py:mod:`ansys.dyna.core.pre.errors` +==================================== + +.. py:module:: ansys.dyna.core.pre.errors + +.. autoapi-nested-parse:: + + Module containing PyDYNA-specific errors. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +.. py:data:: SIGINT_TRACKER + :value: [] + + + +.. py:data:: LOCKFILE_MSG + :value: Multiline-String + + .. raw:: html + +
Show Value + + .. code-block:: python + + """ + Either another Ansys job with the same job name is already running in this + directory or the lock file has not been deleted from an abnormally + terminated Ansys run. + + Disable this check by passing ``override=True`` + + """ + + .. raw:: html + +
+ + + +.. py:exception:: VersionError(msg='Invalid kwserver version') + + + Bases: :py:obj:`ValueError` + + + Provides the error raised when the kwserver is invalid. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:exception:: PydynaRuntimeError + + + Bases: :py:obj:`RuntimeError` + + + Provides the error raised when PyDYNA passes an error. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:exception:: PydynaInvalidRoutineError(msg='') + + + Bases: :py:obj:`RuntimeError` + + + Provides the error raised when MAPDL is in the wrong routine. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:exception:: LockFileException(msg=LOCKFILE_MSG) + + + Bases: :py:obj:`RuntimeError` + + + Provides the error raised when the lockfile has not been removed. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:exception:: KwserverDidNotStart(msg='') + + + Bases: :py:obj:`RuntimeError` + + + Provides the error raised when the kwserver process does not start. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/download_utilities/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/download_utilities/index.rst.txt new file mode 100644 index 000000000..b02148bb0 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/download_utilities/index.rst.txt @@ -0,0 +1,143 @@ +:py:mod:`ansys.dyna.core.pre.examples.download_utilities` +========================================================= + +.. py:module:: ansys.dyna.core.pre.examples.download_utilities + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.examples.download_utilities.DownloadManager + + + + +.. py:class:: DownloadManager + + + + Manages downloads of example files. + + Local paths are saved in this class so that a global cleanup + of example files can be performed when the client is closed. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: add_file(file_path: str) + + + Add the path for a downloaded example file to a list. + + This list keeps track of where example files are + downloaded so that a global cleanup of these files can be + performed when the client is closed. + + :Parameters: + + **file_path** : :class:`python:str` + Local path of the downloaded example file. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: clear_download_cache() + + + Remove downloaded example files from the local path. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: download_file(filename: str, *directory: str, destination: Optional[str] = None, force: bool = False) -> str + + + Download an example file from the PyPrimeMesh repository. + + + :Parameters: + + **filename** : :class:`python:str` + Name of the example file to download. + + **destination** : :class:`python:str`, :obj:`optional` + Path to download the example file to. The default + is ``None``, in which case the default path for app data + is used. + + **force** : :ref:`bool `, :obj:`optional` + Whether to always download the example file. The default is + ``False``, in which case if the example file is cached, it + is reused. + + **directory** : :class:`python:tuple`\[:class:`python:str`] + Path under the PyAnsys Github examples repository. + + :Returns: + + :class:`python:tuple`\[:class:`python:str`, :class:`python:str`] + Tuple containing the filepath to use and the local filepath of the downloaded + directory. The two are different in case of containers. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/examples/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/examples/index.rst.txt new file mode 100644 index 000000000..7980df4c6 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/examples/index.rst.txt @@ -0,0 +1,142 @@ +:py:mod:`ansys.dyna.core.pre.examples.examples` +=============================================== + +.. py:module:: ansys.dyna.core.pre.examples.examples + +.. autoapi-nested-parse:: + + Result Files Examples + ===================== + Examples result files. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +.. py:data:: airbag_deploy + + + +.. py:data:: em_railgun + + + +.. py:data:: em_resistive_heating + + + +.. py:data:: em_resistive_heating_2d + + + +.. py:data:: em_resistive_heating_2d_isopots + + + +.. py:data:: em_resistive_heating_2d_multi_isopots + + + +.. py:data:: em_rlc_isopotential + + + +.. py:data:: em_rlc_define_func + + + +.. py:data:: belted_dummy + + + +.. py:data:: ball_plate + + + +.. py:data:: cylinder_flow + + + +.. py:data:: internal_3d_flow + + + +.. py:data:: plate_flow + + + +.. py:data:: mesh_size + + + +.. py:data:: thermal_flow + + + +.. py:data:: free_convection_flow + + + +.. py:data:: dam_break + + + +.. py:data:: driven_cavity + + + +.. py:data:: weak_fsi + + + +.. py:data:: strong_fsi + + + +.. py:data:: imposed_move + + + +.. py:data:: mesh_adaptivity + + + +.. py:data:: mesh_morphing + + + +.. py:data:: dem_coupling + + + +.. py:data:: sloshing + + + +.. py:data:: camry_rc + + + +.. py:data:: sale_efp + + + +.. py:data:: isph_rigidtest + + + +.. py:data:: nvh_frf_plate_damping + + + +.. py:data:: nvh_frf_solid + + + +.. py:data:: thermal_stress + + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/index.rst.txt new file mode 100644 index 000000000..5935cd3fb --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/examples/index.rst.txt @@ -0,0 +1,16 @@ +:py:mod:`ansys.dyna.core.pre.examples` +====================================== + +.. py:module:: ansys.dyna.core.pre.examples + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + download_utilities/index.rst + examples/index.rst + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/index.rst.txt new file mode 100644 index 000000000..f6f393d32 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/index.rst.txt @@ -0,0 +1,45 @@ +:py:mod:`ansys.dyna.core.pre` +============================= + +.. py:module:: ansys.dyna.core.pre + + +Subpackages +----------- +.. toctree:: + :titlesonly: + :maxdepth: 3 + + examples/index.rst + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + dynabase/index.rst + dynadem/index.rst + dynaem/index.rst + dynaicfd/index.rst + dynaiga/index.rst + dynaisph/index.rst + dynalogging/index.rst + dynamaterial/index.rst + dynamech/index.rst + dynanvh/index.rst + dynasale/index.rst + dynasolution/index.rst + errors/index.rst + launcher/index.rst + misc/index.rst + + +Package Contents +---------------- + +.. py:data:: LOG + + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/launcher/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/launcher/index.rst.txt new file mode 100644 index 000000000..728f74872 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/launcher/index.rst.txt @@ -0,0 +1,276 @@ +:py:mod:`ansys.dyna.core.pre.launcher` +====================================== + +.. py:module:: ansys.dyna.core.pre.launcher + +.. autoapi-nested-parse:: + + Module for launching the pre service locally. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.launcher.ServerThread + + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.launcher.check_ports + ansys.dyna.core.pre.launcher.port_in_use + ansys.dyna.core.pre.launcher.launch_grpc + ansys.dyna.core.pre.launcher.launch_dynapre + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.launcher.LOCALHOST + ansys.dyna.core.pre.launcher.DYNAPRE_DEFAULT_PORT + ansys.dyna.core.pre.launcher.server_path + + +.. py:data:: LOCALHOST + :value: '127.0.0.1' + + + +.. py:data:: DYNAPRE_DEFAULT_PORT + :value: 50051 + + + +.. py:function:: check_ports(port_range, ip='localhost') + + + Check the state of ports in a port range. + + + :Parameters: + + **port_range** + .. + + **ip** : :class:`python:str`, :obj:`optional` + IP address. The default is ``"localhost"``, in which case + ``"127.0.0.1"``is used. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:function:: port_in_use(port, host=LOCALHOST) + + + Determine if a port is in use at a given host. + + + :Parameters: + + **port** : :class:`python:int` + Port. + + **host** + Host. The default is ``LOCALHOST``, in which case ``"127.0.0.1"`` + is used. + + :Returns: + + ``True`` :obj:`when` :obj:`a` :obj:`port` :obj:`is` :obj:`in` :obj:`use` :obj:`at` :obj:`the` :obj:`given` :obj:`host`, ``False`` otherwise. + .. + + + + + + + + + .. rubric:: Notes + + The port must "bind" the address. Just checking if a socket can be created + is insufficient because it is possible to run into permission + errors like this one: + + "An attempt was made to access a socket in a way forbidden by its + access permissions." + + + + + + .. + !! processed by numpydoc !! + +.. py:function:: launch_grpc(port=DYNAPRE_DEFAULT_PORT, ip=LOCALHOST, server_path=None) -> tuple + + + Launch the pre service locally in gRPC mode. + + + :Parameters: + + **port** : :class:`python:int`, :obj:`optional` + Port to launch the pre service on. The default is ``DYNAPRE_DEFAULT_PORT``. + The final port is the first port available after (or including) this + port. + + **ip** : :class:`python:str`, :obj:`optional` + IP address. The default is ``LOCALHOST``, in which case ``"127.0.0.1"`` + is used. + + **server_path** : :class:`python:str`, :obj:`optional` + Path to the pre service. The default is ``None``. + + :Returns: + + :class:`python:int` + Port number that the gRPC instance started on. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: ServerThread(threadID, port, ip, server_path) + + + Bases: :py:obj:`threading.Thread` + + + Provides server thread properties. + + + :Parameters: + + **threadID** + .. + + **port** + .. + + **ip** + .. + + **server_path** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: run() + + + Method representing the thread's activity. + + You may override this method in a subclass. The standard run() method + invokes the callable object passed to the object's constructor as the + target argument, if any, with sequential and keyword arguments taken + from the args and kwargs arguments, respectively. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: termination() + + + +.. py:function:: launch_dynapre(port=50051, ip='localhost') + + + Start the pre service locally. + + + :Parameters: + + **port** : :class:`python:int`, :obj:`optional` + Port to launch MAPDL gRPC on. The default is ``50051``. + + **ip** : :ref:`bool `, :obj:`optional` + IP address or host name of the PyDYNA instance to connect to. + The default is ``"localhost"``, in which case ``"127.0.0.1"`` + is used. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:data:: server_path + + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/pre/misc/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/misc/index.rst.txt new file mode 100644 index 000000000..ee731e39f --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/pre/misc/index.rst.txt @@ -0,0 +1,234 @@ +:py:mod:`ansys.dyna.core.pre.misc` +================================== + +.. py:module:: ansys.dyna.core.pre.misc + +.. autoapi-nested-parse:: + + Module providing miscellaneous functions and methods. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.misc.Plain_Report + + + +Functions +~~~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.misc.is_float + ansys.dyna.core.pre.misc.random_string + ansys.dyna.core.pre.misc.create_temp_dir + ansys.dyna.core.pre.misc.check_valid_ip + ansys.dyna.core.pre.misc.check_valid_port + + + +Attributes +~~~~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.pre.misc.MODULE_PATH + ansys.dyna.core.pre.misc.base_report_class + + +.. py:data:: MODULE_PATH + + + +.. py:class:: Plain_Report(core, optional=None, additional=None, **kwargs) + + + .. py:method:: get_version(package) + + + .. py:method:: __repr__() + + + Return repr(self). + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + +.. py:data:: base_report_class + + + +.. py:function:: is_float(input_string) + + + Determine if a string can be converted to a float. + + + :Parameters: + + **input_string** : :class:`python:str` + String. + + :Returns: + + ``True`` :obj:`when` :obj:`the` :class:`python:str` :obj:`can` :obj:`be` :obj:`converted` :obj:`to` :obj:`a` :class:`python:float`, ``False`` otherwise. + .. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:function:: random_string(stringLength=10, letters=string.ascii_lowercase) + + + Generate a random string of a fixed length. + + + :Parameters: + + **stringLength** : :class:`python:int`, :obj:`optional` + Length of the string. The default is ``10``. + + **letters** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:function:: create_temp_dir(tmpdir=None) + + + Create a unique working directory in a temporary directory. + + + :Parameters: + + **tempdir** : :class:`python:str`, :obj:`optional` + Name of the temporary directory to create the working + directory in. The default is ``None``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:function:: check_valid_ip(ip) + + + Check if an IP address is valid. + + + :Parameters: + + **ip** + IP address. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:function:: check_valid_port(port, lower_bound=1000, high_bound=60000) + + + Check if a port is valid. + + + :Parameters: + + **port** : :class:`python:int` + Port. + + **lower_bound** : :class:`python:int`, :obj:`optional` + Lowest value for the port range. The default is ``1000``. + + **high_bound** : :class:`python:int`, :obj:`optional` + Highest value for the port range. The default is ``6000``. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/solver/dynasolver/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/solver/dynasolver/index.rst.txt new file mode 100644 index 000000000..cd526724c --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/solver/dynasolver/index.rst.txt @@ -0,0 +1,724 @@ +:py:mod:`ansys.dyna.core.solver.dynasolver` +=========================================== + +.. py:module:: ansys.dyna.core.solver.dynasolver + +.. autoapi-nested-parse:: + + Dyna solver + =========== + + Module for defining the PyDNYA ``solver`` service. + + .. + !! processed by numpydoc !! + + +Module Contents +--------------- + +Classes +~~~~~~~ + +.. autoapisummary:: + + ansys.dyna.core.solver.dynasolver.DynaSolver + + + + +.. py:exception:: RunningError + + + Bases: :py:obj:`Exception` + + + Documentation missing. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:exception:: NotFound + + + Bases: :py:obj:`Exception` + + + Documentation missing. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:exception:: UnexpectedResponse + + + Bases: :py:obj:`Exception` + + + Documentation missing. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + +.. py:class:: DynaSolver(hostname, port) + + + + Provides the gRPC client-side of Ansys LS-DYNA. + + + :Parameters: + + **hostname** : :class:`python:str` + Host name or IP address to connect to. + + **port** : :class:`python:str` + Port the gRPC server is to listen on. + + :Returns: + + :obj:`An` :obj:`instance` :obj:`of` :obj:`the` :obj:`client`, :obj:`which` :obj:`can` :obj:`be` :obj:`used` :obj:`to` :obj:`communicate` + .. + + :obj:`with` :obj:`the` :obj:`gRPC` :obj:`server` :obj:`running` :obj:`at` :obj:`the` :obj:`given` :obj:`host` :obj:`name` :obj:`and` port. + .. + + :obj:`The` :obj:`client` :obj:`can` :obj:`then` :obj:`interact` :obj:`with` LS-DYNA :obj:`via` gRPC. + .. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + .. py:method:: list_files(subname=None) + + + Get size information about one or more files in the LS-DYNA + working directory. + + + :Parameters: + + **subname** : :class:`python:str`, :obj:`default` : :data:`python:None` + If given, only files whose names contain subname as a substring are + returned. This check is case insensitive. + + :Returns: + + :obj:`Array` :obj:`of` (:obj:`filename`, :obj:`size` :obj:`in` :obj:`bytes`) pairs. + .. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: node(n) + + + Get size information about a node in the model's working directory. + + + :Parameters: + + **n** : :obj:`integer` + User ID of a node in the model. + + :Returns: + + :obj:`A` :obj:`pair` :obj:`of` 3-tuples :obj:`are` :obj:`returned`, :obj:`giving` :obj:`the` ``(x, y, z)`` :obj:`coordinates` :obj:`and` + .. + + :obj:`velocities` :obj:`of` :obj:`the` node. :obj:`If` :obj:`the` :obj:`node` :obj:`number` :obj:`given` :obj:`does` :obj:`not` :obj:`exist` + .. + + :obj:`in` :obj:`the` :obj:`model`, :obj:`then` ``(None, None)`` :obj:`is` returned. + .. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: pause() + + + Pause LS-DYNA execution. + + Execution stops until told to resume or quit. Most ``switch``" + commands result in one cycle being executed so that the switch can + be handled, and then LS-DYNA pauses again. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: pull(fname) + + + Provide an alias for the ``download`` method for backward compatibility. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: download(fname) + + + Download a file from the gRPC server. + + + :Parameters: + + **fname** : :class:`python:str` + Name of the file to download. The file is downloaded to the current + working directory of the calling process. The file name should not + begin with a leading ``/``. The file is interpreted relative to the + LS-DYNA working directory. + + :Returns: + + :class:`python:int` + Number of bytes received. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: push(fname) + + + Provide an alias for the ``upload` method for backward compatibility. + + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: upload(fname) + + + Upload a file to the LS-DYNA working directory. + + + :Parameters: + + **fname** : :class:`python:str` + Name of the local file to upload. The contents of this file are copied + into the LS-DYNA working directory in a file of the same name, but + with any path components removed. + + :Returns: + + :class:`python:int` + Number of bytes sent. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: quit() + + + Terminate the gRPC server program. This does not terminate LS-DYNA. + + If the server is running inside a container, it ignore this + command and continues running. + + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: resume(cycle=None, time=None) + + + Resume execution. + + + :Parameters: + + **cycle** : :obj:`integer`, :obj:`optional` + Cycle to pause execution on. The default is ``None``. + + **time** : :class:`python:float`, :obj:`optional` + Ssimulation time to pause execution at. The default is ``None``. + + **This command can be given whether LS-DYNA is paused or running.** + .. + + **LS-DYNA runs until the given cycle number or simulation time. If** + .. + + **both are given, it stops based on whichever occurs first. If** + .. + + **neither are given, it runs until termination or until paused.** + .. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: run(args) + + + Begin execution with the given string as the command-line arguments. + + + :Parameters: + + **args** : :class:`python:str` + Command line to pass to LS-DYNA. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: setlc(lc, value) + + + Set a load curve to a constant value. + + + :Parameters: + + **lc** : :class:`python:int` + User ID of the load curve to set. + + **value** : :class:`python:float` + Value to set the load curve to. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: start(nproc) + + + Start LS-DYNA. + + The program starts and awaits further input. To begin a + simulation, the ``run`` command must used to send the command line + arguments. + + After starting but before running, a ``resume`` command can be sent to + set a pause time or cycle. + + :Parameters: + + **nproc** : :class:`python:int` + Number of cores (MPI ranks) to run. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: switch(args) + + + Send a "sense switch" to LS-DYNA. + + + :Parameters: + + **args** : :class:`python:str` + Sense switch string. + + :Returns: + + :obj:`If` :obj:`the` :obj:`switch` :obj:`sent` :obj:`is` ``sw2.``, :obj:`a` :class:`python:str` :obj:`is` :obj:`returned` :obj:`with` :obj:`the` + .. + + :obj:`usual` :obj:`status` :obj:`update` :obj:`information` :obj:`that` :obj:`a` :obj:`switch` generates. Otherwise, + .. + + :obj:`an` :obj:`empty` :class:`python:str` :obj:`is` returned. + .. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: tail(which=1, how=2, queuesize=0) + + + Monitor the stdout or stderr of the running job. + + + :Parameters: + + **which** : :class:`python:int`, :obj:`optional` + Which stream to monitor. The default is ``1``, in which case + stdout is used. Otherwise, stderr is used. + + **how** : :class:`python:int`, :obj:`optional` + How to handle the file data. The default is ``2``. Options are: + + - 0: The file contents are printed to stdout, and this + method does not return until LS-DYNA terminates. + - 1: A ``Queue`` instance is returned. The queue holds raw blocks + of text as returned by the server. + - 2: A ``Queue`` instance is returned.The queue holds individual + lines of text. + + **queuesize** : :class:`python:int`, :obj:`optional` + Size to use for the ``Queue`` instance if the ``how`` parameter is set to + a value greater than ``0``. + + :Returns: + + :obj:`If` :obj:`the` :obj:`value` :obj:`for` :obj:`the` ``how`` :obj:`parameter` :obj:`is` :obj:`greater` :obj:`than` 0, :obj:`a` ``Queue instance`` + .. + + :obj:`is` returned. :obj:`When` :obj:`a` :obj:`call` :obj:`to` :obj:`the` ``q.get()`` :obj:`method` :obj:`returns` ``None``, :obj:`all` :obj:`data` + .. + + :obj:`has` :obj:`been` returned. + .. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: time() + + + Get the current cycle count and simulation time. + + + + :Returns: + + :obj:`A` (:obj:`cycle_count`, :obj:`simulation_time`) pair. + .. + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: send(cmdin) + + + Send one request to LS-DYNA using the command-line interface. + + + :Parameters: + + **cmdin** : :class:`python:str` + Command to send. + + :Returns: + + :data:`python:None` + There is no data returned. Data that is returned from the underlying + method call is just printed to the screen. This method is used to + support the sample interactive ``client.py`` program. + + +-------------------------------------------+-----------------------+ + | Description | Example | + +===========================================+=======================+ + | "list" then optional file name | list d3plot | + +-------------------------------------------+-----------------------+ + | "list" then optional file name | list d3plot | + +-------------------------------------------+-----------------------+ + | "node" user node number | node 43444 | + +-------------------------------------------+-----------------------+ + | "pause" (no arguments) | pause | + +-------------------------------------------+-----------------------+ + | "download" then file name | download glstat | + +-------------------------------------------+-----------------------+ + | "upload" then file name | upload input.k | + +-------------------------------------------+-----------------------+ + | "quit" (no arguments) | quit | + +-------------------------------------------+-----------------------+ + | "resume" optional cycle and/or time | resume 5000 0.25 | + +-------------------------------------------+-----------------------+ + | "run" then the command line | run i=input.k jobid=xx| + +-------------------------------------------+-----------------------+ + | "setlc" user load curve number and value | setlc 1075 0.245 | + +-------------------------------------------+-----------------------+ + | "start" number of processors | start 5 | + +-------------------------------------------+-----------------------+ + | "switch" then switch text | switch sw2 | + +-------------------------------------------+-----------------------+ + | "tail" then 1 for stdout, 2 for stderr | tail 1 | + +-------------------------------------------+-----------------------+ + | "time" (no arguments) | time. | + +-------------------------------------------+-----------------------+ + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + .. py:method:: runfile(fname) + + + Read command lines from a file and execute them. + + Each line is read from the file and echoed to the screen. You + must hit the **enter** key to trigger execution of the command. + + :Parameters: + + **fname** : :class:`python:str` + File to read commands from. + + + + + + + + + + + + + + + .. + !! processed by numpydoc !! + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/solver/grpc_tags/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/solver/grpc_tags/index.rst.txt new file mode 100644 index 000000000..c0f7d7bc1 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/solver/grpc_tags/index.rst.txt @@ -0,0 +1,74 @@ +:py:mod:`ansys.dyna.core.solver.grpc_tags` +========================================== + +.. py:module:: ansys.dyna.core.solver.grpc_tags + + +Module Contents +--------------- + +.. py:data:: SWITCH + :value: 1 + + + +.. py:data:: RUN + :value: 2 + + + +.. py:data:: CWD + :value: 3 + + + +.. py:data:: PAUSE + :value: 4 + + + +.. py:data:: TIME + :value: 5 + + + +.. py:data:: RESUME + :value: 6 + + + +.. py:data:: REQUIRES_SYNC + :value: 1000 + + + +.. py:data:: NODE + :value: 1001 + + + +.. py:data:: SETLC + :value: 1002 + + + +.. py:data:: ACK + :value: 0 + + + +.. py:data:: NOTRUNNING + :value: 1 + + + +.. py:data:: RUNNING + :value: 2 + + + +.. py:data:: NOTFOUND + :value: 3 + + + diff --git a/version/0.3/_sources/autoapi/ansys/dyna/core/solver/index.rst.txt b/version/0.3/_sources/autoapi/ansys/dyna/core/solver/index.rst.txt new file mode 100644 index 000000000..79115cb14 --- /dev/null +++ b/version/0.3/_sources/autoapi/ansys/dyna/core/solver/index.rst.txt @@ -0,0 +1,16 @@ +:py:mod:`ansys.dyna.core.solver` +================================ + +.. py:module:: ansys.dyna.core.solver + + +Submodules +---------- +.. toctree:: + :titlesonly: + :maxdepth: 1 + + dynasolver/index.rst + grpc_tags/index.rst + + diff --git a/version/0.3/_sources/autoapi/index.rst.txt b/version/0.3/_sources/autoapi/index.rst.txt new file mode 100644 index 000000000..71b5bdc34 --- /dev/null +++ b/version/0.3/_sources/autoapi/index.rst.txt @@ -0,0 +1,11 @@ +API reference +============= + +This section provides descriptions of PyDYNA subpackages, submodules, classes, +methods, and attributes. Use the search feature or click links to view API documentation. + +.. toctree:: + :titlesonly: + :maxdepth: 2 + + /autoapi/ansys/dyna/core/index diff --git a/version/0.3/_sources/contributing.rst.txt b/version/0.3/_sources/contributing.rst.txt new file mode 100644 index 000000000..5787c7be7 --- /dev/null +++ b/version/0.3/_sources/contributing.rst.txt @@ -0,0 +1,74 @@ +Contribute +========== + +Overall guidance on contributing to a PyAnsys repository appears in the +`PyAnsys Developer's Guide `_. Ensure that you +are thoroughly familiar with this guide before attempting to contribute to PyDYNA. + +The following contribution information is specific to PyDYNA. + +Clone the repository +-------------------- + +To clone and install the latest PyDYNA release in development mode, run this code: + +.. code:: + + git clone https://github.com/pyansys/pydyna + cd pydyna + python -m pip install --upgrade pip + pip install -e . + + +Post issues +----------- + +Use the `PyDYNA Issues `_ +page to submit questions, report bugs, and request new features. When possible, +use these issue templates: + +* Bug report template +* Feature request template + +If your issue does not fit into one of these template categories, create your own issue. + +To reach the project support team, email `pyansys.core@ansys.com `_. + +View documentation +------------------ + +Documentation for the latest stable release of PyDYNA is hosted at +`PyDYNA documentation `_. + +In the upper right corner of the documentation’s title bar, there is an option +for switching from viewing the documentation for the latest stable release to +viewing the documentation for the development version or previously released versions. + +Adhere to code style +-------------------- + +PyDYNA follows the PEP8 standard as outlined in the `PyAnsys Developer's Guide +`_ and implements style checking using +`pre-commit `_. + +To ensure your code meets minimum code styling standards, run these commands:: + + pip install pre-commit + pre-commit run --all-files + +You can also install this as a pre-commit hook by running this command:: + + pre-commit install + +This way, it is not possible for you to push code that fails the style checks:: + + $ pre-commit install + $ git commit -am "added my cool feature" + black....................................................................Passed + blacken-docs.............................................................Passed + codespell................................................................Passed + flake8...................................................................Passed + isort....................................................................Passed + check for merge conflicts................................................Passed + debug statements (python)................................................Passed + Validate GitHub Workflows................................................Passed diff --git a/version/0.3/_sources/examples/Airbag/airbag_deploy.rst.txt b/version/0.3/_sources/examples/Airbag/airbag_deploy.rst.txt new file mode 100644 index 000000000..54a2c9615 --- /dev/null +++ b/version/0.3/_sources/examples/Airbag/airbag_deploy.rst.txt @@ -0,0 +1,413 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Airbag/airbag_deploy.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Airbag_airbag_deploy.py: + + +Airbag deploy +------------- +This example shows how to create an airbag deploy model with the PyDNYA ``pre`` service. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-12 + +Perform required imports +~~~~~~~~~~~~~~~~~~~~~~~~ +Peform required imports. + +.. GENERATED FROM PYTHON SOURCE LINES 12-32 + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Airbag, + PartSet, + Curve, + Point, + RigidwallPlanar, + Contact, + ContactSurface, + ContactCategory, + ShellPart, + ShellFormulation, + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 33-44 + +Manually start the ``pre`` service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Copy the ``pyDyna/src/ansys/dyna/core/pre/Server``folder to a desired location. +Start the ``pre`` service at this location by running this command: + +``python kwserver.py`` + +Once the ``pre`` servic is running, you can connect a client to it using +the hostname and the port. This example uses the default local host and port +(``"localhost"`` and ``"50051"`` respectively). + + +.. GENERATED FROM PYTHON SOURCE LINES 44-51 + +.. code-block:: default + + from ansys.dyna.core.pre.dynamaterial import MatRigid, MatFabric + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 53-58 + +Start the solution workflow +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The ``DynaSolution`` class is like a workflow orchestrator. +It inherits methods from other classes and helps create a complete workflow. + + +.. GENERATED FROM PYTHON SOURCE LINES 58-65 + +.. code-block:: default + + airbag_solution = DynaSolution(hostname) + fns = [] + # path = sys.path[0] + os.sep + "input" + os.sep + "airbag_deploy" + os.sep + path = examples.airbag_deploy + os.sep + fns.append(path + "airbag_deploy.k") + airbag_solution.open_files(fns) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 2023-08-11 02:29:25 : Connected to kwServer... + 2023-08-11 02:29:25 : /opt/hostedtoolcache/Python/3.9.17/x64/lib/python3.9/site-packages/ansys/dyna/core/pre/examples/airbag/airbag_deploy/airbag_deploy.k uploaded to server... + + ret: true + + + + +.. GENERATED FROM PYTHON SOURCE LINES 66-74 + +Create standard explicit control cards +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This code uses the ``set_termination`` method to set the termination time +to ``0.03`` in *CONTROL_TERMINATION*. The ``DynaMech`` class +automatically generates the common control cards used in +explicit problems. ``CONTROL_ACCURACY``, ``CONTACT``, ``BULK VISCOCITY``, +and ``CONTACT``are all automatically generated. + + +.. GENERATED FROM PYTHON SOURCE LINES 74-79 + +.. code-block:: default + + airbag_solution.set_termination(0.03) + + airbagdeploy = DynaMech() + airbag_solution.add(airbagdeploy) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 2023-08-11 02:29:25 : Setting termination time ... + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-87 + +Define *AIRBAG_SIMPLE_AIRBAG_MODEL* as a keyword +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use the ``Airbag`` function in the ``DynaMech`` class to define +*AIRBAG_SIMPLE_AIRBAG_MODEL* as a keyword. While LS-DYNA has many different +airbag models, PyDYNA currently supports only one airbag model, +SIMPLE_AIRBAG_MODEL. If you have an urgent need for PyDYNA to support +another airbag model, email `pyansys.core@ansys.com `_. + +.. GENERATED FROM PYTHON SOURCE LINES 87-100 + +.. code-block:: default + + + airbag = Airbag( + set=PartSet([3]), + heat_capacity_at_constant_volume=1.736e3, + heat_capacity_at_constant_pressure=2.43e3, + input_gas_temperature=1.2e3, + input_mass_flow_rate=Curve(x=[0, 0.032, 0.045, 0.08], y=[0, 26, 0.6, 0.1]), + shape_factor_for_exit_hole=0.7, + ambient_pressure=14.7, + ambient_density=3.821e-6, + ) + airbagdeploy.add(airbag) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 2023-08-11 02:29:25 : Curve 1 defined... + + + + +.. GENERATED FROM PYTHON SOURCE LINES 101-106 + +Generate an infinite planar rigid wall +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +To generate an infinite planar rigidwall, define the coordinates of the heat +vector and the tail vector of the plane. + + +.. GENERATED FROM PYTHON SOURCE LINES 106-109 + +.. code-block:: default + + rigidwall = RigidwallPlanar(Point(0, 0, 0), Point(0, 1, 0), coulomb_friction_coefficient=0.5) + airbagdeploy.add(rigidwall) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-114 + +Define a node-to-surface contact +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define a node-to-surface contact by passing a master part set and a slave +part set. + +.. GENERATED FROM PYTHON SOURCE LINES 114-124 + +.. code-block:: default + + + contact = Contact(category=ContactCategory.NODES_TO_SURFACE) + contact.set_friction_coefficient(static=0.5, dynamic=0.5) + surf1 = ContactSurface(PartSet([3])) + surf2 = ContactSurface(PartSet([2])) + surf2.set_penalty_stiffness_scale_factor(0.06667) + contact.set_slave_surface(surf1) + contact.set_master_surface(surf2) + airbagdeploy.contacts.add(contact) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 125-135 + +Define material cards +~~~~~~~~~~~~~~~~~~~~~ +LS-DYNA has over 300 materials that are used for varied applications. +Whlie PyDYNA does not yet support all material cards, it does support some +of the most commonly used materials, including ``FABRIC``, `MAT_ELASTIC``, +``PIECEWISE_LINEAR_PLASTICITY``, and ``RIGID``. All supported materials +are accessed from the ``dynamaterial`` class. In the following code, +``MAT_RIGID`` is defined as the material for the cylindrical tube and the +bottom plate. ``MAT_FABRIC`` is defined as the material for the airbag volume. +Note that ``platemat`` has contraints defined as well. + +.. GENERATED FROM PYTHON SOURCE LINES 135-151 + +.. code-block:: default + + + platemat = MatRigid( + mass_density=7.84e-4, + young_modulus=30e6, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, + ) + cylindermat = MatRigid(mass_density=1.96e-4, young_modulus=30e6) + airbagmat = MatFabric( + mass_density=1e-4, + young_modulus_longitudinal_direction=2e6, + young_modulus_transverse_direction=2e6, + shear_modulus=1.53e6, + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 152-159 + +Define sectional properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The following code defines the sectional properties of the parts. This example +has three shell parts. Each shell part is initialized as ``ShellPart`` with a +unique ID and an appropriate shell formulation is assigned. Again, +PyDYNA does not yet support all element formulations. You can find the +supported formulations in ``dynabase`` class. + +.. GENERATED FROM PYTHON SOURCE LINES 159-179 + +.. code-block:: default + + + plate = ShellPart(1) + plate.set_material(platemat) + plate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + plate.set_thickness(0.5) + airbagdeploy.parts.add(plate) + + cylinder = ShellPart(2) + cylinder.set_material(cylindermat) + cylinder.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + cylinder.set_thickness(0.5) + airbagdeploy.parts.add(cylinder) + + airbagpart = ShellPart(3) + airbagpart.set_material(airbagmat) + airbagpart.set_element_formulation(ShellFormulation.FULLY_INTEGRATED_BELYTSCHKO_TSAY_MEMBRANE) + airbagpart.set_thickness(0.015) + airbagpart.set_integration_points(4) + airbagdeploy.parts.add(airbagpart) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 2023-08-11 02:29:25 : Material RIGID Created... + 2023-08-11 02:29:25 : Material RIGID Created... + 2023-08-11 02:29:25 : Material Fabric Created... + + + + +.. GENERATED FROM PYTHON SOURCE LINES 180-185 + +Define database outputs +~~~~~~~~~~~~~~~~~~~~~~~ +Use the ``set_output_database()`` and ``create_database_binary()`` methods to define the +output frequency of the ASCII and binary D3PLOT files. Then, use the ``save_file()`` +method to write out the model as an input DYNA key file. + +.. GENERATED FROM PYTHON SOURCE LINES 185-191 + +.. code-block:: default + + + airbag_solution.set_output_database( + abstat=2.0e-4, glstat=2.0e-4, matsum=2.0e-4, rcforc=2.0e-4, rbdout=2.0e-4, rwforc=2.0e-4 + ) + airbag_solution.create_database_binary(dt=5e-4, ieverp=1) + airbag_solution.save_file() + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + 2023-08-11 02:29:25 : Output Setting... + 2023-08-11 02:29:25 : DB Binary Created... + 2023-08-11 02:29:25 : Control Accuracy Created... + 2023-08-11 02:29:25 : Control Bulk Viscosity Created... + 2023-08-11 02:29:25 : Control Energy Created... + 2023-08-11 02:29:25 : Control Hourglass Created... + 2023-08-11 02:29:25 : Control Shell Created... + 2023-08-11 02:29:25 : Control Contact Created... + 2023-08-11 02:29:25 : Contact Created... + 2023-08-11 02:29:25 : Airbag Model Created... + 2023-08-11 02:29:25 : Rigidwall Planar Created... + 2023-08-11 02:29:25 : airbag_deploy.k is outputed... + + '/server/output' + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.178 seconds) + + +.. _sphx_glr_download_examples_Airbag_airbag_deploy.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: airbag_deploy.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: airbag_deploy.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/Airbag/airbag_post.rst.txt b/version/0.3/_sources/examples/Airbag/airbag_post.rst.txt new file mode 100644 index 000000000..f2ab39eed --- /dev/null +++ b/version/0.3/_sources/examples/Airbag/airbag_post.rst.txt @@ -0,0 +1,246 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Airbag/airbag_post.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Airbag_airbag_post.py: + + +Airbag deploy postprocessing +---------------------------- +This example shows how to animate the d3plot and display the stress on the airbag. + +.. GENERATED FROM PYTHON SOURCE LINES 8-12 + +Perform required imports +~~~~~~~~~~~~~~~~~~~~~~~~ +Import required imports. + + +.. GENERATED FROM PYTHON SOURCE LINES 12-15 + +.. code-block:: default + + from ansys.dpf import core as dpf + from ansys.dpf.core import examples + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 16-20 + +Connect to DPF Server +~~~~~~~~~~~~~~~~~~~~~ +Connect to the DPF Server. + + +.. GENERATED FROM PYTHON SOURCE LINES 20-22 + +.. code-block:: default + + dpf.connect_to_server() + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 23-29 + +Load model +~~~~~~~~~~ +Load the model and print the contents of the model. All parts in the model +are shell parts. Model information includes the result components and the +number of states available in the d3plot. + + +.. GENERATED FROM PYTHON SOURCE LINES 29-34 + +.. code-block:: default + + """ ds = dpf.DataSources() + ds.set_result_file_path(r'D:\PYDYNA_BETA_V.0.1\example-data\pydyna\Airbag\d3plot', 'd3plot') + model = dpf.Model(ds) + print(model) """ + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + " ds = dpf.DataSources()\nds.set_result_file_path(r'D:\\PYDYNA_BETA_V.0.1\\example-data\\pydyna\\Airbag\\d3plot', 'd3plot')\nmodel = dpf.Model(ds)\nprint(model) " + + + +.. GENERATED FROM PYTHON SOURCE LINES 35-41 + +Extract stress on all parts +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Extract the stress on all the parts. The stress fields container is scoped to +all time frequencies to be able to animate the change in stress on the +airbag fabric. + + +.. GENERATED FROM PYTHON SOURCE LINES 41-46 + +.. code-block:: default + + """ stress = model.results.stress.on_all_time_freqs() + stress.inputs.data_sources(ds) + stress.inputs.requested_location.connect("Nodal") + fieldsStr = stress.outputs.fields_container()""" + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ' stress = model.results.stress.on_all_time_freqs()\nstress.inputs.data_sources(ds)\nstress.inputs.requested_location.connect("Nodal")\nfieldsStr = stress.outputs.fields_container()' + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-52 + +Extract stress on mid integration point +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In the d3plot file, the shell stress is reported at three through-thickness +points by default. Extract the stress on the mid integration point. + + +.. GENERATED FROM PYTHON SOURCE LINES 52-57 + +.. code-block:: default + + """ shell_layer_extract = dpf.operators.utility.change_shell_layers() + shell_layer_extract.inputs.fields_container.connect(fieldsStr) + shell_layer_extract.inputs.e_shell_layer.connect(dpf.common.shell_layers.mid.value) + fields_top = shell_layer_extract.outputs.fields_container_as_fields_container() """ + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ' shell_layer_extract = dpf.operators.utility.change_shell_layers()\nshell_layer_extract.inputs.fields_container.connect(fieldsStr)\nshell_layer_extract.inputs.e_shell_layer.connect(dpf.common.shell_layers.mid.value)\nfields_top = shell_layer_extract.outputs.fields_container_as_fields_container() ' + + + +.. GENERATED FROM PYTHON SOURCE LINES 58-62 + +Plot deformed state +~~~~~~~~~~~~~~~~~~~ +Plot the deformed state at 9 ms. + + +.. GENERATED FROM PYTHON SOURCE LINES 62-66 + +.. code-block:: default + + """ N = fields_top[19] + D = model.results.displacement(time_scoping=[19]).eval() + N.plot(deform_by=D[0],show_edges=False) """ + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ' N = fields_top[19]\nD = model.results.displacement(time_scoping=[19]).eval()\nN.plot(deform_by=D[0],show_edges=False) ' + + + +.. GENERATED FROM PYTHON SOURCE LINES 67-72 + +Display stress field and set mesh +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Display the stress field and set the mesh to deform by the displacement of +the nodes. + + +.. GENERATED FROM PYTHON SOURCE LINES 72-73 + +.. code-block:: default + + """ disp = model.results.displacement.on_all_time_freqs.eval() + fields_top.animate(deform_by=disp,show_edges=False) """ + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ' disp = model.results.displacement.on_all_time_freqs.eval()\nfields_top.animate(deform_by=disp,show_edges=False) ' + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.667 seconds) + + +.. _sphx_glr_download_examples_Airbag_airbag_post.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: airbag_post.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: airbag_post.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/Airbag/index.rst.txt b/version/0.3/_sources/examples/Airbag/index.rst.txt new file mode 100644 index 000000000..cbc24a361 --- /dev/null +++ b/version/0.3/_sources/examples/Airbag/index.rst.txt @@ -0,0 +1,61 @@ + + +.. _sphx_glr_examples_Airbag: + +Airbag examples +~~~~~~~~~~~~~~~~ + +These examples show how to create and use airbag models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Airbag/images/thumb/sphx_glr_airbag_deploy_thumb.png + :alt: + + :ref:`sphx_glr_examples_Airbag_airbag_deploy.py` + +.. raw:: html + +
Airbag deploy
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Airbag/images/thumb/sphx_glr_airbag_post_thumb.png + :alt: + + :ref:`sphx_glr_examples_Airbag_airbag_post.py` + +.. raw:: html + +
Airbag deploy postprocessing
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/Airbag/airbag_deploy + /examples/Airbag/airbag_post + diff --git a/version/0.3/_sources/examples/Airbag/sg_execution_times.rst.txt b/version/0.3/_sources/examples/Airbag/sg_execution_times.rst.txt new file mode 100644 index 000000000..08e4b8d73 --- /dev/null +++ b/version/0.3/_sources/examples/Airbag/sg_execution_times.rst.txt @@ -0,0 +1,15 @@ + +:orphan: + +.. _sphx_glr_examples_Airbag_sg_execution_times: + + +Computation times +================= +**00:00.845** total execution time for **examples_Airbag** files: + ++-------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Airbag_airbag_post.py` (``airbag_post.py``) | 00:00.667 | 0.0 MB | ++-------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Airbag_airbag_deploy.py` (``airbag_deploy.py``) | 00:00.178 | 0.0 MB | ++-------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/EM/em_resistive_heating.rst.txt b/version/0.3/_sources/examples/EM/em_resistive_heating.rst.txt new file mode 100644 index 000000000..1a9f628d7 --- /dev/null +++ b/version/0.3/_sources/examples/EM/em_resistive_heating.rst.txt @@ -0,0 +1,152 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/EM/em_resistive_heating.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_EM_em_resistive_heating.py: + + +Resistive heating +================= + +This example shows the minimum number of keywords required to turn on the +EM resistive heating solver. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-84 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaem import ( + DynaEM, + NodeSet, + Curve, + SolidPart, + SolidFormulation, + FEMSOLVER, + ThermalAnalysis, + ThermalAnalysisType, + EMType + ) + from ansys.dyna.core.pre.dynamaterial import MatElastic,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1 + from em_set_data import * + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + fns = [] + path = examples.em_resistive_heating + os.sep + fns.append(path + "em_resistive_heating.k") + solution.open_files(fns) + solution.set_termination(termination_time=20) + solution.create_database_binary(dt=0.1) + + emobj = DynaEM() + solution.add(emobj) + + emobj.set_timestep(timestep_size_for_mass_scaled=0.01,max_timestep=Curve(x=[0,9.9999997474e-5],y=[0.01,0.01])) + + emobj.analysis.set_timestep(timestep=0.01) + emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING) + emobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3) + + tanalysis = ThermalAnalysis() + tanalysis.set_timestep(initial_timestep=0.05) + tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) + emobj.add(tanalysis) + + matelastic1 = MatElastic(mass_density=8000, young_modulus=1e11, poisson_ratio=0.33) + matelastic2 = MatElastic(mass_density=7000, young_modulus=1e11, poisson_ratio=0.33) + matelastic1.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=6e7) + matelastic2.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=4e6,eos=EMEOSTabulated1(Curve(x=[0, 25, 50, 100], y=[4e6, 4e6, 4e5, 4e5]))) + + matthermaliso1 = MatThermalIsotropic(density=8000,specific_heat=400, conductivity=400) + matthermaliso2 = MatThermalIsotropic(density=7000,specific_heat=450, conductivity=40) + + part2 = SolidPart(2) + part2.set_material(matelastic1,matthermaliso1) + part2.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + emobj.parts.add(part2) + + part3 = SolidPart(3) + part3.set_material(matelastic1,matthermaliso1) + part3.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + emobj.parts.add(part3) + + part1 = SolidPart(1) + part1.set_material(matelastic2,matthermaliso2) + part1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + emobj.parts.add(part1) + + emobj.boundaryconditions.create_temperature(NodeSet(resistive_heating_tmp), scalefactor=50) + emobj.set_init_temperature(temp=25) + + emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.218 seconds) + + +.. _sphx_glr_download_examples_EM_em_resistive_heating.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: em_resistive_heating.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: em_resistive_heating.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/EM/em_resistive_heating_2d.rst.txt b/version/0.3/_sources/examples/EM/em_resistive_heating_2d.rst.txt new file mode 100644 index 000000000..c88793710 --- /dev/null +++ b/version/0.3/_sources/examples/EM/em_resistive_heating_2d.rst.txt @@ -0,0 +1,141 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/EM/em_resistive_heating_2d.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_EM_em_resistive_heating_2d.py: + + +Resistive heating 2D +==================== +This example of a simple metal bar imposes potential on both ends. The executable +file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-74 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaem import ( + DynaEM, + PartSet, + NodeSet, + Curve, + ShellPart, + ShellFormulation, + FEMSOLVER, + ThermalAnalysis, + ThermalAnalysisType, + EMType, + Isopotential_ConnType, + Isopotential + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1 + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + fns = [] + path = examples.em_resistive_heating_2d + os.sep + fns.append(path + "em_resistive_heating_2d.k") + solution.open_files(fns) + solution.set_termination(termination_time=0.0101) + solution.create_database_binary(dt=1e-4) + + emobj = DynaEM() + solution.add(emobj) + + emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + + emobj.analysis.set_timestep(timestep=1e-4) + emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING) + emobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3) + + tanalysis = ThermalAnalysis() + tanalysis.set_timestep(initial_timestep=1e-4) + tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) + emobj.add(tanalysis) + + matrigid = MatRigid(mass_density=1, young_modulus=2e11) + matrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + + matthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7) + + part = ShellPart(1) + part.set_material(matrigid,matthermaliso) + part.set_element_formulation(ShellFormulation.PLANE_STRESS) + emobj.parts.add(part) + + emobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10])) + emobj.set_init_temperature(temp=25) + emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([521,517,513,509,525])),value=500) + emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([585,605,625,564,565]))) + + emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.060 seconds) + + +.. _sphx_glr_download_examples_EM_em_resistive_heating_2d.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: em_resistive_heating_2d.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: em_resistive_heating_2d.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/EM/em_resistive_heating_2d_isopots.rst.txt b/version/0.3/_sources/examples/EM/em_resistive_heating_2d_isopots.rst.txt new file mode 100644 index 000000000..bd31fef7c --- /dev/null +++ b/version/0.3/_sources/examples/EM/em_resistive_heating_2d_isopots.rst.txt @@ -0,0 +1,150 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/EM/em_resistive_heating_2d_isopots.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_EM_em_resistive_heating_2d_isopots.py: + + +Resistive heating 2D connect isopotential +========================================= + +This example shows how to use the ``connect_isopotential()`` method to +connect two parts. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 10-83 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaem import ( + DynaEM, + PartSet, + NodeSet, + SegmentSet, + Curve, + ShellPart, + ShellFormulation, + FEMSOLVER, + ThermalAnalysis, + ThermalAnalysisType, + EMType, + Isopotential_ConnType, + Isopotential, + RogoCoil, + EMDimension + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE,EMEOSTabulated1 + from em_set_data import rogoseg + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + fns = [] + path = examples.em_resistive_heating_2d_isopots + os.sep + fns.append(path + "em_resistive_heating_2d_isopots.k") + solution.open_files(fns) + solution.set_termination(termination_time=0.0101) + solution.create_database_binary(dt=1e-4) + + emobj = DynaEM() + solution.add(emobj) + + emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + + emobj.analysis.set_timestep(timestep=1e-4) + emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING,dimtype=EMDimension.PLANAR_2D) + emobj.analysis.set_solver_fem(solver=FEMSOLVER.DIRECT_SOLVER, relative_tol=1e-3) + + tanalysis = ThermalAnalysis() + tanalysis.set_timestep(initial_timestep=1e-4) + tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) + emobj.add(tanalysis) + + matrigid = MatRigid(mass_density=1, young_modulus=2e11) + matrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + + matthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7) + + part = ShellPart(1) + part.set_material(matrigid,matthermaliso) + part.set_element_formulation(ShellFormulation.PLANE_STRESS) + emobj.parts.add(part) + + emobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10])) + emobj.set_init_temperature(temp=25) + + emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([521,517,513,509,525])),value=500) + emobj.connect_isopotential(contype = Isopotential_ConnType.SHORT_CIRCUIT,isopotential1 = Isopotential(NodeSet([642,652,661,670,643])),isopotential2 = Isopotential(NodeSet([549,548,577,597,617])),value=0.01) + emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = Isopotential(NodeSet([653,644,626,627,662]))) + emobj.add(RogoCoil(SegmentSet(rogoseg))) + + emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.066 seconds) + + +.. _sphx_glr_download_examples_EM_em_resistive_heating_2d_isopots.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: em_resistive_heating_2d_isopots.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: em_resistive_heating_2d_isopots.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/EM/em_resistive_heating_2d_multi_isopots.rst.txt b/version/0.3/_sources/examples/EM/em_resistive_heating_2d_multi_isopots.rst.txt new file mode 100644 index 000000000..45ed8575a --- /dev/null +++ b/version/0.3/_sources/examples/EM/em_resistive_heating_2d_multi_isopots.rst.txt @@ -0,0 +1,152 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/EM/em_resistive_heating_2d_multi_isopots.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_EM_em_resistive_heating_2d_multi_isopots.py: + + +Resistive heating 2D multiple connect isopotential +================================================== +This example shows how to define complex circuits as inlet boundary conditions. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-85 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaem import ( + DynaEM, + PartSet, + NodeSet, + SegmentSet, + Curve, + ShellPart, + ShellFormulation, + FEMSOLVER, + ThermalAnalysis, + ThermalAnalysisType, + EMType, + Isopotential_ConnType, + Isopotential, + RogoCoil, + EMDimension + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid,MatThermalIsotropic,EMMATTYPE + from em_set_data import rogoseg + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + fns = [] + path = examples.em_resistive_heating_2d_multi_isopots + os.sep + fns.append(path + "em_resistive_heating_2d_multi_isopots.k") + solution.open_files(fns) + solution.set_termination(termination_time=0.0101) + solution.create_database_binary(dt=1e-4) + + emobj = DynaEM() + solution.add(emobj) + + emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + + emobj.analysis.set_timestep(timestep=1e-4) + emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING,dimtype=EMDimension.PLANAR_2D) + + tanalysis = ThermalAnalysis() + tanalysis.set_timestep(initial_timestep=1e-4) + tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) + emobj.add(tanalysis) + + matrigid = MatRigid(mass_density=1, young_modulus=2e11) + matrigid.set_em_resistive_heating_2d(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + + matthermaliso = MatThermalIsotropic(density=100,specific_heat=10, conductivity=7) + + part = ShellPart(1) + part.set_material(matrigid,matthermaliso) + part.set_element_formulation(ShellFormulation.PLANE_STRESS) + emobj.parts.add(part) + + emobj.boundaryconditions.create_imposed_motion(PartSet([1]), Curve(x=[0,10],y=[10,10])) + emobj.set_init_temperature(temp=25) + + crv = Curve(func="-5./0.01*EXP(-TIME/((5.e-4+0.05+0.01)*0.04))") + nset1 = NodeSet([521,517,513,509,525]) + nset2 = NodeSet([549,548,577,597,617]) + nset3 = NodeSet([653,644,626,627,662]) + nset4 = NodeSet([642,652,661,670,643]) + emobj.connect_isopotential(contype = Isopotential_ConnType.CURRENT_SOURCE,isopotential1 = Isopotential(nset4),isopotential2 = Isopotential(nset2),curve=crv) + emobj.connect_isopotential(contype = Isopotential_ConnType.RESISTANCE,isopotential1 = Isopotential(nset4),isopotential2 = Isopotential(nset2),value=0.01) + emobj.connect_isopotential(contype = Isopotential_ConnType.RESISTANCE,isopotential1 = Isopotential(nset3),isopotential2 = Isopotential(nset1),value=0.05) + emobj.add(RogoCoil(SegmentSet(rogoseg))) + + emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.064 seconds) + + +.. _sphx_glr_download_examples_EM_em_resistive_heating_2d_multi_isopots.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: em_resistive_heating_2d_multi_isopots.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: em_resistive_heating_2d_multi_isopots.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/EM/em_rlc_define_func.rst.txt b/version/0.3/_sources/examples/EM/em_rlc_define_func.rst.txt new file mode 100644 index 000000000..4022825ac --- /dev/null +++ b/version/0.3/_sources/examples/EM/em_rlc_define_func.rst.txt @@ -0,0 +1,147 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/EM/em_rlc_define_func.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_EM_em_rlc_define_func.py: + + +RLC circuit by function +======================= +This example shows how to use the ``Function`` object to define an +RLC circuit as an inlet boundary condition. The executable file for +LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-80 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaem import ( + DynaEM, + NodeSet, + SegmentSet, + SolidPart, + SolidFormulation, + EMType, + Isopotential_ConnType, + Isopotential, + RogoCoil, + Function + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid,EMMATTYPE + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + fns = [] + path = examples.em_rlc_define_func + os.sep + fns.append(path + "em_rlc_define_func.k") + solution.open_files(fns) + solution.set_termination(termination_time=0.01) + solution.create_database_binary(dt=1e-4) + + emobj = DynaEM() + solution.add(emobj) + + emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + + emobj.analysis.set_timestep(timestep=1e-4) + emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING) + + matrigid = MatRigid(mass_density=7000, young_modulus=2e11,center_of_mass_constraint=1,translational_constraint=7,rotational_constraint=7) + matrigid.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + + part1 = SolidPart(1) + part1.set_material(matrigid) + part1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + emobj.parts.add(part1) + + nset1 = NodeSet([429,433,437,441,445,449,453,457,461,465,469,473,477,481,485,489,493,497,501,505,509,513,517,521,525]) + nset2 = NodeSet([26,31,36,41,46,51,56,61,66,71,76,81,86,91,96,101,106,111,116,121,126,131,136,141,146]) + isopos_conn1 = Isopotential(nset1) + isopos_conn2 = Isopotential(nset2) + fn = """float rlc(float time,float emdt,float curr,float curr1, + float curr2,float pot1,float pot2, float rmesh) + { + float fac,R,C,Vc,L,xi ; + R = 0.5e-3; L = 78.e-6; + fac =1.e-6; C=363.e-4; + float q= 181.5; + if(time` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: em_rlc_define_func.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/EM/em_rlc_isopotential.rst.txt b/version/0.3/_sources/examples/EM/em_rlc_isopotential.rst.txt new file mode 100644 index 000000000..11e151936 --- /dev/null +++ b/version/0.3/_sources/examples/EM/em_rlc_isopotential.rst.txt @@ -0,0 +1,136 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/EM/em_rlc_isopotential.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_EM_em_rlc_isopotential.py: + + +RLC circuit by isopotential +=========================== +This example shows how to use the corresponding ``contype`` in the +``connect_isopotential()`` method to define an RLC circuit as an +inlet boundary condition. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 10-69 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaem import ( + DynaEM, + NodeSet, + SegmentSet, + SolidPart, + SolidFormulation, + EMType, + Isopotential_ConnType, + Isopotential, + RogoCoil, + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid,EMMATTYPE + from em_set_data import rlc_rogoseg + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + fns = [] + path = examples.em_rlc_isopotential + os.sep + fns.append(path + "em_rlc_isopotential.k") + solution.open_files(fns) + solution.set_termination(termination_time=0.01) + solution.create_database_binary(dt=1e-4) + + emobj = DynaEM() + solution.add(emobj) + + emobj.set_timestep(tssfac=1,timestep_size_for_mass_scaled=1e-4) + + emobj.analysis.set_timestep(timestep=1e-4) + emobj.analysis.set_em_solver(type=EMType.RESISTIVE_HEATING) + + matrigid = MatRigid(mass_density=7000, young_modulus=2e11,center_of_mass_constraint=1,translational_constraint=7,rotational_constraint=7) + matrigid.set_em_permeability_equal(material_type=EMMATTYPE.CONDUCTOR, initial_conductivity=1e4) + + part1 = SolidPart(1) + part1.set_material(matrigid) + part1.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + emobj.parts.add(part1) + + nset1 = NodeSet([429,433,437,441,445,449,453,457,461,465,469,473,477,481,485,489,493,497,501,505,509,513,517,521,525]) + nset2 = NodeSet([26,31,36,41,46,51,56,61,66,71,76,81,86,91,96,101,106,111,116,121,126,131,136,141,146]) + isopos_conn1 = Isopotential(nset1) + isopos_conn2 = Isopotential(nset2) + emobj.connect_isopotential(contype = Isopotential_ConnType.RLC_CIRCUIT,isopotential1 = isopos_conn1,value=5e-4,inductance=7.8e-5,capacity=0.0363,initial_voltage=5000) + emobj.connect_isopotential(contype = Isopotential_ConnType.VOLTAGE_SOURCE,isopotential1 = isopos_conn2) + emobj.add(RogoCoil(SegmentSet(rlc_rogoseg))) + + emobj.create_em_output(mats=2, matf=2, sols=2, solf=2) + + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.052 seconds) + + +.. _sphx_glr_download_examples_EM_em_rlc_isopotential.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: em_rlc_isopotential.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: em_rlc_isopotential.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/EM/index.rst.txt b/version/0.3/_sources/examples/EM/index.rst.txt new file mode 100644 index 000000000..e37473377 --- /dev/null +++ b/version/0.3/_sources/examples/EM/index.rst.txt @@ -0,0 +1,133 @@ + + +.. _sphx_glr_examples_EM: + +EM examples +~~~~~~~~~~~~ + +These examples show how to create and use electromagnetic models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_resistive_heating_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_resistive_heating.py` + +.. raw:: html + +
Resistive heating
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_resistive_heating_2d_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_resistive_heating_2d.py` + +.. raw:: html + +
Resistive heating 2D
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_resistive_heating_2d_isopots_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_resistive_heating_2d_isopots.py` + +.. raw:: html + +
Resistive heating 2D connect isopotential
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_resistive_heating_2d_multi_isopots_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_resistive_heating_2d_multi_isopots.py` + +.. raw:: html + +
Resistive heating 2D multiple connect isopotential
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_rlc_define_func_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_rlc_define_func.py` + +.. raw:: html + +
RLC circuit by function
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_rlc_isopotential_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_rlc_isopotential.py` + +.. raw:: html + +
RLC circuit by isopotential
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/EM/em_resistive_heating + /examples/EM/em_resistive_heating_2d + /examples/EM/em_resistive_heating_2d_isopots + /examples/EM/em_resistive_heating_2d_multi_isopots + /examples/EM/em_rlc_define_func + /examples/EM/em_rlc_isopotential + diff --git a/version/0.3/_sources/examples/EM/sg_execution_times.rst.txt b/version/0.3/_sources/examples/EM/sg_execution_times.rst.txt new file mode 100644 index 000000000..4c7f16c57 --- /dev/null +++ b/version/0.3/_sources/examples/EM/sg_execution_times.rst.txt @@ -0,0 +1,23 @@ + +:orphan: + +.. _sphx_glr_examples_EM_sg_execution_times: + + +Computation times +================= +**00:00.512** total execution time for **examples_EM** files: + ++---------------------------------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_EM_em_resistive_heating.py` (``em_resistive_heating.py``) | 00:00.218 | 0.0 MB | ++---------------------------------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_EM_em_resistive_heating_2d_isopots.py` (``em_resistive_heating_2d_isopots.py``) | 00:00.066 | 0.0 MB | ++---------------------------------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_EM_em_resistive_heating_2d_multi_isopots.py` (``em_resistive_heating_2d_multi_isopots.py``) | 00:00.064 | 0.0 MB | ++---------------------------------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_EM_em_resistive_heating_2d.py` (``em_resistive_heating_2d.py``) | 00:00.060 | 0.0 MB | ++---------------------------------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_EM_em_rlc_isopotential.py` (``em_rlc_isopotential.py``) | 00:00.052 | 0.0 MB | ++---------------------------------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_EM_em_rlc_define_func.py` (``em_rlc_define_func.py``) | 00:00.051 | 0.0 MB | ++---------------------------------------------------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/Explicit/ball_plate.rst.txt b/version/0.3/_sources/examples/Explicit/ball_plate.rst.txt new file mode 100644 index 000000000..72d317937 --- /dev/null +++ b/version/0.3/_sources/examples/Explicit/ball_plate.rst.txt @@ -0,0 +1,354 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Explicit/ball_plate.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Explicit_ball_plate.py: + + +Ball Plate +========== +This example shows how to use the PyDYNA ``pre`` service to create +a ball plate model. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 10-13 + +Perform required imports +~~~~~~~~~~~~~~~~~~~~~~~~ +Peform required imports. + +.. GENERATED FROM PYTHON SOURCE LINES 13-38 + +.. code-block:: default + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Velocity, + PartSet, + ShellPart, + SolidPart, + NodeSet, + Contact, + ContactSurface, + ShellFormulation, + SolidFormulation, + ContactType, + AnalysisType + ) + from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatPiecewiseLinearPlasticity, + ) + from ansys.dyna.core.pre import examples + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 40-44 + +Start the ``pre`` service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Prerequisite: make sure the ``pre`` service docker have been started. +Refer to: https://dyna.docs.pyansys.com/version/stable/getting-started/index.html + +.. GENERATED FROM PYTHON SOURCE LINES 44-54 + +.. code-block:: default + + + # Once the ``pre`` servic is running, you can connect a client to it using + # the host name and the port. This example uses the default local host and port + # (``"localhost"`` and ``"50051"`` respectively). + # + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + solution = DynaSolution(hostname) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 55-61 + +Start the solution workflow +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +NODES and ELEMENTS are read in from the ``ball_plate.k`` file. This file +also has the *PART* defined in it, but the section and material fields are +empty to begin with. + + +.. GENERATED FROM PYTHON SOURCE LINES 61-66 + +.. code-block:: default + + fns = [] + path = examples.ball_plate + os.sep + fns.append(path+"ball_plate.k") + solution.open_files(fns) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ret: true + + + + +.. GENERATED FROM PYTHON SOURCE LINES 67-71 + +Create database and control cards +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +For the D3plots, set simulation termination time, simulation timestep, and +output frequency. + +.. GENERATED FROM PYTHON SOURCE LINES 71-77 + +.. code-block:: default + + + solution.set_termination(termination_time=10) + + ballplate = DynaMech(AnalysisType.NONE) + solution.add(ballplate) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-82 + +Define materials +~~~~~~~~~~~~~~~~ +The ``dynamaterials`` class +are used to define these materials: ``MAT_RIGID``, ``MAT_PIECEWISE_LINEAR_PLASTICITY``, + +.. GENERATED FROM PYTHON SOURCE LINES 82-87 + +.. code-block:: default + + + matrigid = MatRigid(mass_density=7.83e-6, young_modulus=207, poisson_ratio=0.3) + matplastic = MatPiecewiseLinearPlasticity(mass_density=7.83e-6, young_modulus=207, yield_stress=0.2, tangent_modulus=2) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-95 + +Define section properties and assign materials +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Now that you have materials with the material ID corresponding to +the Part ID, you can assign these materials to the +parts. also define the section properties, element +formulations, and constraints. + + +.. GENERATED FROM PYTHON SOURCE LINES 95-109 + +.. code-block:: default + + + plate = ShellPart(1) + plate.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + plate.set_material(matplastic) + plate.set_thickness(1) + plate.set_integration_points(5) + ballplate.parts.add(plate) + + ball = SolidPart(2) + ball.set_material(matrigid) + ball.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + ballplate.parts.add(ball) + + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-113 + +Define surface-to-surface contacts +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define single-surface contact between predefined part set. + +.. GENERATED FROM PYTHON SOURCE LINES 113-119 + +.. code-block:: default + + + selfcontact = Contact(type=ContactType.AUTOMATIC) + surf1 = ContactSurface(PartSet([1, 2])) + selfcontact.set_slave_surface(surf1) + ballplate.contacts.add(selfcontact) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 120-123 + +Define nodal single point constraints. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Constrain the nodes in the spc list + +.. GENERATED FROM PYTHON SOURCE LINES 123-131 + +.. code-block:: default + + + spc = [34,35,51,52,68,69,85,86,102,103,119,120,136,137,153,154,170,171,187,188,204,205,221,222,238,239,255,256] + for i in range(1,19): + spc.append(i) + for i in range(272,290): + spc.append(i) + ballplate.boundaryconditions.create_spc(NodeSet(spc),rx=False,ry=False,rz=False) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 132-136 + +Define initial condition. +~~~~~~~~~~~~~~~~~~~~~~~~~ +Use the ``create_velocity_node`` method +to initialize the velocity components in the desired direction. + +.. GENERATED FROM PYTHON SOURCE LINES 136-139 + +.. code-block:: default + + for i in range(1,1652): + ballplate.initialconditions.create_velocity_node(i,trans=Velocity(0, 0, -10)) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 140-144 + +Define database outputs +~~~~~~~~~~~~~~~~~~~~~~~ +Define the frequency for the D3PLOT file and write out the input file. + + +.. GENERATED FROM PYTHON SOURCE LINES 144-148 + +.. code-block:: default + + solution.set_output_database(glstat=0.1, matsum=0.1, sleout=0.1) + solution.create_database_binary(dt=1) + serverpath = solution.save_file() + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 149-152 + +Download output file +~~~~~~~~~~~~~~~~~~~~ +Download output file from service docker to local /output/. + +.. GENERATED FROM PYTHON SOURCE LINES 152-159 + +.. code-block:: default + + + serveroutfile = '/'.join((serverpath,"ball_plate.k")) + downloadpath = os.path.join(os.getcwd(), "output") + if not os.path.exists(downloadpath): + os.makedirs(downloadpath) + downloadfile = os.path.join(downloadpath,"ball_plate.k") + solution.download(serveroutfile,downloadfile) + + + + + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 2.336 seconds) + + +.. _sphx_glr_download_examples_Explicit_ball_plate.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: ball_plate.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: ball_plate.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/Explicit/belted_dummy.rst.txt b/version/0.3/_sources/examples/Explicit/belted_dummy.rst.txt new file mode 100644 index 000000000..9efabc65f --- /dev/null +++ b/version/0.3/_sources/examples/Explicit/belted_dummy.rst.txt @@ -0,0 +1,419 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Explicit/belted_dummy.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Explicit_belted_dummy.py: + + +Belted dummy +============ +This example shows how to use the PyDYNA ``pre`` service to create +a belted dummy model. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 10-13 + +Perform required imports +~~~~~~~~~~~~~~~~~~~~~~~~ +Peform required imports. + +.. GENERATED FROM PYTHON SOURCE LINES 13-45 + +.. code-block:: default + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Velocity, + Curve, + ShellPart, + DiscretePart, + NodeSet, + SegmentSet, + DRO, + Contact, + ContactSurface, + ContactCategory, + Motion, + Gravity, + GravityOption, + ShellFormulation, + ) + from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatElastic, + MatSpringNonlinearElastic, + MatDamperViscous, + MatDamperNonlinearViscous, + ) + from belted_dummy_data import * + from ansys.dyna.core.pre import examples + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 47-58 + +Manually start the ``pre`` service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Copy the ``pyDyna/src/ansys/dyna/core/pre/Server`` folder to a desired location. +Start the ``pre`` service at this location by running this command: + +``python kwserver.py`` + +Once the ``pre`` servic is running, you can connect a client to it using +the host name and the port. This example uses the default local host and port +(``"localhost"`` and ``"50051"`` respectively). + + +.. GENERATED FROM PYTHON SOURCE LINES 58-63 + +.. code-block:: default + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + dummy_solution = DynaSolution(hostname) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 64-70 + +Start the solution workflow +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +NODES and ELEMENTS are read in from the ``belted_dummy.k`` file. This file +also has the *PART* defined in it, but the section and material fields are +empty to begin with. + + +.. GENERATED FROM PYTHON SOURCE LINES 70-75 + +.. code-block:: default + + fns = [] + path = examples.belted_dummy + os.sep + fns.append(path + "belted_dummy.k") + dummy_solution.open_files(fns) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ret: true + + + + +.. GENERATED FROM PYTHON SOURCE LINES 76-82 + +Create database and control cards +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +For the D3plots, set simulation termination time, simulation timestep, and +output frequency. Use the ``set_init_velocity`` method in the ``dynamech`` +class to initialize the velocity components in the desired direction. + + +.. GENERATED FROM PYTHON SOURCE LINES 82-91 + +.. code-block:: default + + dummy_solution.set_termination(termination_time=0.12) + dummy_solution.create_database_binary(dt=2.5e-3) + + dummy = DynaMech() + dummy_solution.add(dummy) + + dummy.set_timestep(tssfac=0.8) + dummy.set_init_velocity(Velocity(14.8, 0, 0)) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 92-101 + +Define materials +~~~~~~~~~~~~~~~~ +In this model, many parts share common material types. Thus, these materials +are generated in a loop and a list of these materials are created. This list +can then be used later to assign materials to parts. The ``dynamaterials`` class +are used to define these materials: ``MAT_RIGID``, ``MAT_ELASTIC``, +``MAT_SPRING_NONLINEAR_ELASTIC,`` ``MAT_DAMPER_VISCOUS``, and +``MAT_DAMPER_NONLINEAR_VISCOUS``. + + +.. GENERATED FROM PYTHON SOURCE LINES 101-133 + +.. code-block:: default + + shellmatlist = [] + for i in range(15): + matrigid = MatRigid( + mass_density=rigidmats[i][0], young_modulus=rigidmats[i][1], poisson_ratio=0.3 + ) + shellmatlist.append(matrigid) + + for i in range(16, 23): + index = i - 16 + matelastic = MatElastic( + mass_density=elasticmats[index][0], young_modulus=elasticmats[index][1], poisson_ratio=0.3 + ) + shellmatlist.append(matelastic) + + discmatlist = [] + for i in range(101, 143): + index = i - 101 + mat = MatSpringNonlinearElastic(curve=Curve(x=curvedata[index][0], y=curvedata[index][1])) + discmatlist.append(mat) + + for i in range(143, 185): + index = i - 143 + mat = MatDamperViscous(damping_constant=dampingconst[index]) + discmatlist.append(mat) + + for i in range(185, 209): + index = i - 185 + mat = MatDamperNonlinearViscous( + curve=Curve(x=curvedata[lcidlist[index]][0], y=curvedata[lcidlist[index]][1]) + ) + discmatlist.append(mat) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 134-141 + +Define section properties and assign materials +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Now that you have a list of materials with the material ID corresponding to +the Part ID, you can loop through the list and assign these materials to the +parts. While in the loop, also define the section properties, element +formulations, and constraints. + + +.. GENERATED FROM PYTHON SOURCE LINES 141-158 + +.. code-block:: default + + for i in range(1, 23): + part = ShellPart(i) + part.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + part.set_material(shellmatlist[i - 1]) + part.set_thickness(shellsec[i - 1][0]) + part.set_integration_points(shellsec[i - 1][1]) + if i in range(1, 16): + part.set_extra_nodes(NodeSet(extra_nodes[i - 1])) + dummy.parts.add(part) + + for i in range(101, 209): + index = i - 101 + part = DiscretePart(i) + part.set_material(discmatlist[index]) + part.set_displacement_option(displacement_option=DRO.DESCRIBES_TORSIONAL_SPRING) + dummy.parts.add(part) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 159-163 + +Define surface-to-surface contacts +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define several surface-to-surface contacts between predefined segment set pairs +such that each contact has a specific friction defined between the master and slave. + +.. GENERATED FROM PYTHON SOURCE LINES 163-174 + +.. code-block:: default + + + fslist = [0.62, 0.62, 0.62, 0.8, 1, 0.8, 0.88, 0.88, 0.16, 0.88, 0] + for i in range(11): + contact = Contact(category=ContactCategory.SURFACE_TO_SURFACE_CONTACT) + contact.set_friction_coefficient(static=fslist[i]) + surf1 = ContactSurface(SegmentSet(segments[2 * i])) + surf2 = ContactSurface(SegmentSet(segments[2 * i + 1])) + contact.set_slave_surface(surf1) + contact.set_master_surface(surf2) + dummy.contacts.add(contact) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 175-181 + +Define spherical joints +~~~~~~~~~~~~~~~~~~~~~~~ +A spherical joint is one of the simpler joint types. You need only define +a coincident node pair. Read the node pairs from the ``jointlist`` array defined in +the ``belted_dummy_data.py`` file. + + +.. GENERATED FROM PYTHON SOURCE LINES 181-190 + +.. code-block:: default + + for i in range(42): + id = i + 1 + dummy.create_defineorientation( + vid=id, iop=2, vector=vector, node1=nlist[i][0], node2=nlist[i][1] + ) + + for i in range(14): + dummy.constraints.create_joint_spherical(nodes=jointlist[i]) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 191-196 + +Define a prescribed motion on a node set +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use the ``create_imposed_motion()`` method to define a prescribed motion +on a node set. + + +.. GENERATED FROM PYTHON SOURCE LINES 196-202 + +.. code-block:: default + + dummy.boundaryconditions.create_imposed_motion( + NodeSet(motion_nodes), + Curve(x=motion_curve_x, y=motion_curve_y,sfo=0.1), + motion=Motion.ACCELERATION, + scalefactor=-1, + ) + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 203-208 + +Define gravity +~~~~~~~~~~~~~~ +Use the ``Gravity()`` method in the ``dynabase`` class +to define the gravity load, direction of the load, and the curve. + + +.. GENERATED FROM PYTHON SOURCE LINES 208-211 + +.. code-block:: default + + g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 0.152], y=[9.81, 9.81])) + dummy.add(g) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 212-216 + +Define database outputs +~~~~~~~~~~~~~~~~~~~~~~~ +Define the frequency for the D3PLOT file and write out the input file. + + +.. GENERATED FROM PYTHON SOURCE LINES 216-218 + +.. code-block:: default + + dummy_solution.create_database_binary(dt=2.5e-3) + dummy_solution.save_file() + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.835 seconds) + + +.. _sphx_glr_download_examples_Explicit_belted_dummy.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: belted_dummy.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: belted_dummy.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/Explicit/index.rst.txt b/version/0.3/_sources/examples/Explicit/index.rst.txt new file mode 100644 index 000000000..2940dddea --- /dev/null +++ b/version/0.3/_sources/examples/Explicit/index.rst.txt @@ -0,0 +1,61 @@ + + +.. _sphx_glr_examples_Explicit: + +Explicit examples +~~~~~~~~~~~~~~~~~ + +These examples show how to create and use explicit models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Explicit/images/thumb/sphx_glr_ball_plate_thumb.png + :alt: + + :ref:`sphx_glr_examples_Explicit_ball_plate.py` + +.. raw:: html + +
Ball Plate
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Explicit/images/thumb/sphx_glr_belted_dummy_thumb.png + :alt: + + :ref:`sphx_glr_examples_Explicit_belted_dummy.py` + +.. raw:: html + +
Belted dummy
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/Explicit/ball_plate + /examples/Explicit/belted_dummy + diff --git a/version/0.3/_sources/examples/Explicit/sg_execution_times.rst.txt b/version/0.3/_sources/examples/Explicit/sg_execution_times.rst.txt new file mode 100644 index 000000000..4ae64bcc7 --- /dev/null +++ b/version/0.3/_sources/examples/Explicit/sg_execution_times.rst.txt @@ -0,0 +1,15 @@ + +:orphan: + +.. _sphx_glr_examples_Explicit_sg_execution_times: + + +Computation times +================= +**00:03.171** total execution time for **examples_Explicit** files: + ++-------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Explicit_ball_plate.py` (``ball_plate.py``) | 00:02.336 | 0.0 MB | ++-------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Explicit_belted_dummy.py` (``belted_dummy.py``) | 00:00.835 | 0.0 MB | ++-------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/ICFD/icfd_cylinderflow.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_cylinderflow.rst.txt new file mode 100644 index 000000000..2d1595b6d --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_cylinderflow.rst.txt @@ -0,0 +1,150 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_cylinderflow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_cylinderflow.py: + + +Cylinder flow +============= + +This example shows how to create a simple ICFD cylinder flow input deck. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-82 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + ICFDAnalysis, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + icfd_solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.cylinder_flow + os.sep + fns.append(path + "cylinder_flow.k") + icfd_solution.open_files(fns) + # Set total time of simulation + icfd_solution.set_termination(termination_time=100) + + icfd = DynaICFD() + icfd_solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + icfd_solution.create_database_binary(dt=1) + icfd_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.069 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_cylinderflow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_cylinderflow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_cylinderflow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_dam_break.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_dam_break.rst.txt new file mode 100644 index 000000000..07507e693 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_dam_break.rst.txt @@ -0,0 +1,151 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_dam_break.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_dam_break.py: + + +Dam break +========= + +This example shows how to use the ICFD solver on a simple free surface. +A column of water collapses under the load of gravity. The executable file +for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-83 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Gravity, + GravityOption, + Compressible + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.dam_break + os.sep + fns.append(path + "dam_break.k") + solution.open_files(fns) + solution.set_termination(termination_time=50) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001) + mat2 = MatICFD(flag=Compressible.VACUUM) + + part1 = ICFDPart(1) + part1.set_material(mat1) + part1.set_free_slip() + icfd.parts.add(part1) + + part2 = ICFDPart(2) + part2.set_material(mat2) + part2.set_free_slip() + icfd.parts.add(part2) + + part3 = ICFDPart(3) + part3.set_material(mat1) + icfd.parts.add(part3) + + g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[9.81, 9.81])) + icfd.add(g) + + partvol1 = ICFDVolumePart(surfaces=[1, 3]) + partvol1.set_material(mat1) + icfd.parts.add(partvol1) + + partvol2 = ICFDVolumePart(surfaces=[2, 3]) + partvol2.set_material(mat2) + icfd.parts.add(partvol2) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2]) + meshvol.set_fluid_interfaces([3]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.2) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.044 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_dam_break.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_dam_break.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_dam_break.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_dem_coupling.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_dem_coupling.rst.txt new file mode 100644 index 000000000..366fe5d3d --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_dem_coupling.rst.txt @@ -0,0 +1,166 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_dem_coupling.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_dem_coupling.py: + + +DEM coupling +============ + +This example shows how to couple the ICFD fluid solver with DEM particles. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R101_winx64_ifort131.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-98 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + SolidPart, + SolidFormulation, + Curve, + Velocity, + Point, + ICFD_CouplingForm + ) + from ansys.dyna.core.pre.dynadem import DEMAnalysis + from ansys.dyna.core.pre.dynamaterial import MatRigidDiscrete + from ansys.dyna.core.pre import examples + + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.dem_coupling + os.sep + fns.append(path + "dem_coupling.k") + solution.open_files(fns) + solution.set_termination(termination_time=100) + icfd = DynaICFD() + solution.add(icfd) + + icfd.set_timestep(tssfac=0.8) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfdanalysis.set_coupling_dem(formulation=ICFD_CouplingForm.FORCE_USING_FLUID_PRESSURE_GRADIENT) + icfd.add(icfdanalysis) + + demanalysis = DEMAnalysis() + demanalysis.set_des(normal_damping_coeff=0.9, tangential_damping_coeff=0.9, static_friction_coeff=0.3, rolling_friction_coeff=0.001) + icfd.add(demanalysis) + + # define model + mat = MatICFD(flow_density=2.0, dynamic_viscosity=0.01) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + icfd.set_initial(velocity=Velocity(1, 0, 0)) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3]) + meshvol.meshsize_box(size=0.05,min_point=Point(-1, -1, -1),max_point=Point(1, 1, 1)) + icfd.add(meshvol) + + #define rigid cylinder + matrigid = MatRigidDiscrete(mass_density=1000,young_modulus=1e4) + disc = SolidPart(101) + disc.set_material(matrigid) + disc.set_element_formulation(SolidFormulation.ONE_POINT_COROTATIONAL) + icfd.parts.add(disc) + + solution.create_database_binary(dt=1.0) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.123 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_dem_coupling.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_dem_coupling.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_dem_coupling.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_driven_cavity.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_driven_cavity.rst.txt new file mode 100644 index 000000000..f598d611e --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_driven_cavity.rst.txt @@ -0,0 +1,139 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_driven_cavity.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_driven_cavity.py: + + +Driven cavity +============= + +This example shows the universally famous driven-cavity case tested with +the second-order steady solver and for ``Re=1000``. The executable file +for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-71 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ICFD_AnalysisType, + ICFD_MessageLevel, + ICFDDOF + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.driven_cavity + os.sep + fns.append(path + "driven_cavity.k") + solution.open_files(fns) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_type(analysis_type=ICFD_AnalysisType.STEADY_STATE_ANALYSIS) + icfdanalysis.set_output(messagelevel=ICFD_MessageLevel.FULL_OUTPUT_INFORMATION,iteration_interval=250) + icfdanalysis.set_steady_state(max_iteration=2500,momentum_tol_limit=1e-8,pressure_tol_limit=1e-8,velocity_relax_param=1,pressure_relax_param=1) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1, dynamic_viscosity=0.001) + + part1 = ICFDPart(1) + part1.set_material(mat) + part1.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + icfd.parts.add(part1) + + part2 = ICFDPart(2) + part2.set_material(mat) + part2.set_non_slip() + icfd.parts.add(part2) + + partvol = ICFDVolumePart(surfaces=[1, 2]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2]) + icfd.add(meshvol) + + solution.create_database_binary(dt=250) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.060 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_driven_cavity.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_driven_cavity.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_driven_cavity.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_free_convection_flow.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_free_convection_flow.rst.txt new file mode 100644 index 000000000..7bf4f9fc7 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_free_convection_flow.rst.txt @@ -0,0 +1,156 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_free_convection_flow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_free_convection_flow.py: + + +Thermal flow +============ + +This example shows a simple ICFD forced-convection input deck with a coarse mesh. +The executable file for LS-DYNA is`` ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-88 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Gravity, + GravityOption + + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.free_convection_flow + os.sep + fns.append(path + "free_convection_flow.k") + solution.open_files(fns) + solution.set_termination(termination_time=30) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.01) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=37.799999, dynamic_viscosity=1,heat_capacity = 0.7,thermal_conductivity=1.0,thermal_expansion_coefficient=1) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_non_slip() + part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[1, 1])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_non_slip() + part_outflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_non_slip() + part_symmetric.compute_temperature() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_temperature() + icfd.parts.add(part_wall) + + icfd.set_initial() + + g = Gravity(dir=GravityOption.DIR_Y, load=Curve(x=[0, 10000], y=[1, 1])) + icfd.add(g) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3,4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.062 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_free_convection_flow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_free_convection_flow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_free_convection_flow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_imposed_move.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_imposed_move.rst.txt new file mode 100644 index 000000000..c712c6eb7 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_imposed_move.rst.txt @@ -0,0 +1,151 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_imposed_move.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_imposed_move.py: + + +Imposed move +============ + +This example shows how to impose displacements on fluid nodes through the +use of the ``ICFD_CONTROL_IMPOSED_MOVE`` keyword. The executable file for +LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-83 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Curve + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.imposed_move + os.sep + fns.append(path + "imposed_move.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.5) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.055 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_imposed_move.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_imposed_move.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_imposed_move.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_internal_3d_flow.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_internal_3d_flow.rst.txt new file mode 100644 index 000000000..dffac0717 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_internal_3d_flow.rst.txt @@ -0,0 +1,148 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_internal_3d_flow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_internal_3d_flow.py: + + +Internal 3D flow +================ + +This example shows a simple 3D ICFD problem. +The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 10-81 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ICFD_SurfRemeshMethod + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.internal_3d_flow + os.sep + fns.append(path + "internal_3d_flow.k") + solution.open_files(fns) + solution.set_termination(termination_time=10) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(timestep=0.05) + icfdanalysis.set_volume_mesh(mesh_growth_scale_factor=1.1) + icfdanalysis.set_surface_mesh(remesh_method = ICFD_SurfRemeshMethod.LAPLACIAN_SMOOTHING) + icfd.add(icfdanalysis) + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + part_inflow.set_boundary_layer_symmetry_condition() + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + part_outflow.set_boundary_layer_symmetry_condition() + part_outflow.compute_flux() + icfd.parts.add(part_outflow) + + part_wall = ICFDPart(3) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.set_boundary_layer(2) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.061 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_internal_3d_flow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_internal_3d_flow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_internal_3d_flow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_mesh_adaptivity.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_mesh_adaptivity.rst.txt new file mode 100644 index 000000000..22e8a7525 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_mesh_adaptivity.rst.txt @@ -0,0 +1,153 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_mesh_adaptivity.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_mesh_adaptivity.py: + + +Mesh adaptivity +=============== + +This example shows a simple ICFD problem with adaptivity. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-85 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.mesh_adaptivity + os.sep + fns.append(path + "mesh_adaptivity.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfdanalysis.set_mesh_adaptivity(min_mesh_size=0.02,max_mesh_size=0.2,max_perceptual_error=2,num_iteration=10) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=2) + icfd.parts.add(part_wall) + + part_meshsize = ICFDPart(5) + part_meshsize.set_material(mat) + icfd.parts.add(part_meshsize) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.5) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.069 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_mesh_adaptivity.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_mesh_adaptivity.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_mesh_adaptivity.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_mesh_morphing.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_mesh_morphing.rst.txt new file mode 100644 index 000000000..d53183a20 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_mesh_morphing.rst.txt @@ -0,0 +1,158 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_mesh_morphing.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_mesh_morphing.py: + + +Mesh morphing +============= + +This example shows a simple ICFD problem with mesh morphing. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-90 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.mesh_morphing + os.sep + fns.append(path + "mesh_morphing.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=2) + part_wall.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) + icfd.parts.add(part_wall) + + part_meshmorph = ICFDPart(5) + part_meshmorph.set_material(mat) + icfd.parts.add(part_meshmorph) + + partvol1 = ICFDVolumePart(surfaces=[1, 2, 3, 5]) + partvol1.set_material(mat) + icfd.parts.add(partvol1) + partvol2 = ICFDVolumePart(surfaces=[5, 4]) + partvol2.set_material(mat) + partvol2.set_imposed_move(vy=Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)")) + icfd.parts.add(partvol2) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + meshvol.set_fluid_interfaces([5]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.5) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.070 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_mesh_morphing.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_mesh_morphing.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_mesh_morphing.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_mesh_size.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_mesh_size.rst.txt new file mode 100644 index 000000000..6281bef42 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_mesh_size.rst.txt @@ -0,0 +1,153 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_mesh_size.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_mesh_size.py: + + +Mesh size +========== + +This example shows a simple ICFD input deck with a coarse mesh. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-85 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.mesh_size + os.sep + fns.append(path + "mesh_size.k") + solution.open_files(fns) + solution.set_termination(termination_time=50) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=2) + icfd.parts.add(part_wall) + + part_meshsize = ICFDPart(5) + part_meshsize.set_material(mat) + icfd.parts.add(part_meshsize) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + meshvol.set_meshsize([5]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.062 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_mesh_size.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_mesh_size.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_mesh_size.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_plate_flow.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_plate_flow.rst.txt new file mode 100644 index 000000000..19bc0400e --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_plate_flow.rst.txt @@ -0,0 +1,149 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_plate_flow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_plate_flow.py: + + +Plate flow +========== + +This example shows a simple ICFD input deck with a coarse mesh. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-81 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.plate_flow + os.sep + fns.append(path + "plate_flow.k") + solution.open_files(fns) + solution.set_termination(termination_time=100) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=2) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3]) + meshvol.embed_shell([4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.054 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_plate_flow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_plate_flow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_plate_flow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_sloshing.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_sloshing.rst.txt new file mode 100644 index 000000000..be3f3154d --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_sloshing.rst.txt @@ -0,0 +1,155 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_sloshing.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_sloshing.py: + + +Sloshing +======== + +This example shows how to directly impose a displacement of the entire volume mesh +through the use of the ``ICFD_CONTROL_IMPOSED_MOVE`` keyword. The executable file +for LS-DYNA is ``ls-dyna_smp_d_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-87 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + Curve, + Gravity, + GravityOption, + Compressible + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.sloshing + os.sep + fns.append(path + "sloshing.k") + solution.open_files(fns) + solution.set_termination(termination_time=1) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.02) + icfd.add(icfdanalysis) + + # define model + mat1 = MatICFD(flow_density=1000, dynamic_viscosity=0.001) + mat2 = MatICFD(flag=Compressible.VACUUM) + + part_bottom = ICFDPart(1) + part_bottom.set_material(mat1) + part_bottom.set_non_slip() + icfd.parts.add(part_bottom) + + part_top = ICFDPart(2) + part_top.set_material(mat2) + part_top.set_non_slip() + icfd.parts.add(part_top) + + part_mid = ICFDPart(3) + part_mid.set_material(mat1) + icfd.parts.add(part_mid) + + g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 10000], y=[9.81, 9.81])) + icfd.add(g) + + icfd.set_imposed_move(vx=Curve(x=[0, 0.5, 0.52, 0.8, 0.82, 2.0], y=[1, 1, -1, -1, 0, 0])) + + partvol_bottom = ICFDVolumePart(surfaces=[1, 3]) + partvol_bottom.set_material(mat1) + icfd.parts.add(partvol_bottom) + + partvol_top = ICFDVolumePart(surfaces=[2, 3]) + partvol_top.set_material(mat2) + icfd.parts.add(partvol_top) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2]) + meshvol.set_fluid_interfaces([3]) + icfd.add(meshvol) + + solution.create_database_binary(dt=0.02) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.348 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_sloshing.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_sloshing.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_sloshing.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_strong_fsi.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_strong_fsi.rst.txt new file mode 100644 index 000000000..c0ad71cdd --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_strong_fsi.rst.txt @@ -0,0 +1,175 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_strong_fsi.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_strong_fsi.py: + + +Strong FSI +========== + +This example shows a simple FSI (fluid-structure interaction) coupling problem +using strong FSI. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-107 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ShellPart, + ShellFormulation, + PartSet, + Curve, + DOF, + Motion + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.strong_fsi + os.sep + fns.append(path + "strong_fsi.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfdanalysis.set_fsi() + icfd.add(icfdanalysis) + + icfd.implicitanalysis.set_initial_timestep_size( + size=10 + ) + icfd.implicitanalysis.set_dynamic(gamma=0.6, beta=0.4) + icfd.implicitanalysis.set_solution( + iteration_limit=100, stiffness_reformation_limit=150 + ) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.set_fsi() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + #define rigid cylinder + matrigid = MatRigid(mass_density=1.2,young_modulus=2e11,poisson_ratio=0.3) + cylinder = ShellPart(1) + cylinder.set_material(matrigid) + cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS) + icfd.parts.add(cylinder) + # Define boundary conddition + icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY) + + solution.create_database_binary(dt=0.1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.076 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_strong_fsi.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_strong_fsi.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_strong_fsi.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_thermal_flow.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_thermal_flow.rst.txt new file mode 100644 index 000000000..b72382bab --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_thermal_flow.rst.txt @@ -0,0 +1,153 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_thermal_flow.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_thermal_flow.py: + + +Thermal flow +============ + +This example shows a simple ICFD forced-convection input deck with +a coarse mesh. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-85 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.thermal_flow + os.sep + fns.append(path + "thermal_flow.k") + solution.open_files(fns) + solution.set_termination(termination_time=100) + icfd = DynaICFD() + solution.add(icfd) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005,heat_capacity = 1000,thermal_conductivity=200) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 10000], y=[1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + part_inflow.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[20, 20])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.set_prescribed_temperature(temperature=Curve(x=[0, 10000], y=[80, 80])) + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + icfd.parts.add(part_wall) + + icfd.set_initial(temperature=10) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3,4]) + icfd.add(meshvol) + + solution.create_database_binary(dt=1) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.065 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_thermal_flow.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_thermal_flow.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_thermal_flow.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/icfd_weak_fsi.rst.txt b/version/0.3/_sources/examples/ICFD/icfd_weak_fsi.rst.txt new file mode 100644 index 000000000..cee751acc --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/icfd_weak_fsi.rst.txt @@ -0,0 +1,169 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ICFD/icfd_weak_fsi.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ICFD_icfd_weak_fsi.py: + + +Weak FSI +======== + +This example shows a simple FSI (fluid-structure interaction) coupling problem +using weak/loose/explicit FSI. The executable file for LS-DYNA is +``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-101 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynaicfd import ( + DynaICFD, + MatICFD, + ICFDPart, + ICFDDOF, + Curve, + ICFDVolumePart, + MeshedVolume, + ICFDAnalysis, + ShellPart, + ShellFormulation, + PartSet, + Curve, + DOF, + Motion + ) + from ansys.dyna.core.pre.dynamaterial import MatRigid + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.weak_fsi + os.sep + fns.append(path + "weak_fsi.k") + solution.open_files(fns) + solution.set_termination(termination_time=40) + icfd = DynaICFD() + solution.add(icfd) + + icfd.set_timestep(tssfac=0.9,max_timestep=Curve(x=[0,10000],y=[0.05,0.05])) + + icfdanalysis = ICFDAnalysis() + icfdanalysis.set_timestep(0.05) + icfdanalysis.set_fsi() + icfd.add(icfdanalysis) + + # define model + mat = MatICFD(flow_density=1.0, dynamic_viscosity=0.005) + + part_inflow = ICFDPart(1) + part_inflow.set_material(mat) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.X, motion=Curve(x=[0, 5, 6, 10000], y=[0, 0, 1, 1])) + part_inflow.set_prescribed_velocity(dof=ICFDDOF.Y, motion=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_inflow) + + part_outflow = ICFDPart(2) + part_outflow.set_material(mat) + part_outflow.set_prescribed_pressure(pressure=Curve(x=[0, 10000], y=[0, 0])) + icfd.parts.add(part_outflow) + + part_symmetric = ICFDPart(3) + part_symmetric.set_material(mat) + part_symmetric.set_free_slip() + icfd.parts.add(part_symmetric) + + part_wall = ICFDPart(4) + part_wall.set_material(mat) + part_wall.set_non_slip() + part_wall.set_fsi() + part_wall.compute_drag_force() + part_wall.set_boundary_layer(number=3) + icfd.parts.add(part_wall) + + partvol = ICFDVolumePart(surfaces=[1, 2, 3, 4]) + partvol.set_material(mat) + icfd.parts.add(partvol) + # define the volume space that will be meshed,The boundaries + # of the volume are the surfaces "spids" + meshvol = MeshedVolume(surfaces=[1, 2, 3, 4]) + icfd.add(meshvol) + + #define rigid cylinder + matrigid = MatRigid(mass_density=1000,young_modulus=2e11,poisson_ratio=0.3) + cylinder = ShellPart(1) + cylinder.set_material(matrigid) + cylinder.set_element_formulation(ShellFormulation.PLANE_STRESS) + icfd.parts.add(cylinder) + # Define boundary conddition + icfd.boundaryconditions.create_imposed_motion(PartSet([1]),Curve(func="2*3.14/10*sin(2*3.14/10*TIME+3.14/2)"),dof=DOF.Y_TRANSLATIONAL,motion=Motion.VELOCITY) + + solution.create_database_binary(dt=0.2) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.071 seconds) + + +.. _sphx_glr_download_examples_ICFD_icfd_weak_fsi.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: icfd_weak_fsi.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: icfd_weak_fsi.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ICFD/index.rst.txt b/version/0.3/_sources/examples/ICFD/index.rst.txt new file mode 100644 index 000000000..92ddad6c7 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/index.rst.txt @@ -0,0 +1,296 @@ + + +.. _sphx_glr_examples_ICFD: + +ICFD examples +~~~~~~~~~~~~~~ + +These examples show how to create and use ICFD +incompressible computational fluid dynamics) models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_cylinderflow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_cylinderflow.py` + +.. raw:: html + +
Cylinder flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_dam_break_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_dam_break.py` + +.. raw:: html + +
Dam break
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_dem_coupling_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_dem_coupling.py` + +.. raw:: html + +
DEM coupling
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_driven_cavity_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_driven_cavity.py` + +.. raw:: html + +
Driven cavity
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_free_convection_flow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_free_convection_flow.py` + +.. raw:: html + +
Thermal flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_imposed_move_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_imposed_move.py` + +.. raw:: html + +
Imposed move
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_internal_3d_flow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_internal_3d_flow.py` + +.. raw:: html + +
Internal 3D flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_adaptivity_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_adaptivity.py` + +.. raw:: html + +
Mesh adaptivity
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_morphing_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_morphing.py` + +.. raw:: html + +
Mesh morphing
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_size_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_size.py` + +.. raw:: html + +
Mesh size
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_plate_flow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_plate_flow.py` + +.. raw:: html + +
Plate flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_sloshing_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_sloshing.py` + +.. raw:: html + +
Sloshing
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_strong_fsi_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_strong_fsi.py` + +.. raw:: html + +
Strong FSI
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_thermal_flow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_thermal_flow.py` + +.. raw:: html + +
Thermal flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_weak_fsi_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_weak_fsi.py` + +.. raw:: html + +
Weak FSI
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/ICFD/icfd_cylinderflow + /examples/ICFD/icfd_dam_break + /examples/ICFD/icfd_dem_coupling + /examples/ICFD/icfd_driven_cavity + /examples/ICFD/icfd_free_convection_flow + /examples/ICFD/icfd_imposed_move + /examples/ICFD/icfd_internal_3d_flow + /examples/ICFD/icfd_mesh_adaptivity + /examples/ICFD/icfd_mesh_morphing + /examples/ICFD/icfd_mesh_size + /examples/ICFD/icfd_plate_flow + /examples/ICFD/icfd_sloshing + /examples/ICFD/icfd_strong_fsi + /examples/ICFD/icfd_thermal_flow + /examples/ICFD/icfd_weak_fsi + diff --git a/version/0.3/_sources/examples/ICFD/sg_execution_times.rst.txt b/version/0.3/_sources/examples/ICFD/sg_execution_times.rst.txt new file mode 100644 index 000000000..b4fc7a200 --- /dev/null +++ b/version/0.3/_sources/examples/ICFD/sg_execution_times.rst.txt @@ -0,0 +1,41 @@ + +:orphan: + +.. _sphx_glr_examples_ICFD_sg_execution_times: + + +Computation times +================= +**00:01.290** total execution time for **examples_ICFD** files: + ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_sloshing.py` (``icfd_sloshing.py``) | 00:00.348 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_dem_coupling.py` (``icfd_dem_coupling.py``) | 00:00.123 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_strong_fsi.py` (``icfd_strong_fsi.py``) | 00:00.076 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_weak_fsi.py` (``icfd_weak_fsi.py``) | 00:00.071 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_mesh_morphing.py` (``icfd_mesh_morphing.py``) | 00:00.070 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_mesh_adaptivity.py` (``icfd_mesh_adaptivity.py``) | 00:00.069 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_cylinderflow.py` (``icfd_cylinderflow.py``) | 00:00.069 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_thermal_flow.py` (``icfd_thermal_flow.py``) | 00:00.065 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_free_convection_flow.py` (``icfd_free_convection_flow.py``) | 00:00.062 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_mesh_size.py` (``icfd_mesh_size.py``) | 00:00.062 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_internal_3d_flow.py` (``icfd_internal_3d_flow.py``) | 00:00.061 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_driven_cavity.py` (``icfd_driven_cavity.py``) | 00:00.060 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_imposed_move.py` (``icfd_imposed_move.py``) | 00:00.055 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_plate_flow.py` (``icfd_plate_flow.py``) | 00:00.054 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ICFD_icfd_dam_break.py` (``icfd_dam_break.py``) | 00:00.044 | 0.0 MB | ++-----------------------------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/ISPH/index.rst.txt b/version/0.3/_sources/examples/ISPH/index.rst.txt new file mode 100644 index 000000000..ab9e0f5fd --- /dev/null +++ b/version/0.3/_sources/examples/ISPH/index.rst.txt @@ -0,0 +1,44 @@ + + +.. _sphx_glr_examples_ISPH: + +ISPH examples +~~~~~~~~~~~~~ + +These examples show how to create and use ISPH (incompressible +smooth particle hydrodynamics) models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ISPH/images/thumb/sphx_glr_rigidtest_thumb.png + :alt: + + :ref:`sphx_glr_examples_ISPH_rigidtest.py` + +.. raw:: html + +
Rigid test
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/ISPH/rigidtest + diff --git a/version/0.3/_sources/examples/ISPH/rigidtest.rst.txt b/version/0.3/_sources/examples/ISPH/rigidtest.rst.txt new file mode 100644 index 000000000..202e74106 --- /dev/null +++ b/version/0.3/_sources/examples/ISPH/rigidtest.rst.txt @@ -0,0 +1,204 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/ISPH/rigidtest.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_ISPH_rigidtest.py: + + +Rigid test +========== + +This examples show how to use the PyDYNA ``pre`` service to create +an ISPH model. The executable file for LS-DYNA is +``ls-dyna_mpp_d_R13.0_365-gf8a97bda2a_winx64_ifort190_msmpi.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-136 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamaterial import ( + MatRigid, + MatSPHIncompressibleFluid, + MatSPHIncompressibleStructure, + ) + from ansys.dyna.core.pre.dynaisph import ( + DynaISPH, + Box, + Point, + Curve, + PartSet, + ShellPart, + ShellFormulation, + ISPHStructPart, + ISPHFluidPart, + DOF, + Motion, + Gravity, + GravityOption, + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + isphsolution = DynaSolution(hostname) + fns = [] + path = examples.isph_rigidtest + os.sep + fns.append(path + "rigidtest.k") + isphsolution.open_files(fns) + + isphsolution.set_termination(0.5) + + isphobj = DynaISPH() + isphsolution.add(isphobj) + + isphobj.set_timestep( + tssfac=1, max_timestep=Curve(x=[0, 0.04, 0.05, 0.1, 100], y=[0.5, 0.5, 1, 1, 1]) + ) + isphobj.isphanalysis.set_box(Box(-750, 800, -800, 800, -100, 3000)) + + platemat1 = MatRigid( + mass_density=1e-9, + young_modulus=10, + center_of_mass_constraint=1, + translational_constraint=5, + rotational_constraint=4, + ) + platemat2 = MatRigid( + mass_density=1e-9, + young_modulus=10, + center_of_mass_constraint=1, + translational_constraint=7, + rotational_constraint=7, + ) + # platemat3 = MatRigid(mass_density=1e-9,young_modulus=10) + # matelastic = MatElastic(mass_density=1e-9,young_modulus=1) + matsphfluid = MatSPHIncompressibleFluid( + mass_density=1e-9, dynamic_viscosity=1e-9, tension_coefficient1=1e6, tension_coefficient2=1000 + ) + matsphstruct = MatSPHIncompressibleStructure(mass_density=1e-9) + + sensorplane = ShellPart(1) + sensorplane.set_material(platemat2) + sensorplane.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + sensorplane.set_thickness(0.1) + isphobj.parts.add(sensorplane) + + movingcube = ShellPart(7) + movingcube.set_material(platemat1) + movingcube.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + movingcube.set_thickness(0.1) + isphobj.parts.add(movingcube) + + wallsmesh = ShellPart(8) + wallsmesh.set_material(platemat2) + wallsmesh.set_element_formulation(ShellFormulation.BELYTSCHKO_TSAY) + wallsmesh.set_thickness(0.1) + isphobj.parts.add(wallsmesh) + + sphwall = ISPHStructPart(4, PartSet([8]), 12) + sphwall.set_material(matsphstruct) + sphwall.set_smoothing_length(1, 1, 1, 12) + isphobj.parts.add(sphwall) + + sphcube = ISPHStructPart(5, PartSet([7]), 12) + sphcube.set_material(matsphstruct) + sphcube.set_smoothing_length(1, 1, 1, 12) + isphobj.parts.add(sphcube) + + sphwater = ISPHFluidPart(6, Point(-588, -588, 9), Point(1176, 1176, 204), 98, 98, 17) + sphwater.set_material(matsphfluid) + sphwater.set_smoothing_length(1, 1, 1, 12) + sphwater.create_massflow_plane(PartSet([1])) + isphobj.parts.add(sphwater) + + # Constraint + isphobj.constraints.merge_two_rigid_bodies(7, 1) + + # Define boundary conddition + isphobj.boundaryconditions.create_imposed_motion( + PartSet([7]), + Curve(x=[0, 0.1, 0.11, 20], y=[3000, 3000, 0, 0]), + dof=DOF.X_TRANSLATIONAL, + motion=Motion.VELOCITY, + ) + isphobj.boundaryconditions.create_imposed_motion( + PartSet([7]), + Curve(x=[0, 0.1, 0.11, 20], y=[500, 500, 500, 500]), + dof=DOF.Z_ROTATIONAL, + motion=Motion.VELOCITY, + scalefactor=0.01, + ) + + # Load + g = Gravity(dir=GravityOption.DIR_Z, load=Curve(x=[0, 100], y=[9810, 9810])) + isphobj.add(g) + + isphsolution.set_output_database(glstat=0.001, sphmassflow=0.001) + isphsolution.create_database_binary(dt=0.01) + isphsolution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 1.044 seconds) + + +.. _sphx_glr_download_examples_ISPH_rigidtest.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: rigidtest.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: rigidtest.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/ISPH/sg_execution_times.rst.txt b/version/0.3/_sources/examples/ISPH/sg_execution_times.rst.txt new file mode 100644 index 000000000..242d2b80d --- /dev/null +++ b/version/0.3/_sources/examples/ISPH/sg_execution_times.rst.txt @@ -0,0 +1,13 @@ + +:orphan: + +.. _sphx_glr_examples_ISPH_sg_execution_times: + + +Computation times +================= +**00:01.044** total execution time for **examples_ISPH** files: + ++---------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_ISPH_rigidtest.py` (``rigidtest.py``) | 00:01.044 | 0.0 MB | ++---------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/Implicit/camry_rc.rst.txt b/version/0.3/_sources/examples/Implicit/camry_rc.rst.txt new file mode 100644 index 000000000..83e681fe4 --- /dev/null +++ b/version/0.3/_sources/examples/Implicit/camry_rc.rst.txt @@ -0,0 +1,604 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Implicit/camry_rc.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Implicit_camry_rc.py: + + +Implicit model +============== +This example shows how to create and use an implicit dynamic roof crush model. + +.. GENERATED FROM PYTHON SOURCE LINES 8-12 + +Perform required imports +~~~~~~~~~~~~~~~~~~~~~~~~ +Peform required imports. + + +.. GENERATED FROM PYTHON SOURCE LINES 12-43 + +.. code-block:: default + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + Curve, + BeamPart, + ShellPart, + NodeSet, + PartSet, + TimestepCtrol, + Contact, + ContactType, + ContactCategory, + ContactSurface, + DOF, + OffsetType, + AnalysisType + ) + from ansys.dyna.core.pre.dynamaterial import ( + MatNull, + MatRigid, + MatSpotweld, + MatModifiedPiecewiseLinearPlasticity, + MatPiecewiseLinearPlasticity, + ) + from camry_rc_data import * + from ansys.dyna.core.pre import examples + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 44-55 + +Manually start the ``pre`` service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Copy the ``pyDyna/src/ansys/dyna/core/pre/Server``folder to a desired location. +Start the ``pre`` service at this location by running this command: + +``python kwserver.py`` + +Once the ``pre`` servic is running, you can connect a client to it using +the hostname and the port. This example uses the default local host and port +(``"localhost"`` and ``"50051"`` respectively). + + +.. GENERATED FROM PYTHON SOURCE LINES 55-60 + +.. code-block:: default + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + camry_solution = DynaSolution(hostname) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 61-66 + +Import initial mesh data +~~~~~~~~~~~~~~~~~~~~~~~~ +Import the initial mesh data (nodes and elements), which includes the +vehicle data, weld data, and platen data. + + +.. GENERATED FROM PYTHON SOURCE LINES 66-77 + +.. code-block:: default + + fns = [] + path = examples.camry_rc + os.sep + fns.append(path + "Camry_RC_main.k") + fns.append(path + "501_RIG_BAR_roof_crush_platen5.key") + fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7.k") + fns.append(path + "Camry_V1_NoSusAndPowerTrain_impl7_nodes.k") + fns.append(path + "roof_welds.k") + fns.append(path + "weld7.k") + fns.append(path + "xtra_sw.k") + camry_solution.open_files(fns) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ret: true + + + + +.. GENERATED FROM PYTHON SOURCE LINES 78-85 + +Define global control cards +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Because roof crush is a quasi-static loading case, you must run this model +as an implicit dynamic solution. Define the global control cards. From +the ``dynasolution`` class, set the termination time and the frequency for +the database ASCII options. + + +.. GENERATED FROM PYTHON SOURCE LINES 85-87 + +.. code-block:: default + + camry_solution.set_termination(10) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-91 + +Use the implicit analysis methods in the ``dynamech`` class to define +the IMPLICIT control cards. + + +.. GENERATED FROM PYTHON SOURCE LINES 91-94 + +.. code-block:: default + + camry = DynaMech(analysis=AnalysisType.EXPLICIT) + camry_solution.add(camry) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 95-98 + +Set the automatic timestep control flag +and the optimal equilibrium iteration count per timestep. + + +.. GENERATED FROM PYTHON SOURCE LINES 98-104 + +.. code-block:: default + + camry.implicitanalysis.set_initial_timestep_size(0.1) + camry.implicitanalysis.set_timestep( + control_flag=TimestepCtrol.AUTOMATICALLY_ADJUST_TIMESTEP_SIZE, + Optimum_equilibrium_iteration_count=511, + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 105-108 + +Use the ``set_dynamic()`` method to set the IMASS value to 1 and assign the +gamma and beta values. + + +.. GENERATED FROM PYTHON SOURCE LINES 108-109 + +.. code-block:: default + + camry.implicitanalysis.set_dynamic(gamma=0.6, beta=0.38) + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 110-113 + +If normal modes must be extracted, use the ``set_eigenvalue()`` method. +The ``set_solution()`` method defines NSOLVR as 12 (Nolinear with BFGS update). + + +.. GENERATED FROM PYTHON SOURCE LINES 113-118 + +.. code-block:: default + + camry.implicitanalysis.set_eigenvalue() + camry.implicitanalysis.set_solution(iteration_limit=1, + stiffness_reformation_limit=50, absolute_convergence_tolerance=-100 + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 119-125 + +Define materials +~~~~~~~~~~~~~~~~ +This model uses four classes of material: ``MAT_NULL``, ``MAT_RIGID,`` +``MAT_SPOTWELD``, and ``MAT_PIECEWISE_LINEAR_PLASTICITY``. Use the ``dynamaterial`` +class to define these materials. + + +.. GENERATED FROM PYTHON SOURCE LINES 125-203 + +.. code-block:: default + + matnull = MatNull(mass_density=6e-11) + matrigid = MatRigid(mass_density=7.890e-09, young_modulus=2.100e05, poisson_ratio=0.3) + matplaten = MatRigid( + mass_density=7.80e-09, + young_modulus=2.00e05, + poisson_ratio=0.3, + center_of_mass_constraint=1, + rotational_constraint=7, + ) + spotweldharden2100 = MatSpotweld( + mass_density=7.850e-09, + young_modulus=2.100e05, + poisson_ratio=0.3, + yield_stress=510, + plastic_hardening_modulus=2100, + ) + spotweldharden2200 = MatSpotweld( + mass_density=7.850e-09, + young_modulus=2.100e05, + poisson_ratio=0.3, + yield_stress=510, + plastic_hardening_modulus=2200, + ) + windowshield = MatModifiedPiecewiseLinearPlasticity( + mass_density=2.355e-09, + young_modulus=7.000e04, + poisson_ratio=0.22, + yield_stress=30, + tangent_modulus=1400, + plastic_strain_to_failure=0.015, + integration_points_number=1, + ) + windowsrear = MatModifiedPiecewiseLinearPlasticity( + mass_density=2.425e-09, + young_modulus=7.000e04, + poisson_ratio=0.22, + yield_stress=30, + tangent_modulus=1400, + plastic_strain_to_failure=0.015, + integration_points_number=1, + ) + plastic300 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=300, tangent_modulus=5000 + ) + plastic250 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=250, tangent_modulus=5000 + ) + plastic360 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=360, tangent_modulus=5000 + ) + plastic180 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=180, tangent_modulus=5000 + ) + plastic450 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=450, tangent_modulus=5000 + ) + plastic1300 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=1300, tangent_modulus=5000 + ) + plastic400 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=400, tangent_modulus=5000 + ) + plastic500 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=500, tangent_modulus=5000 + ) + plastic675 = MatPiecewiseLinearPlasticity( + mass_density=7.850e-09, young_modulus=210000, yield_stress=675, tangent_modulus=5000 + ) + plastic310 = MatPiecewiseLinearPlasticity( + mass_density=2.255e-09, young_modulus=70000, yield_stress=310, tangent_modulus=5000 + ) + plastic220 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=5000 + ) + plastic220_410 = MatPiecewiseLinearPlasticity( + mass_density=7.890e-09, young_modulus=210000, yield_stress=220, tangent_modulus=410 + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 204-214 + +Assign section and material properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Once all materials are explicitly defined, these material IDs must be cross-referenced +in the *PART* card. You use the ``set_material()`` method for this. Because many parts +share common materials, the assignment happens within a loop. Within the loop, the +``set_element_formulation()`` method is called to assign the elform for the beam and +shell elements. Accordingly, either the beam diameter or the shell thickness is also +defined. To identify the part ID that has a particular material type, a predefined +list is made available in the ``camry_rc_data.py`` file, which is read in this script. + + +.. GENERATED FROM PYTHON SOURCE LINES 214-266 + +.. code-block:: default + + for bpart in beamparts: + part = BeamPart(bpart[0]) + if part.id in [50000002]: + part.set_material(spotweldharden2200) + else: + part.set_material(spotweldharden2100) + part.set_element_formulation(bpart[1]) + part.set_diameter(bpart[2]) + camry.parts.add(part) + + for spart in shellparts: + part = ShellPart(spart[0]) + if part.id in [1463, 1464]: + part.set_material(matnull) + elif part.id in [417, 419, 530, 532, 585, 586, 587, 588]: + part.set_material(matrigid) + elif part.id in [50000001]: + part.set_material(matplaten) + elif part.id in [290]: + part.set_material(windowshield) + elif part.id in [291]: + part.set_material(windowsrear) + elif part.id in partswithmat300: + part.set_material(plastic300) + elif part.id in partswithmat250: + part.set_material(plastic250) + elif part.id in partswithmat360: + part.set_material(plastic360) + elif part.id in partswithmat180: + part.set_material(plastic180) + elif part.id in partswithmat450: + part.set_material(plastic450) + elif part.id in partswithmat400: + part.set_material(plastic400) + elif part.id in partswithmat500: + part.set_material(plastic500) + elif part.id in [57]: + part.set_material(plastic1300) + elif part.id in [286]: + part.set_material(plastic675) + elif part.id in [5000000]: + part.set_material(plastic310) + elif part.id in [5000006]: + part.set_material(plastic220) + elif part.id in [5000007]: + part.set_material(plastic220_410) + else: + pass + part.set_element_formulation(spart[1]) + part.set_thickness(spart[2]) + camry.parts.add(part) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 267-273 + +Generate keywords for spotwelds and nodal rigid bodies +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The ``camry_rc_data.py`` contains the predefined node pairs and node sets +required for the *CONSTRAINED_SPOTWELD* and *CONSTRAINED_NODAL_RIGID_BODY* +definitions. Loop through these lists to generate the appropriate keywords. + + +.. GENERATED FROM PYTHON SOURCE LINES 273-279 + +.. code-block:: default + + for sw in spotweld: + camry.constraints.create_spotweld(nodeid1=sw[0], nodeid2=sw[1]) + + for cnrb in cnrbs: + camry.constraints.create_cnrb(nodeset=NodeSet(cnrb)) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 280-293 + +Define contacts +~~~~~~~~~~~~~~~ +There are three contacts defined in this model: + +- Automatic single surface contact for the BIW self contact +- Surface-to-surface contact between the platen and the BIW +- Tied contact for the spotweld beams + +Use the ``ContactSurface()`` method to set the SSTYPE and MSTYPE. +The ``PartSet()`` method accepts the name of a list and converts it to +*PART_SET_LIST*. Notice how the contact type and category can be used +to create the three different type of contacts for this model. + + +.. GENERATED FROM PYTHON SOURCE LINES 293-322 + +.. code-block:: default + + selfcontact = Contact(type=ContactType.AUTOMATIC) + selfcontact.set_mortar() + selfcontact.set_friction_coefficient(static=0.2) + surf1 = ContactSurface(PartSet(vehicle)) + selfcontact.set_slave_surface(surf1) + camry.contacts.add(selfcontact) + + platebiw = Contact(type=ContactType.AUTOMATIC, category=ContactCategory.SURFACE_TO_SURFACE_CONTACT) + platebiw.set_mortar() + platebiw.set_friction_coefficient(static=0.2, dynamic=0.2) + surf1 = ContactSurface(PartSet(biw)) + surf2 = ContactSurface(PartSet(platen)) + platebiw.set_slave_surface(surf1) + platebiw.set_master_surface(surf2) + camry.contacts.add(platebiw) + + swcontact = Contact( + type=ContactType.TIED, + category=ContactCategory.SHELL_EDGE_TO_SURFACE_CONTACT, + offset=OffsetType.CONSTRAINED_OFFSET, + ) + spotweldbeam = ContactSurface(PartSet(spotweldbeams)) + spotweldbeam.set_contact_thickness(thickness=-0.9) + spotweldsurface = ContactSurface(PartSet(spotweldsurfaces)) + spotweldsurface.set_contact_thickness(thickness=-0.9) + swcontact.set_slave_surface(spotweldbeam) + swcontact.set_master_surface(spotweldsurface) + camry.contacts.add(swcontact) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 323-328 + +Define SPC +~~~~~~~~~~ +You can use the ``boundaryconditions`` class to define both SPCs and +prescribed motions. The bottom of the BIW is SPCed by selecting a few nodes. +The prescribed motion is then assigned to the platen. + +.. GENERATED FROM PYTHON SOURCE LINES 328-345 + +.. code-block:: default + + camry.boundaryconditions.create_spc(NodeSet(spc)) + + crv = Curve( + x=[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9.77, 100], + y=[0, 13, 26, 39, 52, 65, 78, 91, 104, 117, 127, 127], + ) + platen = PartSet([50000001]) + camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.X_TRANSLATIONAL, scalefactor=-0.0802216 + ) + camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.Y_TRANSLATIONAL, scalefactor=-0.0802216 + ) + camry.boundaryconditions.create_imposed_motion( + platen, crv, dof=DOF.Z_TRANSLATIONAL, scalefactor=-0.0802216 + ) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 346-351 + +Define database cards and save input file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define the frequency of output for the binary and ASCII database outputs +and save the input file. + + +.. GENERATED FROM PYTHON SOURCE LINES 351-363 + +.. code-block:: default + + camry_solution.create_database_binary(dt=0.001) + camry_solution.set_output_database( + elout=0.0001, + glstat=0.0001, + matsum=0.0001, + nodout=0.0001, + rbdout=0.0001, + rcforc=0.0001, + secforc=0.0001, + ) + + camry_solution.save_file() + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 22.425 seconds) + + +.. _sphx_glr_download_examples_Implicit_camry_rc.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: camry_rc.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: camry_rc.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/Implicit/index.rst.txt b/version/0.3/_sources/examples/Implicit/index.rst.txt new file mode 100644 index 000000000..7f24b3697 --- /dev/null +++ b/version/0.3/_sources/examples/Implicit/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_Implicit: + +Implicit examples +~~~~~~~~~~~~~~~~~~ + +These examples show how to create and use implicit models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Implicit/images/thumb/sphx_glr_camry_rc_thumb.png + :alt: + + :ref:`sphx_glr_examples_Implicit_camry_rc.py` + +.. raw:: html + +
Implicit model
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/Implicit/camry_rc + diff --git a/version/0.3/_sources/examples/Implicit/sg_execution_times.rst.txt b/version/0.3/_sources/examples/Implicit/sg_execution_times.rst.txt new file mode 100644 index 000000000..4afa69d67 --- /dev/null +++ b/version/0.3/_sources/examples/Implicit/sg_execution_times.rst.txt @@ -0,0 +1,13 @@ + +:orphan: + +.. _sphx_glr_examples_Implicit_sg_execution_times: + + +Computation times +================= +**00:22.425** total execution time for **examples_Implicit** files: + ++-----------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Implicit_camry_rc.py` (``camry_rc.py``) | 00:22.425 | 0.0 MB | ++-----------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/NVH/frf_plate_damping.rst.txt b/version/0.3/_sources/examples/NVH/frf_plate_damping.rst.txt new file mode 100644 index 000000000..63a85d086 --- /dev/null +++ b/version/0.3/_sources/examples/NVH/frf_plate_damping.rst.txt @@ -0,0 +1,325 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/NVH/frf_plate_damping.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_NVH_frf_plate_damping.py: + + +FRF for a rectangular plate +=========================== + +This example shows how to set up the keywords for computation of a FRF (frequency response function). +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 10-14 + +Perform required imports +~~~~~~~~~~~~~~~~~~~~~~~~ +Peform required imports. + + +.. GENERATED FROM PYTHON SOURCE LINES 14-32 + +.. code-block:: default + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamaterial import MatElastic + from ansys.dyna.core.pre.dynanvh import ( + DynaNVH, + FrequencyDomain, + ExcitationDOF, + Curve, + NodeSet, + ShellPart, + ShellFormulation, + ResponseDOF, + ResponseType, + ) + from ansys.dyna.core.pre import examples + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 34-45 + +Manually start the ``pre`` service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Copy the ``pyDyna/src/ansys/dyna/core/pre/Server``folder to a desired location. +Start the ``pre`` service at this location by running this command: + +``python kwserver.py`` + +Once the ``pre`` servic is running, you can connect a client to it using +the hostname and the port. This example uses the default local host and port +(``"localhost"`` and ``"50051"`` respectively). + + +.. GENERATED FROM PYTHON SOURCE LINES 45-49 + +.. code-block:: default + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + solution = DynaSolution(hostname) + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 50-55 + +Import the initial mesh data (nodes and elements) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Import mesh data, which includes the predefined *NODE*, *ELEMENT_* and *PART* +cards. + + +.. GENERATED FROM PYTHON SOURCE LINES 55-60 + +.. code-block:: default + + fns = [] + path = examples.nvh_frf_plate_damping + os.sep + fns.append(path + "frf_plate_damping.k") + solution.open_files(fns) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ret: true + + + + +.. GENERATED FROM PYTHON SOURCE LINES 61-64 + +Define global control cards +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define the global control cards. + +.. GENERATED FROM PYTHON SOURCE LINES 64-67 + +.. code-block:: default + + + nvhobj = DynaNVH() + solution.add(nvhobj) + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 68-72 + +Set initial timestep size +~~~~~~~~~~~~~~~~~~~~~~~~~ +Set the initial timestep size in CONTROL_IMPLICIT_GENERAL. + + +.. GENERATED FROM PYTHON SOURCE LINES 72-74 + +.. code-block:: default + + nvhobj.implicitanalysis.set_initial_timestep_size(1.0) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 75-79 + +Set number of eigen modes +~~~~~~~~~~~~~~~~~~~~~~~~~ +Set the number of eigen modes to ``100``. + + +.. GENERATED FROM PYTHON SOURCE LINES 79-81 + +.. code-block:: default + + nvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 82-85 + +Define linear solver +~~~~~~~~~~~~~~~~~~~~ +Define the linear solver by setting NSOLVR to ``1`` in CONTROL_IMPLICIT_SOLUTION. + +.. GENERATED FROM PYTHON SOURCE LINES 85-87 + +.. code-block:: default + + nvhobj.implicitanalysis.set_solution(solution_method=1) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 88-94 + +Define frequency domain cards +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +*FREQUENCY_DOMAIN_FRF* is used to compute the frequency response function due to +nodal excitations. In this case, a base velocity is define as an input at node 131. +The base acceleration response is measured at nodes 131 and 651. The maximum +natural frequency employed in FRF is limited to 2000 Hz. + +.. GENERATED FROM PYTHON SOURCE LINES 94-114 + +.. code-block:: default + + fd = FrequencyDomain() + crv = Curve( + x=[1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 200], + y=[0, 0, 0.0045, 0.00713, 0.00386, 0.00328, 0.0034, 0.00624, 7.2e-4, 8.3e-4, 0, 0], + ) + fd.set_frequency_response_function( + excitation_input_set=NodeSet([131]), + excitation_input_dof=ExcitationDOF.Z, + max_natural_frequency=2000, + modal_damping_coefficient_curve_type=1, + modal_damping_coefficient_curve=crv, + response_output_set=NodeSet([131, 651]), + response_output_dof=ResponseDOF.Z, + response_output_type=ResponseType.BASE_ACCELERATION, + frf_output_min_frequency=1, + frf_output_max_frequency=400, + frf_output_num_frequency=400, + ) + nvhobj.add(fd) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 115-119 + +Define material and section properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define the ``MAT_ELASTIC`` material. Set shell formulation to ``SR_HUGHES_LIU. + + +.. GENERATED FROM PYTHON SOURCE LINES 119-127 + +.. code-block:: default + + matelastic = MatElastic(mass_density=7870, young_modulus=2.07e11, poisson_ratio=0.292) + + boxshell = ShellPart(1) + boxshell.set_material(matelastic) + boxshell.set_element_formulation(ShellFormulation.SR_HUGHES_LIU) + boxshell.set_thickness(0.002) + boxshell.set_shear_factor(0.833) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 128-133 + +Set printout property and save input deck +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Use the ``set_printout()`` method to set the printout property to ``3``. +Save the input deck. + + +.. GENERATED FROM PYTHON SOURCE LINES 133-137 + +.. code-block:: default + + boxshell.set_printout(3) + nvhobj.parts.add(boxshell) + + solution.save_file() + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.048 seconds) + + +.. _sphx_glr_download_examples_NVH_frf_plate_damping.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: frf_plate_damping.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: frf_plate_damping.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/NVH/index.rst.txt b/version/0.3/_sources/examples/NVH/index.rst.txt new file mode 100644 index 000000000..7ac6bbb4e --- /dev/null +++ b/version/0.3/_sources/examples/NVH/index.rst.txt @@ -0,0 +1,61 @@ + + +.. _sphx_glr_examples_NVH: + +NVH examples +~~~~~~~~~~~~~ + +These examples show how to create and use NVH (noise, vibration, and harshness) models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/NVH/images/thumb/sphx_glr_frf_plate_damping_thumb.png + :alt: + + :ref:`sphx_glr_examples_NVH_frf_plate_damping.py` + +.. raw:: html + +
FRF for a rectangular plate
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/NVH/images/thumb/sphx_glr_nvh_frf_solid_thumb.png + :alt: + + :ref:`sphx_glr_examples_NVH_nvh_frf_solid.py` + +.. raw:: html + +
FRF for a colume model with a hole
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/NVH/frf_plate_damping + /examples/NVH/nvh_frf_solid + diff --git a/version/0.3/_sources/examples/NVH/nvh_frf_solid.rst.txt b/version/0.3/_sources/examples/NVH/nvh_frf_solid.rst.txt new file mode 100644 index 000000000..1cc34fdf3 --- /dev/null +++ b/version/0.3/_sources/examples/NVH/nvh_frf_solid.rst.txt @@ -0,0 +1,160 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/NVH/nvh_frf_solid.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_NVH_nvh_frf_solid.py: + + +FRF for a colume model with a hole +================================== + +This example shows a column with a hole using solid elements. +The executable file for LS-DYNA is ``ls-dyna_smp_d_R13.1_138-g8429c8a10f_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 9-93 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamaterial import MatPiecewiseLinearPlasticity + from ansys.dyna.core.pre.dynanvh import ( + DynaNVH, + FrequencyDomain, + ExcitationDOF, + NodeSet, + SolidPart, + SolidFormulation, + ResponseDOF, + ResponseType, + EnergyFlag, + OutputEcho, + ExcitationType + ) + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + solution = DynaSolution(hostname) + fns = [] + path = examples.nvh_frf_solid + os.sep + fns.append(path + "frf_solid.k") + solution.open_files(fns) + solution.set_termination(termination_time=1) + + nvhobj = DynaNVH() + solution.add(nvhobj) + + nvhobj.set_energy(hourglass_energy=EnergyFlag.COMPUTED) + nvhobj.set_output(print_suppression_d3hsp=True,print_suppression_echo=OutputEcho.SUPPRESSED_NODAL_AND_ELEMENT_PRINTING) + + nvhobj.implicitanalysis.set_initial_timestep_size(1.0) + nvhobj.implicitanalysis.set_eigenvalue(number_eigenvalues=100) + nvhobj.implicitanalysis.set_solution(solution_method=1) + + fd = FrequencyDomain() + + outputset = [290,292,294,296,298,300,302,304,306,380,382,384,386,388,390,482,484,486,488,490,492,578,580,582,638,640,706,708] + fd.set_frequency_response_function( + excitation_input_dof=ExcitationDOF.X, + excitation_input_type=ExcitationType.BASE_ACCELERATION, + max_natural_frequency=20, + modal_damping_coefficient=0.01, + response_output_set=NodeSet(outputset), + response_output_dof=ResponseDOF.X, + response_output_type=ResponseType.BASE_ACCELERATION, + frf_output_min_frequency=0.01, + frf_output_max_frequency=10, + frf_output_num_frequency=1000, + ) + nvhobj.add(fd) + + plastic1 = MatPiecewiseLinearPlasticity( + mass_density=4.99e-07, young_modulus=11.37,poisson_ratio=0.32, yield_stress=0.0468 + ) + plastic2 = MatPiecewiseLinearPlasticity( + mass_density=4.99e-07, young_modulus=110.37,poisson_ratio=0.32, yield_stress=0.0468 + ) + + lower = SolidPart(4) + lower.set_material(plastic1) + lower.set_element_formulation(SolidFormulation.IMPLICIT_9_POINT_ENHANCED_STRAIN) + nvhobj.parts.add(lower) + + upper = SolidPart(5) + upper.set_material(plastic2) + upper.set_element_formulation(SolidFormulation.IMPLICIT_9_POINT_ENHANCED_STRAIN) + nvhobj.parts.add(upper) + + spc = [163,166,169,172,175,178,181,184,187,307,310,313,316,319,322,391,394,397,400,403,406,493,496,499,589,592,645,648] + nvhobj.boundaryconditions.create_spc(NodeSet(spc)) + + solution.create_database_binary(dt=0.1) + solution.set_output_database( + glstat=0.1, + matsum=0.1, + ) + solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.050 seconds) + + +.. _sphx_glr_download_examples_NVH_nvh_frf_solid.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: nvh_frf_solid.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: nvh_frf_solid.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/NVH/sg_execution_times.rst.txt b/version/0.3/_sources/examples/NVH/sg_execution_times.rst.txt new file mode 100644 index 000000000..3ef0e57e0 --- /dev/null +++ b/version/0.3/_sources/examples/NVH/sg_execution_times.rst.txt @@ -0,0 +1,15 @@ + +:orphan: + +.. _sphx_glr_examples_NVH_sg_execution_times: + + +Computation times +================= +**00:00.098** total execution time for **examples_NVH** files: + ++------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_NVH_nvh_frf_solid.py` (``nvh_frf_solid.py``) | 00:00.050 | 0.0 MB | ++------------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_NVH_frf_plate_damping.py` (``frf_plate_damping.py``) | 00:00.048 | 0.0 MB | ++------------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/SALE/index.rst.txt b/version/0.3/_sources/examples/SALE/index.rst.txt new file mode 100644 index 000000000..c8dbec6c4 --- /dev/null +++ b/version/0.3/_sources/examples/SALE/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_SALE: + +S-ALE examples +~~~~~~~~~~~~~~ + +These examples show how to create and use S-ALE (Structured ALE) models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/SALE/images/thumb/sphx_glr_sale_efp_thumb.png + :alt: + + :ref:`sphx_glr_examples_SALE_sale_efp.py` + +.. raw:: html + +
EFP concrete target
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/SALE/sale_efp + diff --git a/version/0.3/_sources/examples/SALE/sale_efp.rst.txt b/version/0.3/_sources/examples/SALE/sale_efp.rst.txt new file mode 100644 index 000000000..ba3d62348 --- /dev/null +++ b/version/0.3/_sources/examples/SALE/sale_efp.rst.txt @@ -0,0 +1,168 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/SALE/sale_efp.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_SALE_sale_efp.py: + + +EFP concrete target +=================== + +This example shows how to create a S-ALE input deck. +The executable file for LS-DYNA is ``ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 8-100 + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + + +| + +.. code-block:: default + + + import os + import sys + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynasale import ( + DynaSALE, + ControlPoint, + AdvectionMethod, + StructuredMesh, + FillDirection, + Point, + ) + from ansys.dyna.core.pre import dynamaterial as matDB + from ansys.dyna.core.pre import examples + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + + efp_solution = DynaSolution(hostname) + # Import the initial mesh data(nodes and elements) + fns = [] + path = examples.sale_efp + os.sep + fns.append(path + "efpcase.k") + efp_solution.open_files(fns) + + # set termination + efp_solution.set_termination(280) + + efp = DynaSALE() + efp_solution.add(efp) + + # set post result ouput interval + efp.set_output_interval(5.0) + + # set analysis type + efp.set_analysis_type(method=AdvectionMethod.VAN_LEER_WITH_HIS) + + # define mesh + control_points_x = [ + ControlPoint(number=1, position=0, ratio=1), + ControlPoint(number=11, position=-2.5, ratio=0.5), + ControlPoint(number=21, position=0, ratio=0.5), + ControlPoint(number=31, position=0, ratio=1), + ] + + control_points_y = [ + ControlPoint(number=1, position=0, ratio=1), + ControlPoint(number=11, position=-2.5, ratio=0.5), + ControlPoint(number=21, position=0, ratio=0.5), + ControlPoint(number=31, position=0, ratio=1), + ] + + control_points_z = [ + ControlPoint(number=1, position=0, ratio=0.5), + ControlPoint(number=269, position=11, ratio=0.25), + ControlPoint(number=309, position=21, ratio=0.25), + ControlPoint(number=339, position=0, ratio=5), + ] + + mesh = StructuredMesh(control_points_x, control_points_y, control_points_z) + efp.add(mesh) + + # fill material + vacuum = matDB.Vacuum() + mesh.fill(vacuum) + air = matDB.Air() + mesh.fill(air, geometry_type="ALL", reference_pressure=1.01325e-6) + he = matDB.HighExplosive() + mesh.fill( + he, + geometry_type="PART", + define_geometry_parameters=[23], + inout=FillDirection.OUTSIDE_THE_GEOMETRY, + ) + liner = matDB.Liner() + mesh.fill( + liner, + geometry_type="PART", + define_geometry_parameters=[22], + inout=FillDirection.OUTSIDE_THE_GEOMETRY, + ) + + # Set the initial conditions + mesh.initial_detonation(Point(0, 0, 19.33)) + + # set outut datebase + efp_solution.set_output_database(matsum=0.2, glstat=0.2) + + # save file on server end + efp_solution.save_file() + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.336 seconds) + + +.. _sphx_glr_download_examples_SALE_sale_efp.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: sale_efp.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: sale_efp.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/SALE/sg_execution_times.rst.txt b/version/0.3/_sources/examples/SALE/sg_execution_times.rst.txt new file mode 100644 index 000000000..591d68c06 --- /dev/null +++ b/version/0.3/_sources/examples/SALE/sg_execution_times.rst.txt @@ -0,0 +1,13 @@ + +:orphan: + +.. _sphx_glr_examples_SALE_sg_execution_times: + + +Computation times +================= +**00:00.336** total execution time for **examples_SALE** files: + ++-------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_SALE_sale_efp.py` (``sale_efp.py``) | 00:00.336 | 0.0 MB | ++-------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/Thermal/index.rst.txt b/version/0.3/_sources/examples/Thermal/index.rst.txt new file mode 100644 index 000000000..64392de7d --- /dev/null +++ b/version/0.3/_sources/examples/Thermal/index.rst.txt @@ -0,0 +1,43 @@ + + +.. _sphx_glr_examples_Thermal: + +Thermal examples +~~~~~~~~~~~~~~~~ + +These examples show how to create and use thermal models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Thermal/images/thumb/sphx_glr_thermal_stress_thumb.png + :alt: + + :ref:`sphx_glr_examples_Thermal_thermal_stress.py` + +.. raw:: html + +
Thermal stress example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + + /examples/Thermal/thermal_stress + diff --git a/version/0.3/_sources/examples/Thermal/sg_execution_times.rst.txt b/version/0.3/_sources/examples/Thermal/sg_execution_times.rst.txt new file mode 100644 index 000000000..1ddf6dd59 --- /dev/null +++ b/version/0.3/_sources/examples/Thermal/sg_execution_times.rst.txt @@ -0,0 +1,13 @@ + +:orphan: + +.. _sphx_glr_examples_Thermal_sg_execution_times: + + +Computation times +================= +**00:00.068** total execution time for **examples_Thermal** files: + ++----------------------------------------------------------------------------+-----------+--------+ +| :ref:`sphx_glr_examples_Thermal_thermal_stress.py` (``thermal_stress.py``) | 00:00.068 | 0.0 MB | ++----------------------------------------------------------------------------+-----------+--------+ diff --git a/version/0.3/_sources/examples/Thermal/thermal_stress.rst.txt b/version/0.3/_sources/examples/Thermal/thermal_stress.rst.txt new file mode 100644 index 000000000..6155619c3 --- /dev/null +++ b/version/0.3/_sources/examples/Thermal/thermal_stress.rst.txt @@ -0,0 +1,280 @@ + +.. DO NOT EDIT. +.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. +.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: +.. "examples/Thermal/thermal_stress.py" +.. LINE NUMBERS ARE GIVEN BELOW. + +.. only:: html + + .. note:: + :class: sphx-glr-download-link-note + + :ref:`Go to the end ` + to download the full example code + +.. rst-class:: sphx-glr-example-title + +.. _sphx_glr_examples_Thermal_thermal_stress.py: + + +Thermal stress example +====================== + +This example shows how to create a thermal stress model with the PyDYNA ``pre`` service. +The executable file for LS-DYNA is ``ls-dyna_smp_s_R13.0_365-gf8a97bda2a_winx64_ifort190.exe``. + +.. GENERATED FROM PYTHON SOURCE LINES 10-14 + +Perform required imports +~~~~~~~~~~~~~~~~~~~~~~~~ +Peform required imports. + + +.. GENERATED FROM PYTHON SOURCE LINES 14-30 + +.. code-block:: default + + import os + import sys + + + from ansys.dyna.core.pre.dynasolution import DynaSolution + from ansys.dyna.core.pre.dynamech import ( + DynaMech, + ThermalAnalysis, + ThermalAnalysisType, + SolidPart, + SolidFormulation, + NodeSet, + AnalysisType + ) + from ansys.dyna.core.pre.dynamaterial import MatElasticPlasticThermal + from ansys.dyna.core.pre import examples + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 32-43 + +Manually start the ``pre`` service +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Copy the ``pyDyna/src/ansys/dyna/core/pre/Server``folder to a desired location. +Start the ``pre`` service at this location by running this command: + +``python kwserver.py`` + +Once the ``pre`` servic is running, you can connect a client to it using +the hostname and the port. This example uses the default local host and port +(``"localhost"`` and ``"50051"`` respectively). + + +.. GENERATED FROM PYTHON SOURCE LINES 43-48 + +.. code-block:: default + + hostname = "localhost" + if len(sys.argv) > 1: + hostname = sys.argv[1] + solution = DynaSolution(hostname) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 49-53 + +Start the solution workflow +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +NODES and ELEMENTS are read in from the ``thermal_stress.k`` file. This file also has the +*PART* defined in it, but the section and material fields are empty to begin with. + +.. GENERATED FROM PYTHON SOURCE LINES 53-58 + +.. code-block:: default + + fns = [] + path = examples.thermal_stress + os.sep + fns.append(path + "thermal_stress.k") + solution.open_files(fns) + + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + ret: true + + + + +.. GENERATED FROM PYTHON SOURCE LINES 59-63 + +Set simulation termination time +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Set the simulation termination time. + + +.. GENERATED FROM PYTHON SOURCE LINES 63-65 + +.. code-block:: default + + solution.set_termination(3.0) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 66-69 + +To invoke the transient thermal solver, set the thermal analysis type for +``CONTROL_SOLUTION`` to 2 by ``ThermalAnalysisType.TRANSIENT``. + + +.. GENERATED FROM PYTHON SOURCE LINES 69-79 + +.. code-block:: default + + ts = DynaMech(analysis=AnalysisType.EXPLICIT) + solution.add(ts) + + tanalysis = ThermalAnalysis() + tanalysis.set_timestep(initial_timestep=0.1) + tanalysis.set_solver(analysis_type=ThermalAnalysisType.TRANSIENT) + ts.add(tanalysis) + + ts.set_timestep(timestep_size_for_mass_scaled=0.01) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 80-87 + +Define material and section properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define the ``MAT_4`` material, which can have temperature-dependent +properties. For the ``MAT_THERMAL_ISOTROPIC`` property, which is associated +with the same part, define the specific heat, thermal conductivity, and thermal +generation rate. + + +.. GENERATED FROM PYTHON SOURCE LINES 87-102 + +.. code-block:: default + + mat = MatElasticPlasticThermal( + mass_density=1.0, + temperatures=(0,10,20,30,40,50), + young_modulus=(1e10,1e10,1e10,1e10,1e10,1e10), + poisson_ratio=(0.3,0.3,0.3,0.3,0.3,0.3), + thermal_expansion=(0,2e-6,4e-6,6e-6,8e-6,1e-5), + yield_stress = (1e20,1e20,1e20,1e20,1e20,1e20) + ) + mat.set_thermal_isotropic(density=1,generation_rate_multiplier=10,specific_heat=1,conductivity=1) + + slab = SolidPart(1) + slab.set_material(mat) + slab.set_element_formulation(SolidFormulation.CONSTANT_STRESS_SOLID_ELEMENT) + ts.parts.add(slab) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 103-107 + +Set initial conditions +~~~~~~~~~~~~~~~~~~~~~~~ +Initialize nodes 1 through 8 with a temperature of 10 degrees. + + +.. GENERATED FROM PYTHON SOURCE LINES 107-110 + +.. code-block:: default + + for i in range(1,9): + ts.initialconditions.create_temperature(NodeSet([i]),temperature=10) + + + + + + + + +.. GENERATED FROM PYTHON SOURCE LINES 111-115 + +Define output frequencies and save input file +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define output frequencies and save the input file to disk. + + +.. GENERATED FROM PYTHON SOURCE LINES 115-118 + +.. code-block:: default + + solution.set_output_database(glstat=0.03) + solution.create_database_binary(dt=0.01) + solution.save_file() + + + + +.. rst-class:: sphx-glr-script-out + + .. code-block:: none + + + '/server/output' + + + + +.. rst-class:: sphx-glr-timing + + **Total running time of the script:** ( 0 minutes 0.068 seconds) + + +.. _sphx_glr_download_examples_Thermal_thermal_stress.py: + +.. only:: html + + .. container:: sphx-glr-footer sphx-glr-footer-example + + + + + .. container:: sphx-glr-download sphx-glr-download-python + + :download:`Download Python source code: thermal_stress.py ` + + .. container:: sphx-glr-download sphx-glr-download-jupyter + + :download:`Download Jupyter notebook: thermal_stress.ipynb ` + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/examples/index.rst.txt b/version/0.3/_sources/examples/index.rst.txt new file mode 100644 index 000000000..4831ae680 --- /dev/null +++ b/version/0.3/_sources/examples/index.rst.txt @@ -0,0 +1,717 @@ +:orphan: + +.. _ref_examples: + +======== +Examples +======== + + +Here are a series of examples using LS-DYNA with PyDYNA. + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +Airbag examples +~~~~~~~~~~~~~~~~ + +These examples show how to create and use airbag models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Airbag/images/thumb/sphx_glr_airbag_deploy_thumb.png + :alt: + + :ref:`sphx_glr_examples_Airbag_airbag_deploy.py` + +.. raw:: html + +
Airbag deploy
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Airbag/images/thumb/sphx_glr_airbag_post_thumb.png + :alt: + + :ref:`sphx_glr_examples_Airbag_airbag_post.py` + +.. raw:: html + +
Airbag deploy postprocessing
+
+ + +.. raw:: html + +
+ +EM examples +~~~~~~~~~~~~ + +These examples show how to create and use electromagnetic models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_resistive_heating_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_resistive_heating.py` + +.. raw:: html + +
Resistive heating
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_resistive_heating_2d_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_resistive_heating_2d.py` + +.. raw:: html + +
Resistive heating 2D
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_resistive_heating_2d_isopots_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_resistive_heating_2d_isopots.py` + +.. raw:: html + +
Resistive heating 2D connect isopotential
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_resistive_heating_2d_multi_isopots_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_resistive_heating_2d_multi_isopots.py` + +.. raw:: html + +
Resistive heating 2D multiple connect isopotential
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_rlc_define_func_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_rlc_define_func.py` + +.. raw:: html + +
RLC circuit by function
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/EM/images/thumb/sphx_glr_em_rlc_isopotential_thumb.png + :alt: + + :ref:`sphx_glr_examples_EM_em_rlc_isopotential.py` + +.. raw:: html + +
RLC circuit by isopotential
+
+ + +.. raw:: html + +
+ +Explicit examples +~~~~~~~~~~~~~~~~~ + +These examples show how to create and use explicit models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Explicit/images/thumb/sphx_glr_ball_plate_thumb.png + :alt: + + :ref:`sphx_glr_examples_Explicit_ball_plate.py` + +.. raw:: html + +
Ball Plate
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Explicit/images/thumb/sphx_glr_belted_dummy_thumb.png + :alt: + + :ref:`sphx_glr_examples_Explicit_belted_dummy.py` + +.. raw:: html + +
Belted dummy
+
+ + +.. raw:: html + +
+ +ICFD examples +~~~~~~~~~~~~~~ + +These examples show how to create and use ICFD +incompressible computational fluid dynamics) models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_cylinderflow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_cylinderflow.py` + +.. raw:: html + +
Cylinder flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_dam_break_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_dam_break.py` + +.. raw:: html + +
Dam break
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_dem_coupling_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_dem_coupling.py` + +.. raw:: html + +
DEM coupling
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_driven_cavity_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_driven_cavity.py` + +.. raw:: html + +
Driven cavity
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_free_convection_flow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_free_convection_flow.py` + +.. raw:: html + +
Thermal flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_imposed_move_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_imposed_move.py` + +.. raw:: html + +
Imposed move
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_internal_3d_flow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_internal_3d_flow.py` + +.. raw:: html + +
Internal 3D flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_adaptivity_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_adaptivity.py` + +.. raw:: html + +
Mesh adaptivity
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_morphing_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_morphing.py` + +.. raw:: html + +
Mesh morphing
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_mesh_size_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_mesh_size.py` + +.. raw:: html + +
Mesh size
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_plate_flow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_plate_flow.py` + +.. raw:: html + +
Plate flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_sloshing_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_sloshing.py` + +.. raw:: html + +
Sloshing
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_strong_fsi_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_strong_fsi.py` + +.. raw:: html + +
Strong FSI
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_thermal_flow_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_thermal_flow.py` + +.. raw:: html + +
Thermal flow
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ICFD/images/thumb/sphx_glr_icfd_weak_fsi_thumb.png + :alt: + + :ref:`sphx_glr_examples_ICFD_icfd_weak_fsi.py` + +.. raw:: html + +
Weak FSI
+
+ + +.. raw:: html + +
+ +ISPH examples +~~~~~~~~~~~~~ + +These examples show how to create and use ISPH (incompressible +smooth particle hydrodynamics) models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/ISPH/images/thumb/sphx_glr_rigidtest_thumb.png + :alt: + + :ref:`sphx_glr_examples_ISPH_rigidtest.py` + +.. raw:: html + +
Rigid test
+
+ + +.. raw:: html + +
+ +Implicit examples +~~~~~~~~~~~~~~~~~~ + +These examples show how to create and use implicit models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Implicit/images/thumb/sphx_glr_camry_rc_thumb.png + :alt: + + :ref:`sphx_glr_examples_Implicit_camry_rc.py` + +.. raw:: html + +
Implicit model
+
+ + +.. raw:: html + +
+ +NVH examples +~~~~~~~~~~~~~ + +These examples show how to create and use NVH (noise, vibration, and harshness) models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/NVH/images/thumb/sphx_glr_frf_plate_damping_thumb.png + :alt: + + :ref:`sphx_glr_examples_NVH_frf_plate_damping.py` + +.. raw:: html + +
FRF for a rectangular plate
+
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/NVH/images/thumb/sphx_glr_nvh_frf_solid_thumb.png + :alt: + + :ref:`sphx_glr_examples_NVH_nvh_frf_solid.py` + +.. raw:: html + +
FRF for a colume model with a hole
+
+ + +.. raw:: html + +
+ +S-ALE examples +~~~~~~~~~~~~~~ + +These examples show how to create and use S-ALE (Structured ALE) models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/SALE/images/thumb/sphx_glr_sale_efp_thumb.png + :alt: + + :ref:`sphx_glr_examples_SALE_sale_efp.py` + +.. raw:: html + +
EFP concrete target
+
+ + +.. raw:: html + +
+ +Thermal examples +~~~~~~~~~~~~~~~~ + +These examples show how to create and use thermal models. + + + +.. raw:: html + +
+ + +.. raw:: html + +
+ +.. only:: html + + .. image:: /examples/Thermal/images/thumb/sphx_glr_thermal_stress_thumb.png + :alt: + + :ref:`sphx_glr_examples_Thermal_thermal_stress.py` + +.. raw:: html + +
Thermal stress example
+
+ + +.. raw:: html + +
+ + +.. toctree:: + :hidden: + :includehidden: + + + /examples/Airbag/index.rst + /examples/EM/index.rst + /examples/Explicit/index.rst + /examples/ICFD/index.rst + /examples/ISPH/index.rst + /examples/Implicit/index.rst + /examples/NVH/index.rst + /examples/SALE/index.rst + /examples/Thermal/index.rst + + + +.. only:: html + + .. rst-class:: sphx-glr-signature + + `Gallery generated by Sphinx-Gallery `_ diff --git a/version/0.3/_sources/getting-started/index.rst.txt b/version/0.3/_sources/getting-started/index.rst.txt new file mode 100644 index 000000000..ef97fe4e0 --- /dev/null +++ b/version/0.3/_sources/getting-started/index.rst.txt @@ -0,0 +1,121 @@ +Getting started +=============== +To run PyDYNA, you must have an installation of Ansys LS-DYNA. +PyDYNA supports LS-DYNA 2023 R2 and later. + +For information on getting a licensed copy of LS-DYNA, see +the `Ansys LS-DYNA `_ +page on the Ansys website. + +Installation +============ +To use PyDYNA, you must install Docker images for the ``pre`` and ``solver`` +services and the package. + +Install Docker image for the ``pre`` service +-------------------------------------------- +To launch the ``pre`` service locally, you must have Docker installed +on your machine. + +.. caution:: + + The ``pre`` service is available only as a Linux Docker image. + Make sure that your Docker engine is configured to run Linux Docker images. + +For information on installing the Docker container for the ``pre`` service, +see the ``README.rst`` file in the repository's ``docker/pre`` directory. + +Install Docker image for the ``solver`` service +----------------------------------------------- +For information on installing the Docker container for the ``solver`` service, +see the ``README.rst`` file in the repository's ``docker/solver`` directory. + +Install the package +------------------- +The ``ansys.dyna.core`` package supports Python 3.8 through +Python 3.11 on Windows, Linux, and MacOS. + +You should consider installing PyDYNA in a virtual environment. +For more information, see Python's +`venv -- Creation of virtual environments `_. + +PyDYNA has three installation modes: user, developer, and offline. + +Install in user mode +~~~~~~~~~~~~~~~~~~~~ + +Before installing PyDYNA in user mode, make sure you have the latest version of +`pip`_ with this command: + +.. code:: bash + + python -m pip install -U pip + +Then, install PyDYNA with this command: + +.. code:: bash + + python -m pip install ansys-dyna-core + +.. caution:: + + PyDYNA is currently hosted in a private PyPI repository. You must provide the index + URL to the private PyPI repository: ``https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/``. + + If access to this package registry is needed, email `pyansys.core@ansys.com `_ + to request access. The PyAnsys team can provide you with a read-only token. + + Once you have the token, run this command, replacing ``${PRIVATE_PYPI_ACCESS_TOKEN}`` with the + read-only token: + + .. code:: bash + + pip install ansys-dyna-core --index-url=https://${PRIVATE_PYPI_ACCESS_TOKEN}@pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/simple/ + +Install in developer mode +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Installing PyDYNA in developer mode allows you to modify the source and enhance it. + +.. note:: + + Before contributing to the project, ensure that you are thoroughly familiar + with the `PyAnsys Developer's Guide`_. + +Start by cloning and installing the repository with these commands: + +.. code:: + + git clone https://github.com/pyansys/pyDyna + cd pyDyna + pip install -e . + +Install in offline mode +~~~~~~~~~~~~~~~~~~~~~~~ + +If you lack an internet connection on your installation machine (or you do not have access +to the private Ansys PyPI packages repository), you should install PyDYNA by downloading +the wheelhouse archive for your corresponding machine architecture from the +`Releases Page `_. + +Each wheelhouse archive contains all the Python wheels necessary to install +PyDYNA from scratch on Windows and Linux for Python 3.8 through 3.11. You can install +PyDYNA on an isolated system with a fresh Python installation or on a virtual environment. + +For example, on Linux with Python 3.8, unzip the wheelhouse archive and install PyDYNA +with these commands: + +.. code:: bash + + unzip ansys-dyna-core-v0.3.5-wheelhouse-Linux-3.8.zip -d wheelhouse + pip install ansys-dyna-core -f wheelhouse --no-index --upgrade --ignore-installed + +If you're on Windows with Python 3.8, unzip the wheelhouse archive to a ``wheelhouse`` +directory and install PyDYNA using the preceding command. + + +.. LINKS +.. _pydyna_pypi: https://pypi.org/projects/ansys-dyna-core/ +.. _pydyna_repo: https://github.com/ansys/pydyna/ +.. _pydyna_releases: https://github.com/ansys/pydyna/releases +.. _pydyna_issues: https://github.com/ansys/pydyna/issues diff --git a/version/0.3/_sources/index.rst.txt b/version/0.3/_sources/index.rst.txt new file mode 100644 index 000000000..0d3dfc593 --- /dev/null +++ b/version/0.3/_sources/index.rst.txt @@ -0,0 +1,21 @@ +PyDYNA documentation |version| +=============================== + +.. include:: ../../README.rst +.. include:: ../../docker/pre/README.rst +.. include:: ../../docker/solver/README.rst + +.. jinja:: main_toctree + + .. toctree:: + :hidden: + + getting-started/index + user-guide/index + {% if build_api %} + autoapi/index + {% endif %} + {% if build_examples %} + examples/index + {% endif %} + contributing diff --git a/version/0.3/_sources/user-guide/index.rst.txt b/version/0.3/_sources/user-guide/index.rst.txt new file mode 100644 index 000000000..f6dcd218a --- /dev/null +++ b/version/0.3/_sources/user-guide/index.rst.txt @@ -0,0 +1,30 @@ +User guide +---------- + +In the PyDYNA installation, the ``docker`` directory has two child +directories: + +- ``pre``: Provides the interface for creating DYNA input decks. + This service includes highly abstracted APIs for setting up + LSN-DYNA input decks. Included are DynaMech, DynaIGA, DynaICFD, + DynaSALE, DynaEM, and DynaAirbag. +- ``solver``: Contains the code for interfacing directly with + the Ansys LS-DYNA solver. Because LS-DYNA is primarily a batch + solver with very limited interactive capabilities, the code in + this directory is similarly limited. The target use case is that + LS-DYNA is running in a container environment such as Docker or + Kubernetes. The code in the ``solver`` directory allows you to push + input files to the container, start LS-DYNA and monitor its progress, + and then retrieve results (RST) files. + +Once you have results, you can use the Ansys Data Processing Framework (DPF), +which is designed to provide numerical simulation users and engineers +with a toolbox for accessing and transforming simulation data. DPF +can access data from Ansys solver result files and from several +files with neutral formats, including CSV, HDF5, and VTK. Using DPF's +various operators, you can manipulate and transform this data. + +The `ansys-dpf-post package `_ provides +a simplified Python interface to DPF, thus enabling rapid postprocessing +without ever leaving a Python environment. For more information on DPF-Post, +see the `DPF-Post documentation `_. diff --git a/version/0.3/_static/404.rst b/version/0.3/_static/404.rst new file mode 100644 index 000000000..c55991984 --- /dev/null +++ b/version/0.3/_static/404.rst @@ -0,0 +1,6 @@ +Oops! +===== + +This is unexpected. The page you are requesting does not exist. + +If this page should exist, please contact `{{ theme_contact_mail }} <{{ theme_contact_mail }}>`_. \ No newline at end of file diff --git a/version/0.3/_static/README.md b/version/0.3/_static/README.md new file mode 100644 index 000000000..d2c955ccc --- /dev/null +++ b/version/0.3/_static/README.md @@ -0,0 +1 @@ +Static files are found here (like images and other assets). diff --git a/version/0.3/_static/ansys-favicon.png b/version/0.3/_static/ansys-favicon.png new file mode 100644 index 000000000..cfb2e5356 Binary files /dev/null and b/version/0.3/_static/ansys-favicon.png differ diff --git a/version/0.3/_static/ansys_logo_black.jpg b/version/0.3/_static/ansys_logo_black.jpg new file mode 100644 index 000000000..7f7373351 Binary files /dev/null and b/version/0.3/_static/ansys_logo_black.jpg differ diff --git a/version/0.3/_static/ansys_logo_black_cropped.jpg b/version/0.3/_static/ansys_logo_black_cropped.jpg new file mode 100644 index 000000000..05d98e6ca Binary files /dev/null and b/version/0.3/_static/ansys_logo_black_cropped.jpg differ diff --git a/version/0.3/_static/ansys_logo_white.pdf b/version/0.3/_static/ansys_logo_white.pdf new file mode 100644 index 000000000..fceb89b30 Binary files /dev/null and b/version/0.3/_static/ansys_logo_white.pdf differ diff --git a/version/0.3/_static/ansys_logo_white_cropped.pdf b/version/0.3/_static/ansys_logo_white_cropped.pdf new file mode 100644 index 000000000..ad122b159 Binary files /dev/null and b/version/0.3/_static/ansys_logo_white_cropped.pdf differ diff --git a/version/0.3/_static/basic.css b/version/0.3/_static/basic.css new file mode 100644 index 000000000..b97662dd8 --- /dev/null +++ b/version/0.3/_static/basic.css @@ -0,0 +1,921 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 270px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/version/0.3/_static/binder_badge_logo.svg b/version/0.3/_static/binder_badge_logo.svg new file mode 100644 index 000000000..327f6b639 --- /dev/null +++ b/version/0.3/_static/binder_badge_logo.svg @@ -0,0 +1 @@ + launchlaunchbinderbinder \ No newline at end of file diff --git a/version/0.3/_static/broken_example.png b/version/0.3/_static/broken_example.png new file mode 100644 index 000000000..4fea24e7d Binary files /dev/null and b/version/0.3/_static/broken_example.png differ diff --git a/version/0.3/_static/css/ansys_sphinx_theme.css b/version/0.3/_static/css/ansys_sphinx_theme.css new file mode 100644 index 000000000..ec40368d3 --- /dev/null +++ b/version/0.3/_static/css/ansys_sphinx_theme.css @@ -0,0 +1,1039 @@ +/* Provided by the Sphinx base theme template at build time */ + +@import "../basic.css"; +@import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=Open+Sans:ital,wght@0,400;0,600;1,400;1,600&display=swap"); +@import "../sg_gallery.css"; +@import "../design-style.4045f2051d55cab465a707391d5b2007.min.css"; +@import "../styles/pydata-sphinx-theme.css"; + +@font-face { + font-family: "Source Sans Pro Light"; + src: url(../fonts/SourceSansPro-Light.ttf); +} + +@font-face { + font-family: "Source Sans Pro"; + src: url(../fonts/SourceSansPro-Regular.ttf); +} + +:root { + /* Ansys specific changes to the theme */ + + /***************************************************************************** + * Ansys Font family + **/ + /* These are adapted from https://systemfontstack.com/ */ + --pst-font-family-base-system: -apple-system, BlinkMacSystemFont, Segoe UI, + "Helvetica Neue", Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, + Segoe UI Symbol; + --pst-font-family-monospace-system: "SFMono-Regular", Menlo, Consolas, Monaco, + Liberation Mono, Lucida Console, monospace; + + --pst-font-family-base: "Source Sans Pro", sans-serif, + var(--pst-font-family-base-system); + --pst-font-family-heading: "Source Sans Pro", sans-serif, + var(--pst-font-family-base-system); + --pst-font-family-monospace: monospace, Courier, + var(--pst-font-family-monospace-system); + + /***************************************************************************** + * Ansys compatible colors + * + * Colors are defined in rgb string way, "red, green, blue" + **/ + --ansysGold: rgb(255, 183, 27); /* #FFB71B */ + --ansysBronze: rgb(200, 146, 17); /* #C89211 */ + --pythonBlue: rgb(57, 114, 161); /* #3972a1 */ + + --pst-color-active-navigation: var(--ansysBronze); /* --ansysBronze */ + --pst-color-navbar-link: rgb(255, 255, 255); + --pst-color-navbar-link-hover: var(--ansysBronze); /* --ansysBronze */ + --pst-color-navbar-link-active: var(--ansysGold); /* --ansysBronze */ + --pst-font-size-h1: 48px; + --pst-font-size-h2: 36px; + --pst-font-size-h3: 28px; + --pst-font-size-h4: 20px; + --pst-font-size-h5: 14px; + --pst-font-size-h6: 11px; +} + +html[data-theme="light"] { + /***************************************************************************** + * main colors + */ + --pst-color-primary: #fff; + --pst-color-secondary: rgb(200, 146, 17); + --pst-color-success: rgb(40, 167, 69); + --pst-color-text-base: rgb(0, 0, 0); + --pst-color-text-muted: rgb(26, 24, 24); + --pst-color-border: #c9c9c9; + --pst-color-shadow: rgb(216, 216, 216); + --pst-color-info: var(--pst-color-link); + + /***************************************************************************** + * depth colors + */ + --pst-color-on-background: rgb(0, 0, 0); + --pst-color-on-surface: #f2f2f2; + + /***************************************************************************** + * extensions + */ + + --pst-color-panel-background: var(--pst-color-on-background); + + /***************************************************************************** + * layout + */ + + --pst-color-link: #1e6ddc; + --pst-color-link-hover: #32cfea; + --pst-color-inline-code: #000; + --pst-color-target: rgb(255, 255, 255); + + /***************************************************************************** + * color for sphinx-gallery-code output + */ + --pst-color-codecell: #fafae2; + --pst-color-codeout: var(--pst-color-inline-code); + --pst-color-sig: #0965c8; + --pst-color-code-s1: #b35000; + --pst-color-code-c1: #095d0a; + /***************************************************************************** + * sphinx design primary color + */ + --sd-color-primary: var(--pst-color-text-base); + + /***************************************************************************** + * table hovering + */ + --pst-color-table-hover: var(--pst-color-border); + + /***************************************************************************** + * search hide match + */ + --pst-color-search-match: #91969b; +} + +html[data-theme="dark"] { + /***************************************************************************** + * main colors + */ + --pst-color-primary: #d09735; + --pst-color-secondary: #c58e30; + --pst-color-success: rgb(72, 135, 87); + --pst-color-text-base: rgb(201, 209, 217); + --pst-color-text-muted: rgb(192, 192, 192); + --pst-color-border: rgb(192, 192, 192); + --pst-color-shadow: rgb(104, 102, 102); + --pst-color-background: rgb(18, 18, 18); + --pst-color-on-background: rgb(0, 0, 0); + --pst-color-surface: rgb(41, 41, 41); + --pst-color-on-surface: rgb(55, 55, 55); + --pst-color-info: var(--pst-color-secondary); + + /***************************************************************************** + * extensions + */ + + --pst-color-panel-background: var(--pst-color-on-background); + + /***************************************************************************** + * layout + */ + + --pst-color-link: #579ce5; + --pst-color-link-hover: #12b2e2; + --pst-color-inline-code: #fff; + --pst-color-target: rgb(71, 39, 0); + + /***************************************************************************** + * color for sphinx-gallery-code output + */ + --pst-color-codecell: #495057; + --pst-color-codeout: #f2f4f6; + --pst-color-sig: #d6ab1e; + --pst-color-code-s1: #d79a60; + --pst-color-code-c1: #8fb842; + + /***************************************************************************** + * table hovering + */ + --pst-color-table-hover: var(--pst-color-target); + + /***************************************************************************** + * search hide match + */ + --pst-color-search-match: var(--pst-color-primary); +} + +/* +################# +body and content +################# +*/ + +body { + font-family: "Open Sans", sans-serif; +} + +h1, +h2 { + color: var(--pst-color-text-base); +} + +/* +########## +Codecell +########## +*/ + +dt:target, +span.highlighted { + background-color: var(--pst-color-codecell) !important; +} + +.docutils { + color: var(--pst-color-inline-code); + font-family: var(--pst-font-family-monospace); + font-weight: 500; + font-size: 87.5%; +} + +code.literal { + padding: 0.1rem 0.25rem; + padding-top: 0.1rem; + padding-right: 0.25rem; + padding-bottom: 0.1rem; + padding-left: 0.25rem; + background-color: var(--pst-color-on-surface); + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; +} + +.xref.std.std-ref { + color: var(--pst-color-inline-code); + font-family: "Inconsolata"; + font-weight: normal; + font-style: italic; + padding: 0.1rem 0.25rem; + padding-top: 0.1rem; + padding-right: 0.25rem; + padding-bottom: 0.1rem; + padding-left: 0.25rem; + font-size: 90%; + background-color: var(--pst-color-on-surface); + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; +} + +.sig { + font-family: "Consolas", "Menlo", "DejaVu Sans Mono", + "Bitstream Vera Sans Mono", monospace; +} + +.sig-name.descname { + color: var(--pst-color-inline-code); +} + +.sig-name { + color: var(--pst-color-sig); +} + +/* Increase empty-space around classes, methods, properties, etc. that are descendants + of other items */ +dl.class dl.py { + margin-top: 2.5em; + margin-bottom: 2.5em; +} + +/* Reduce empty-space around Notes and Examples headings */ +p.rubric { + margin-top: 0.75em; + margin-bottom: 0.75em; +} + +/* +######## +Table +######## +*/ + +table { + width: 100%; + max-width: 100%; + border-spacing: 0; + border-collapse: collapse; + overflow: hidden; + vertical-align: middle; + + /* Disabling scroll bars */ + overflow-y: scroll; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* Internet Explorer 10+ */ +} + +tr { + background-color: var(--pst-color-background); +} + +th { + background-color: rgb(255, 183, 27, 0.55); +} + +tr:nth-child(odd), +tr:nth-child(even) { + background-color: var(--pst-color-background); +} + +.table tr:hover td { + background-color: var(--pst-color-table-hover); +} + +/* +############### +Table-centered +################ +Same as table but with horizontally centered text. + +see examples. +*/ +table.table-centered { + width: 100%; + max-width: 100%; + border-spacing: 0; + border-collapse: collapse; + overflow: hidden; + vertical-align: middle; + text-align: center; + + /* Disabling scroll bars */ + overflow-y: scroll; + scrollbar-width: none; /* Firefox */ + -ms-overflow-style: none; /* Internet Explorer 10+ */ +} + +.table-centered tr { + background-color: var(--pst-color-background); + text-align: center; +} + +.table-centered th { + background-color: rgb(255, 183, 27, 0.55); + text-align: center; +} + +.table-centered tr:nth-child(odd), +.table-centered tr:nth-child(even) { + text-align: center; + background-color: var(--pst-color-background); +} + +.table-centered tr:hover td { + background-color: var(--pst-color-table-hover); + text-align: center; +} + +table.dataframe { + table-layout: auto !important; +} + +/* +################### +longtable-centered +#################### +*/ + +table.longtable-centered { + text-align: center; +} + +.longtable-centered tr { + text-align: center; +} + +.longtable-centered th { + text-align: center; +} + +.longtable-centered tr:nth-child(odd) { + text-align: center; +} + +.longtable-centered tr:nth-child(even) { + text-align: center; +} + +table.longtable-centered tr:hover td { + background-color: var(--pst-color-table-hover); + text-align: center; +} + +/* +######### +DataFrame +######### +*/ + +.dataframe tr { + background-color: var(--pst-color-background); +} + +.dataframe tr:nth-child(odd), +.dataframe tr:nth-child(even) { + background-color: var(--pst-color-background) !important; +} + +.dataframe tr:hover td { + background-color: var(--pst-color-table-hover); +} + +/* +################### +DataFrame-centered +################### +*/ + +.dataframe-centered tr { + background-color: var(--pst-color-background); + text-align: center; +} + +.dataframe-centered tr:nth-child(odd) { + background-color: var(--pst-color-background) !important; + text-align: center; +} + +.dataframe-centered tr:nth-child(even) { + background-color: var(--pst-color-border); + text-align: center; +} + +.dataframe-centered tr:hover td { + background-color: var(--pst-color-border); + text-align: center; +} + +.dataframe thead th { + text-align: center; +} + +/* +############ +data table +############ +*/ + +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + color: var(--pst-color-text-base) !important; +} + +.dataTables_wrapper, +.dataTables_wrapper .dataTables_filter, +.dataTables_wrapper .dataTables_info, +.dataTables_wrapper .dataTables_processing, +.dataTables_wrapper .dataTables_paginate { + color: var(--pst-color-text-base) !important; +} + +table.dataTable tbody th, +table.dataTable tbody td { + background: var(--pst-color-background); +} + +label { + color: var(--pst-color-text-base); +} + +/* +########## +Scroll-bar +########## +*/ + +body::-webkit-scrollbar { + width: 1rem; + height: 1rem; +} + +body::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; +} + +body::-webkit-scrollbar-track { + background: var(--pst-color-background); +} + +.bd-sidebar::-webkit-scrollbar { + width: 0.5rem; + height: 0.5rem; +} + +.bd-sidebar::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; + visibility: hidden !important; +} + +.bd-sidebar::-webkit-scrollbar-track { + background: var(--pst-color-border); + visibility: hidden !important; +} + +.bd-toc::-webkit-scrollbar { + width: 0.5rem; + height: 0.5rem; +} + +.bd-toc::-webkit-scrollbar-thumb { + background: var(--pst-color-border); + border-radius: inherit; +} + +.bd-toc::-webkit-scrollbar-track { + background: var(--pst-color-border); +} + +/* +############ +Autosummary +############ +*/ + +.autosummary tr:nth-child(odd), +.autosummary tr:nth-child(even) { + background-color: var(--pst-color-background); +} + +/* +##################### +ReST :download: links +##################### +*/ +a > code.download { + font-family: var(--pst-font-family-base); + color: var(--pst-color-link); + text-decoration: none; + font-weight: normal; +} + +/* +##################### +Sphinx gallery output +##################### +*/ +.sphx-glr-script-out .highlight pre { + background-color: var(--pst-color-codecell) !important; + color: var(--pst-color-codeout); +} + +.prev-next-area a p.prev-next-title { + color: var(--pst-color-link); + font-weight: 600; + font-size: 1.1em; +} + +.highlight .s1, +.s2, +.kc { + color: var(--pst-color-code-s1) !important; +} + +html[data-theme="dark"] .highlight .kn { + color: #e18fff; + font-weight: normal; +} + +.highlight .c1 { + color: var(--pst-color-code-c1); +} + +html[data-theme="dark"] .highlight .n { + color: #b3d7ff; +} + +html[data-theme="dark"] .highlight .nn { + color: #43d69d; + text-decoration: none; +} +/* +############### +Dropdown button +############### +*/ + +.navbar button.navbar-toggler { + margin-right: 1em; + border-color: rgb(255, 255, 255); + color: rgb(255, 255, 255); +} + +/* +#################################################### +Side column size (first and second column from left) +#################################################### +*/ + +.col-md-3 { + flex: 0 0 20%; + max-width: 20%; +} + +a.headerlink { + color: #222; +} + +@media (min-width: 1200px) { + .container, + .container-lg, + .container-md, + .container-sm, + .container-xl { + max-width: 1200px; + } +} + +@media (min-width: 1600px) { + .container, + .container-lg, + .container-md, + .container-sm, + .container-xl { + max-width: 1600px; + } +} + +/* +############################################ +Navigation column (according to side column) +############################################ +*/ +.col-lg-9 { + flex: 0 0 80%; + max-width: 80%; + padding-right: 5px; + padding-left: 20px; +} +.bd-main .bd-content { + display: flex; + height: 100%; + justify-content: end; +} + +.bd-main .bd-content .bd-article-container .bd-article { + padding-left: 1rem; + padding-top: 1rem; +} +.bd-header .navbar-nav li a.nav-link { + color: #ddd; +} +.bd-header .navbar-nav .dropdown button { + color: #ddd; + display: unset; +} + +/* +################################# +Syntax highlighting in code block +################################# +*/ + +html[data-theme="light"] .highlight .o { + color: #b35000; + font-weight: bold; +} + +/* +############################# +Bold font weight for **code** +############################# +*/ + +b, +strong { + font-weight: 900; +} + +.bd-header .navbar-nav > .active > .nav-link { + border-bottom: 2px solid #fff; +} + +.navbar-nav li a:focus, +.navbar-nav li a:hover, +.navbar-nav li.current > a { + color: white !important; +} + +.navbar-nav .dropdown .dropdown-menu { + min-width: 250px; +} + +/* +########################### +Left side toc-tree hovering +########################### +*/ + +nav.bd-links .active:hover > a { + font-weight: bold; + color: var(--pst-color-text-base); + border-left: 2px solid var(--pst-color-text-base); +} + +nav.bd-links .active > a { + font-weight: bold; + color: var(--pst-color-text-muted) !important; + border-left: 2px solid var(--pst-color-text-base); + border-bottom: none !important; + padding-left: 0.5rem; +} + +nav.bd-links li > a:hover { + font-weight: 900; + color: var(--pst-color-link) !important; +} + +/* +################## +icon, button, logo +################## +*/ + +button, +input, +optgroup, +select, +textarea, +button:hover { + color: #ddd; +} + +.theme-switch-button { + border-color: #f8f9fa; +} + +button.btn.version-switcher__button { + border-color: var(--pst-color-border); + color: #ddd; +} + +button.version-switcher__button:hover { + color: #f8f8f2; +} + +button.version-switcher__button { + color: #f8f9fa; +} + +.search-button { + color: #ddd; +} + +kbd { + background-color: #f8f9fa; +} + +.theme-switch-button span { + color: #f8f9fa; +} + +html[data-theme="light"] .theme-switch-button span:hover { + color: #0d0d0d; +} + +/* make the github logo white */ + +i.fa-github-square:before, +i.fa-square-github:before { + color: white; + font-size: 2rem; +} + +.version-switcher__menu a.list-group-item:hover { + background-color: #d09735 !important; + border-color: var(--pst-color-text-base) !important; + color: #000 !important; +} + +.version-switcher__menu a.list-group-item { + background-color: #f8f9fa; + border-color: var(--pst-color-border); + color: #000; +} + +.fa-wrench:before { + content: "\f0ad"; + color: white; +} + +.navbar-icon-links { + font-size: 1.5rem; + color: white; +} + +/* +############################## +image padding before and after +############################## +*/ + +img { + padding-top: 1em; + padding-bottom: 1em; +} + +html[data-theme="dark"] .bd-content img:not(.only-dark):not(.dark-light) { + background: transparent; +} + +img.logo__image { + padding-top: 0rem; + padding-bottom: 0rem; +} + +/* +########################## +Nav-bar entity right side. +########################## +*/ + +nav.bd-links li > a { + color: var(--pst-color-link); + font-size: 0.98rem; +} + +html[data-theme="light"] .highlight pre { + line-height: 125%; + font-size: 0.9em; +} + +html[data-theme="dark"] .highlight pre { + line-height: 125%; + font-size: 0.9em; +} + +.bd-toc { + padding-top: 5em; +} + +#version_switcher_button { + background-color: var(--pst-color-background); +} + +.editthispage a { + color: var(--pst-color-text-base); +} + +.list-group-item.active { + z-index: 2; + color: var(--pst-color-text-base) !important; +} + +/* +############## +Sphinx design +############## +*/ +.sd-sphinx-override, +.sd-sphinx-override * { + background-color: transparent !important; + font-size: medium; + flex: auto; +} +/* Sphinx-design tab */ + +/* Common styles for all screen sizes */ +.sd-tab-set > input:not(.focus-visible) + label { + outline: none; + font-size: large; + -webkit-tap-highlight-color: transparent; + color: var(--pst-color-text-base); +} + +.sd-tab-set > input:checked + label + .sd-tab-content { + display: block; + font-size: medium; +} + +.sd-tab-set > input:checked + label + .sd-tab-content { + display: block; + font-size: 0.9rem; +} + +.sd-tab-content { + font-family: var(--pst-font-family-base); +} + +.bd-content .sd-tab-set > input:checked + label, +.bd-content .sd-tab-set > input:not(:checked) + label:hover { + color: var(--pst-color-text-base); + border-color: var(--pst-color-text-base); +} + +/* Media query for medium-sized screens */ +@media screen and (max-width: 768px) { + .sd-tab-set > input:not(.focus-visible) + label { + font-size: medium; + } +} + +/* Media query for small-sized screens */ +@media screen and (max-width: 576px) { + .sd-tab-set > input:not(.focus-visible) + label { + font-size: small; + } +} + +/* Sphinx-design card */ + +/* Common styles for all screen sizes */ +.sd-card .sd-card-text { + font-family: var(--pst-font-family-base) !important; +} + +.sd-card .sd-card-header { + border: none; + background-color: white; + color: #150458 !important; + font-size: var(--pst-font-size-h5); + font-weight: bold; + font-family: var(--pst-font-family-base); + padding: 0.5rem 0rem 0.5rem 0rem; +} + +.sd-card .sd-card-footer .sd-card-text { + max-width: 220px; + margin-left: auto; + margin-right: auto; + font-family: var(--pst-font-family-base); +} + +html[data-theme="dark"] .sd-shadow-sm { + box-shadow: 0 0.1rem 1rem rgba(250, 250, 250, 0.6) !important; +} + +html[data-theme="dark"] .sd-card-img-top[src*=".png"] { + filter: invert(0.82) brightness(0.8) contrast(1.2); +} + +/* Common styles for all screen sizes */ +.sd-card { + border-radius: 0; + padding: 10px 10px 10px 10px; + font-family: var(--pst-font-family-base) !important; +} + +/* Media query for medium-sized screens */ +@media screen and (max-width: 768px) { + .sd-card .sd-card-header { + font-size: var(--pst-font-size-h6); + } +} + +/* Media query for small-sized screens */ +@media screen and (max-width: 576px) { + .sd-card .sd-card-header { + font-size: var(--pst-font-size-h5); + } + .sd-card { + padding: 5px 5px 5px 5px; + } + .sd-sphinx-override, + .sd-sphinx-override * { + box-sizing: content-box !important; + } +} + +/* +Sphinx-design dropdown +*/ + +details.sd-dropdown .sd-summary-title { + border: 1px solid var(--pst-color-text-base) !important; + color: var(--sd-color-card-text) !important; + font-family: var(monospace) !important; + font-size: medium; + text-align: left; + padding-left: 1rem; +} + +/* +################################# +Right side toctree color and font +################################# +*/ +.toc-entry a.nav-link { + padding: 0.125rem 1.5rem; + color: var(--pst-color-link); +} + +.toc-entry a.nav-link.active { + font-weight: bold; + color: var(--pst-color-text-base); + background-color: transparent; + border-left: 2px solid var(--pst-color-text-muted); +} + +.toc-h2 { + font-size: 0.98rem; + padding: 0.05em; +} + +.toc-h3 { + font-size: 0.96rem; +} + +.toc-h4 { + font-size: 0.9rem; +} + +.toc-entry a.nav-link:hover { + color: var(--pst-color-link); + text-decoration: none; + font-weight: 600; +} + +/* +########### +Directives +########### +*/ + +div.deprecated { + border-color: var(--pst-color-danger); + background-color: #dc354514; +} + +div.deprecated, +div.versionadded, +div.versionchanged { + background-color: transparent; +} + +.admonition, +div.admonition { + background-color: var(--pst-color-on-surface); +} + +/* +############ +Border lines +############ +*/ +.bd-sidebar-primary, +.bd-sidebar-secondary { + max-height: calc(100vh - var(--pst-header-height) - 1vh); +} + +/* +################# +search hide match +################# +*/ + +div#searchbox p.highlight-link a { + background-color: var(--pst-color-search-match); +} diff --git a/version/0.3/_static/css/breadcrumbs.css b/version/0.3/_static/css/breadcrumbs.css new file mode 100644 index 000000000..60fe0155f --- /dev/null +++ b/version/0.3/_static/css/breadcrumbs.css @@ -0,0 +1,70 @@ +/* Provided by the Sphinx base theme template at build time, +styles exclusively for the ansys-sphinx-theme classes. */ + +@import "ansys-sphinx-theme.css"; + +/* +############ +breadcrumbs +############ +*/ + +#breadcrumbs-spacer { + border-right: 10rem solid var(--pst-color-background); +} + +div.related > ul { + padding: 10px 0 20px 0; +} + +*, +:after, +:before { + box-sizing: border-box; +} + +/* +########################### +vesrion warning announcement +############################ +*/ + +#announcement_msg { + display: flex; + justify-content: center; + position: relative; + width: 100%; + padding: 0.5rem 12.5%; + text-align: center; +} + +#announcement_msg :after { + position: absolute; + width: 100%; + height: 100%; + left: 0; + top: 0; + background-color: rgb(223, 95, 114); + opacity: 0.2; + content: ""; + z-index: -1; +} + +#announcement_msg :empty { + display: none; +} + +#announcement_msg p { + font-weight: bold; + margin: auto; + color: black; +} + +html[data-theme="dark"] #announcement_msg :after { + background-color: lightpink; + opacity: 0.5; +} + +#announcement_msg a { + color: #1e6ddc; +} diff --git a/version/0.3/_static/css/meilisearch.css b/version/0.3/_static/css/meilisearch.css new file mode 100644 index 000000000..4782f1121 --- /dev/null +++ b/version/0.3/_static/css/meilisearch.css @@ -0,0 +1,217 @@ +@import "https://cdn.jsdelivr.net/npm/docs-searchbar.js@latest/dist/cdn/docs-searchbar.min.css"; +@import "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"; + +div[data-ds-theme] .searchbox { + overflow-y: scroll; + margin: auto; +} + +.docs-searchbar-suggestion--category-header { + background-color: var(--pst-color-border); + border-radius: 7px; + text-align: left; +} + +/* Styles for screens with a width of 576px or less */ +@media screen and (max-width: 576px) { + div[data-ds-theme] .searchbox { + width: 100%; + max-width: 100%; + } + + .dsb-suggestions { + width: 100%; + max-width: 480px; + } + + .meilisearch-autocomplete .dsb-dropdown-menu [class^="dsb-dataset-"] { + max-width: 580px; + min-width: 430px; + width: 450px; + } + + .bd-search input { + width: 270px !important; + } + + .index-select { + width: 180px; + } + + .meilisearch-autocomplete .docs-searchbar-suggestion { + width: 450px; + } +} + +/* Styles for screens with a width of 1200px or less */ +@media screen and (min-width: 1200px) { + div[data-ds-theme] .searchbox { + max-width: 800px; + } + + .dsb-suggestions { + width: 100%; + max-width: 580px; + } + + div[data-ds-theme] .meilisearch-autocomplete .dsb-dropdown-menu { + max-width: 870px; + min-width: 580px; + width: 850px; + } + + .bd-search input { + width: 600px !important; + } + .index-select { + width: 250px; + } + + div[data-ds-theme] .meilisearch-autocomplete .docs-searchbar-suggestion { + width: 735px; + } +} + +div[data-ds-theme] .searchbox input { + height: 32px; + border-radius: 8px; + font-size: 18px; + font-family: "Open Sans", sans-serif; + box-shadow: 0px 0px 8px darkgrey; +} + +.docs-searchbar-footer { + display: none; +} + +.docs-searchbar-footer { + display: none; +} + +[class*="docs-searchbar-suggestion"] { + text-decoration: none; +} + +.docs-searchbar-suggestion--highlight { + box-shadow: none !important; +} + +.container { + display: flex; + justify-content: center; + align-items: center; +} + +div[data-ds-theme] .meilisearch-autocomplete { + text-align: center; + color: var(--pst-color-text-base); +} + +#search-bar-input { + background-color: var(--pst-color-background); + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; + color: var(--pst-color-text-base); + font-size: var(--pst-font-size-icon); + position: relative; + padding-left: 3rem; +} + +.meilisearch-autocomplete::before { + content: "\f002"; + font-family: "Font Awesome 6 Free"; + position: absolute; + left: 8px; + top: 50%; + transform: translateY(-50%); + font-size: 1rem; + color: var(--pst-color-border); +} + +.index-select { + color: var(--pst-color-text-base); + background: var(--pst-color-background); + height: 47px; + border: 1px solid var(--pst-color-border); + border-radius: 0.25rem; + font-size: 20px; + font-family: "Open Sans", sans-serif; + box-shadow: 0px 0px 20px var(--pst-color-border); + padding: 0 10px 0px 10px; + margin-left: 5px; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .dsb-dropdown-menu + [class^="dsb-dataset-"] { + position: relative; + border: 1px solid #d9d9d9; + background: var(--pst-color-background); + border-radius: 4px; + padding: 0 8px 8px; +} +div[data-ds-theme] .meilisearch-autocomplete .dsb-dropdown-menu { + max-height: 600px !important; + overflow-y: auto !important; + border: 1px solid #ccc; +} + +div[data-ds-theme] .meilisearch-autocomplete .docs-searchbar-suggestion { + background: var(--pst-color-background); +} + +div[data-ds-theme] + .meilisearch-autocomplete + .docs-searchbar-suggestion--highlight { + color: var(--pst-color-info) !important; + font-weight: 900; + background: transparent; + padding: 0 0.05em; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .docs-searchbar-suggestion--subcategory-column { + width: None; + text-align: left; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .docs-searchbar-suggestion--content { + display: block; +} + +div[data-ds-theme] .meilisearch-autocomplete .docs-searchbar-suggestion--title { + margin-bottom: 4px; + color: var(--pst-color-text-base); + font-size: 0.9em; + font-weight: 700; + width: 100%; +} + +/* Styling the scrollbar */ +div[data-ds-theme] + .meilisearch-autocomplete + .dsb-dropdown-menu::-webkit-scrollbar { + width: 0.5rem; + height: 0.5rem; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .dsb-dropdown-menu::-webkit-scrollbar-thumb { + background: var(--pst-color-text-base); + border-radius: inherit; +} + +div[data-ds-theme] + .meilisearch-autocomplete + .dsb-dropdown-menu::-webkit-scrollbar-track { + background: var(--pst-color-background); +} + +.bd-search { + margin-bottom: 200px; +} diff --git a/version/0.3/_static/doctools.js b/version/0.3/_static/doctools.js new file mode 100644 index 000000000..d06a71d75 --- /dev/null +++ b/version/0.3/_static/doctools.js @@ -0,0 +1,156 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + if (el.src.substr(-9) === "minus.png") { + el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`; + toggledRows.forEach((el) => (el.style.display = "none")); + } else { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS + ) + return; + + document.addEventListener("keydown", (event) => { + // bail for input elements + if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return; + // bail with special keys + if (event.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const nextLink = document.querySelector('link[rel="next"]'); + if (nextLink && nextLink.href) { + window.location.href = nextLink.href; + event.preventDefault(); + } + break; + } + } + + // some keyboard layouts may need Shift to get / + switch (event.key) { + case "/": + if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break; + Documentation.focusSearchBar(); + event.preventDefault(); + } + }); + }, +}; + +// quick alias for translations +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/version/0.3/_static/documentation_options.js b/version/0.3/_static/documentation_options.js new file mode 100644 index 000000000..d76727561 --- /dev/null +++ b/version/0.3/_static/documentation_options.js @@ -0,0 +1,14 @@ +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), + VERSION: '0.3.5', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: true, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/version/0.3/_static/file.png b/version/0.3/_static/file.png new file mode 100644 index 000000000..a858a410e Binary files /dev/null and b/version/0.3/_static/file.png differ diff --git a/version/0.3/_static/fonts/SourceSansPro-Light.ttf b/version/0.3/_static/fonts/SourceSansPro-Light.ttf new file mode 100644 index 000000000..348871ac6 Binary files /dev/null and b/version/0.3/_static/fonts/SourceSansPro-Light.ttf differ diff --git a/version/0.3/_static/fonts/SourceSansPro-Regular.ttf b/version/0.3/_static/fonts/SourceSansPro-Regular.ttf new file mode 100644 index 000000000..b422bf432 Binary files /dev/null and b/version/0.3/_static/fonts/SourceSansPro-Regular.ttf differ diff --git a/version/0.3/_static/fonts/SourceSansPro-SemiBold.ttf b/version/0.3/_static/fonts/SourceSansPro-SemiBold.ttf new file mode 100644 index 000000000..2908e0d78 Binary files /dev/null and b/version/0.3/_static/fonts/SourceSansPro-SemiBold.ttf differ diff --git a/version/0.3/_static/graphviz.css b/version/0.3/_static/graphviz.css new file mode 100644 index 000000000..8d81c02ed --- /dev/null +++ b/version/0.3/_static/graphviz.css @@ -0,0 +1,19 @@ +/* + * graphviz.css + * ~~~~~~~~~~~~ + * + * Sphinx stylesheet -- graphviz extension. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +img.graphviz { + border: 0; + max-width: 100%; +} + +object.graphviz { + max-width: 100%; +} diff --git a/version/0.3/_static/js/download_target_blank.js b/version/0.3/_static/js/download_target_blank.js new file mode 100644 index 000000000..9f84c70f2 --- /dev/null +++ b/version/0.3/_static/js/download_target_blank.js @@ -0,0 +1,6 @@ +/* Add target="_blank" attribute to all hyperlinks generated by the ReST :download: directive. + * This will ensure the links open in a new tab. */ + +$(document).ready(function () { + $("a.download").attr("target", "_blank"); +}); diff --git a/version/0.3/_static/js/table.js b/version/0.3/_static/js/table.js new file mode 100644 index 000000000..a080ead14 --- /dev/null +++ b/version/0.3/_static/js/table.js @@ -0,0 +1,3 @@ +$(document).ready(function () { + $("table.datatable").DataTable(); +}); diff --git a/version/0.3/_static/jupyterlite_badge_logo.svg b/version/0.3/_static/jupyterlite_badge_logo.svg new file mode 100644 index 000000000..5de36d7fd --- /dev/null +++ b/version/0.3/_static/jupyterlite_badge_logo.svg @@ -0,0 +1,3 @@ + + +launchlaunchlitelite \ No newline at end of file diff --git a/version/0.3/_static/language_data.js b/version/0.3/_static/language_data.js new file mode 100644 index 000000000..250f5665f --- /dev/null +++ b/version/0.3/_static/language_data.js @@ -0,0 +1,199 @@ +/* + * language_data.js + * ~~~~~~~~~~~~~~~~ + * + * This script contains the language-specific data used by searchtools.js, + * namely the list of stopwords, stemmer, scorer and splitter. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; + + +/* Non-minified version is copied as a separate JS file, is available */ + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/version/0.3/_static/minus.png b/version/0.3/_static/minus.png new file mode 100644 index 000000000..d96755fda Binary files /dev/null and b/version/0.3/_static/minus.png differ diff --git a/version/0.3/_static/no_image.png b/version/0.3/_static/no_image.png new file mode 100644 index 000000000..8c2d48d5d Binary files /dev/null and b/version/0.3/_static/no_image.png differ diff --git a/version/0.3/_static/plus.png b/version/0.3/_static/plus.png new file mode 100644 index 000000000..7107cec93 Binary files /dev/null and b/version/0.3/_static/plus.png differ diff --git a/version/0.3/_static/pre/airbag/airbag.png b/version/0.3/_static/pre/airbag/airbag.png new file mode 100644 index 000000000..52c059c53 Binary files /dev/null and b/version/0.3/_static/pre/airbag/airbag.png differ diff --git a/version/0.3/_static/pre/em/em_resistive_heating.png b/version/0.3/_static/pre/em/em_resistive_heating.png new file mode 100644 index 000000000..1d736bfd1 Binary files /dev/null and b/version/0.3/_static/pre/em/em_resistive_heating.png differ diff --git a/version/0.3/_static/pre/em/railgun.png b/version/0.3/_static/pre/em/railgun.png new file mode 100644 index 000000000..aedfe4e3e Binary files /dev/null and b/version/0.3/_static/pre/em/railgun.png differ diff --git a/version/0.3/_static/pre/em/resistive_heating_2d.png b/version/0.3/_static/pre/em/resistive_heating_2d.png new file mode 100644 index 000000000..dc9fc2d55 Binary files /dev/null and b/version/0.3/_static/pre/em/resistive_heating_2d.png differ diff --git a/version/0.3/_static/pre/em/resistive_heating_2d_isopots.png b/version/0.3/_static/pre/em/resistive_heating_2d_isopots.png new file mode 100644 index 000000000..b9c18b077 Binary files /dev/null and b/version/0.3/_static/pre/em/resistive_heating_2d_isopots.png differ diff --git a/version/0.3/_static/pre/em/rlc_define_func.png b/version/0.3/_static/pre/em/rlc_define_func.png new file mode 100644 index 000000000..01c73432f Binary files /dev/null and b/version/0.3/_static/pre/em/rlc_define_func.png differ diff --git a/version/0.3/_static/pre/em/rlc_isopotential.png b/version/0.3/_static/pre/em/rlc_isopotential.png new file mode 100644 index 000000000..01c73432f Binary files /dev/null and b/version/0.3/_static/pre/em/rlc_isopotential.png differ diff --git a/version/0.3/_static/pre/explicit/ball_plate.png b/version/0.3/_static/pre/explicit/ball_plate.png new file mode 100644 index 000000000..664a29a8f Binary files /dev/null and b/version/0.3/_static/pre/explicit/ball_plate.png differ diff --git a/version/0.3/_static/pre/explicit/belted_dummy.png b/version/0.3/_static/pre/explicit/belted_dummy.png new file mode 100644 index 000000000..5e820f67c Binary files /dev/null and b/version/0.3/_static/pre/explicit/belted_dummy.png differ diff --git a/version/0.3/_static/pre/icfd/cylinderflow.png b/version/0.3/_static/pre/icfd/cylinderflow.png new file mode 100644 index 000000000..2317ec72f Binary files /dev/null and b/version/0.3/_static/pre/icfd/cylinderflow.png differ diff --git a/version/0.3/_static/pre/icfd/dam_break.png b/version/0.3/_static/pre/icfd/dam_break.png new file mode 100644 index 000000000..f5d36354c Binary files /dev/null and b/version/0.3/_static/pre/icfd/dam_break.png differ diff --git a/version/0.3/_static/pre/icfd/dem_coupling.png b/version/0.3/_static/pre/icfd/dem_coupling.png new file mode 100644 index 000000000..677721f75 Binary files /dev/null and b/version/0.3/_static/pre/icfd/dem_coupling.png differ diff --git a/version/0.3/_static/pre/icfd/driven_cavity.png b/version/0.3/_static/pre/icfd/driven_cavity.png new file mode 100644 index 000000000..6e0773499 Binary files /dev/null and b/version/0.3/_static/pre/icfd/driven_cavity.png differ diff --git a/version/0.3/_static/pre/icfd/free_convection_flow.png b/version/0.3/_static/pre/icfd/free_convection_flow.png new file mode 100644 index 000000000..bf8032a09 Binary files /dev/null and b/version/0.3/_static/pre/icfd/free_convection_flow.png differ diff --git a/version/0.3/_static/pre/icfd/imposed_move.png b/version/0.3/_static/pre/icfd/imposed_move.png new file mode 100644 index 000000000..204acf8b6 Binary files /dev/null and b/version/0.3/_static/pre/icfd/imposed_move.png differ diff --git a/version/0.3/_static/pre/icfd/internal_3d_flow.png b/version/0.3/_static/pre/icfd/internal_3d_flow.png new file mode 100644 index 000000000..b8cf30281 Binary files /dev/null and b/version/0.3/_static/pre/icfd/internal_3d_flow.png differ diff --git a/version/0.3/_static/pre/icfd/mesh_adaptivity.png b/version/0.3/_static/pre/icfd/mesh_adaptivity.png new file mode 100644 index 000000000..1bdcc4270 Binary files /dev/null and b/version/0.3/_static/pre/icfd/mesh_adaptivity.png differ diff --git a/version/0.3/_static/pre/icfd/mesh_morphing.png b/version/0.3/_static/pre/icfd/mesh_morphing.png new file mode 100644 index 000000000..48e2dcbf2 Binary files /dev/null and b/version/0.3/_static/pre/icfd/mesh_morphing.png differ diff --git a/version/0.3/_static/pre/icfd/mesh_size.png b/version/0.3/_static/pre/icfd/mesh_size.png new file mode 100644 index 000000000..342cabaa1 Binary files /dev/null and b/version/0.3/_static/pre/icfd/mesh_size.png differ diff --git a/version/0.3/_static/pre/icfd/plate_flow.png b/version/0.3/_static/pre/icfd/plate_flow.png new file mode 100644 index 000000000..41c8330e5 Binary files /dev/null and b/version/0.3/_static/pre/icfd/plate_flow.png differ diff --git a/version/0.3/_static/pre/icfd/sloshing.png b/version/0.3/_static/pre/icfd/sloshing.png new file mode 100644 index 000000000..61f074ec1 Binary files /dev/null and b/version/0.3/_static/pre/icfd/sloshing.png differ diff --git a/version/0.3/_static/pre/icfd/strong_fsi.png b/version/0.3/_static/pre/icfd/strong_fsi.png new file mode 100644 index 000000000..5d382bf83 Binary files /dev/null and b/version/0.3/_static/pre/icfd/strong_fsi.png differ diff --git a/version/0.3/_static/pre/icfd/thermal_flow.png b/version/0.3/_static/pre/icfd/thermal_flow.png new file mode 100644 index 000000000..5df090c01 Binary files /dev/null and b/version/0.3/_static/pre/icfd/thermal_flow.png differ diff --git a/version/0.3/_static/pre/icfd/weak_fsi.png b/version/0.3/_static/pre/icfd/weak_fsi.png new file mode 100644 index 000000000..efb1a9887 Binary files /dev/null and b/version/0.3/_static/pre/icfd/weak_fsi.png differ diff --git a/version/0.3/_static/pre/iga/rkrweld.png b/version/0.3/_static/pre/iga/rkrweld.png new file mode 100644 index 000000000..96115af12 Binary files /dev/null and b/version/0.3/_static/pre/iga/rkrweld.png differ diff --git a/version/0.3/_static/pre/isph/rigidtest.png b/version/0.3/_static/pre/isph/rigidtest.png new file mode 100644 index 000000000..ea55a59bd Binary files /dev/null and b/version/0.3/_static/pre/isph/rigidtest.png differ diff --git a/version/0.3/_static/pre/nvh/frf_column_hole.png b/version/0.3/_static/pre/nvh/frf_column_hole.png new file mode 100644 index 000000000..35776534e Binary files /dev/null and b/version/0.3/_static/pre/nvh/frf_column_hole.png differ diff --git a/version/0.3/_static/pre/nvh/frf_plate_damping.png b/version/0.3/_static/pre/nvh/frf_plate_damping.png new file mode 100644 index 000000000..90ca96695 Binary files /dev/null and b/version/0.3/_static/pre/nvh/frf_plate_damping.png differ diff --git a/version/0.3/_static/pre/sale/efpcase.png b/version/0.3/_static/pre/sale/efpcase.png new file mode 100644 index 000000000..4d9c907c2 Binary files /dev/null and b/version/0.3/_static/pre/sale/efpcase.png differ diff --git a/version/0.3/_static/pre/thermal/thermal.png b/version/0.3/_static/pre/thermal/thermal.png new file mode 100644 index 000000000..ca93e8621 Binary files /dev/null and b/version/0.3/_static/pre/thermal/thermal.png differ diff --git a/version/0.3/_static/pyansys-logo-black-cropped.png b/version/0.3/_static/pyansys-logo-black-cropped.png new file mode 100644 index 000000000..e28bc3dec Binary files /dev/null and b/version/0.3/_static/pyansys-logo-black-cropped.png differ diff --git a/version/0.3/_static/pyansys-logo-white-cropped.png b/version/0.3/_static/pyansys-logo-white-cropped.png new file mode 100644 index 000000000..91b50f98e Binary files /dev/null and b/version/0.3/_static/pyansys-logo-white-cropped.png differ diff --git a/version/0.3/_static/pyansys_dark.png b/version/0.3/_static/pyansys_dark.png new file mode 100644 index 000000000..b0ff9e198 Binary files /dev/null and b/version/0.3/_static/pyansys_dark.png differ diff --git a/version/0.3/_static/pyansys_dark_square.png b/version/0.3/_static/pyansys_dark_square.png new file mode 100644 index 000000000..2b271562b Binary files /dev/null and b/version/0.3/_static/pyansys_dark_square.png differ diff --git a/version/0.3/_static/pyansys_light.png b/version/0.3/_static/pyansys_light.png new file mode 100644 index 000000000..9f31babdb Binary files /dev/null and b/version/0.3/_static/pyansys_light.png differ diff --git a/version/0.3/_static/pyansys_light_square.png b/version/0.3/_static/pyansys_light_square.png new file mode 100644 index 000000000..3e0706a51 Binary files /dev/null and b/version/0.3/_static/pyansys_light_square.png differ diff --git a/version/0.3/_static/pygments.css b/version/0.3/_static/pygments.css new file mode 100644 index 000000000..997797f27 --- /dev/null +++ b/version/0.3/_static/pygments.css @@ -0,0 +1,152 @@ +html[data-theme="light"] .highlight pre { line-height: 125%; } +html[data-theme="light"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="light"] .highlight .hll { background-color: #7971292e } +html[data-theme="light"] .highlight { background: #fefefe; color: #545454 } +html[data-theme="light"] .highlight .c { color: #797129 } /* Comment */ +html[data-theme="light"] .highlight .err { color: #d91e18 } /* Error */ +html[data-theme="light"] .highlight .k { color: #7928a1 } /* Keyword */ +html[data-theme="light"] .highlight .l { color: #797129 } /* Literal */ +html[data-theme="light"] .highlight .n { color: #545454 } /* Name */ +html[data-theme="light"] .highlight .o { color: #008000 } /* Operator */ +html[data-theme="light"] .highlight .p { color: #545454 } /* Punctuation */ +html[data-theme="light"] .highlight .ch { color: #797129 } /* Comment.Hashbang */ +html[data-theme="light"] .highlight .cm { color: #797129 } /* Comment.Multiline */ +html[data-theme="light"] .highlight .cp { color: #797129 } /* Comment.Preproc */ +html[data-theme="light"] .highlight .cpf { color: #797129 } /* Comment.PreprocFile */ +html[data-theme="light"] .highlight .c1 { color: #797129 } /* Comment.Single */ +html[data-theme="light"] .highlight .cs { color: #797129 } /* Comment.Special */ +html[data-theme="light"] .highlight .gd { color: #007faa } /* Generic.Deleted */ +html[data-theme="light"] .highlight .ge { font-style: italic } /* Generic.Emph */ +html[data-theme="light"] .highlight .gh { color: #007faa } /* Generic.Heading */ +html[data-theme="light"] .highlight .gs { font-weight: bold } /* Generic.Strong */ +html[data-theme="light"] .highlight .gu { color: #007faa } /* Generic.Subheading */ +html[data-theme="light"] .highlight .kc { color: #7928a1 } /* Keyword.Constant */ +html[data-theme="light"] .highlight .kd { color: #7928a1 } /* Keyword.Declaration */ +html[data-theme="light"] .highlight .kn { color: #7928a1 } /* Keyword.Namespace */ +html[data-theme="light"] .highlight .kp { color: #7928a1 } /* Keyword.Pseudo */ +html[data-theme="light"] .highlight .kr { color: #7928a1 } /* Keyword.Reserved */ +html[data-theme="light"] .highlight .kt { color: #797129 } /* Keyword.Type */ +html[data-theme="light"] .highlight .ld { color: #797129 } /* Literal.Date */ +html[data-theme="light"] .highlight .m { color: #797129 } /* Literal.Number */ +html[data-theme="light"] .highlight .s { color: #008000 } /* Literal.String */ +html[data-theme="light"] .highlight .na { color: #797129 } /* Name.Attribute */ +html[data-theme="light"] .highlight .nb { color: #797129 } /* Name.Builtin */ +html[data-theme="light"] .highlight .nc { color: #007faa } /* Name.Class */ +html[data-theme="light"] .highlight .no { color: #007faa } /* Name.Constant */ +html[data-theme="light"] .highlight .nd { color: #797129 } /* Name.Decorator */ +html[data-theme="light"] .highlight .ni { color: #008000 } /* Name.Entity */ +html[data-theme="light"] .highlight .ne { color: #7928a1 } /* Name.Exception */ +html[data-theme="light"] .highlight .nf { color: #007faa } /* Name.Function */ +html[data-theme="light"] .highlight .nl { color: #797129 } /* Name.Label */ +html[data-theme="light"] .highlight .nn { color: #545454 } /* Name.Namespace */ +html[data-theme="light"] .highlight .nx { color: #545454 } /* Name.Other */ +html[data-theme="light"] .highlight .py { color: #007faa } /* Name.Property */ +html[data-theme="light"] .highlight .nt { color: #007faa } /* Name.Tag */ +html[data-theme="light"] .highlight .nv { color: #d91e18 } /* Name.Variable */ +html[data-theme="light"] .highlight .ow { color: #7928a1 } /* Operator.Word */ +html[data-theme="light"] .highlight .pm { color: #545454 } /* Punctuation.Marker */ +html[data-theme="light"] .highlight .w { color: #545454 } /* Text.Whitespace */ +html[data-theme="light"] .highlight .mb { color: #797129 } /* Literal.Number.Bin */ +html[data-theme="light"] .highlight .mf { color: #797129 } /* Literal.Number.Float */ +html[data-theme="light"] .highlight .mh { color: #797129 } /* Literal.Number.Hex */ +html[data-theme="light"] .highlight .mi { color: #797129 } /* Literal.Number.Integer */ +html[data-theme="light"] .highlight .mo { color: #797129 } /* Literal.Number.Oct */ +html[data-theme="light"] .highlight .sa { color: #008000 } /* Literal.String.Affix */ +html[data-theme="light"] .highlight .sb { color: #008000 } /* Literal.String.Backtick */ +html[data-theme="light"] .highlight .sc { color: #008000 } /* Literal.String.Char */ +html[data-theme="light"] .highlight .dl { color: #008000 } /* Literal.String.Delimiter */ +html[data-theme="light"] .highlight .sd { color: #008000 } /* Literal.String.Doc */ +html[data-theme="light"] .highlight .s2 { color: #008000 } /* Literal.String.Double */ +html[data-theme="light"] .highlight .se { color: #008000 } /* Literal.String.Escape */ +html[data-theme="light"] .highlight .sh { color: #008000 } /* Literal.String.Heredoc */ +html[data-theme="light"] .highlight .si { color: #008000 } /* Literal.String.Interpol */ +html[data-theme="light"] .highlight .sx { color: #008000 } /* Literal.String.Other */ +html[data-theme="light"] .highlight .sr { color: #d91e18 } /* Literal.String.Regex */ +html[data-theme="light"] .highlight .s1 { color: #008000 } /* Literal.String.Single */ +html[data-theme="light"] .highlight .ss { color: #007faa } /* Literal.String.Symbol */ +html[data-theme="light"] .highlight .bp { color: #797129 } /* Name.Builtin.Pseudo */ +html[data-theme="light"] .highlight .fm { color: #007faa } /* Name.Function.Magic */ +html[data-theme="light"] .highlight .vc { color: #d91e18 } /* Name.Variable.Class */ +html[data-theme="light"] .highlight .vg { color: #d91e18 } /* Name.Variable.Global */ +html[data-theme="light"] .highlight .vi { color: #d91e18 } /* Name.Variable.Instance */ +html[data-theme="light"] .highlight .vm { color: #797129 } /* Name.Variable.Magic */ +html[data-theme="light"] .highlight .il { color: #797129 } /* Literal.Number.Integer.Long */ +html[data-theme="dark"] .highlight pre { line-height: 125%; } +html[data-theme="dark"] .highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } +html[data-theme="dark"] .highlight .hll { background-color: #ffd9002e } +html[data-theme="dark"] .highlight { background: #2b2b2b; color: #f8f8f2 } +html[data-theme="dark"] .highlight .c { color: #ffd900 } /* Comment */ +html[data-theme="dark"] .highlight .err { color: #ffa07a } /* Error */ +html[data-theme="dark"] .highlight .k { color: #dcc6e0 } /* Keyword */ +html[data-theme="dark"] .highlight .l { color: #ffd900 } /* Literal */ +html[data-theme="dark"] .highlight .n { color: #f8f8f2 } /* Name */ +html[data-theme="dark"] .highlight .o { color: #abe338 } /* Operator */ +html[data-theme="dark"] .highlight .p { color: #f8f8f2 } /* Punctuation */ +html[data-theme="dark"] .highlight .ch { color: #ffd900 } /* Comment.Hashbang */ +html[data-theme="dark"] .highlight .cm { color: #ffd900 } /* Comment.Multiline */ +html[data-theme="dark"] .highlight .cp { color: #ffd900 } /* Comment.Preproc */ +html[data-theme="dark"] .highlight .cpf { color: #ffd900 } /* Comment.PreprocFile */ +html[data-theme="dark"] .highlight .c1 { color: #ffd900 } /* Comment.Single */ +html[data-theme="dark"] .highlight .cs { color: #ffd900 } /* Comment.Special */ +html[data-theme="dark"] .highlight .gd { color: #00e0e0 } /* Generic.Deleted */ +html[data-theme="dark"] .highlight .ge { font-style: italic } /* Generic.Emph */ +html[data-theme="dark"] .highlight .gh { color: #00e0e0 } /* Generic.Heading */ +html[data-theme="dark"] .highlight .gs { font-weight: bold } /* Generic.Strong */ +html[data-theme="dark"] .highlight .gu { color: #00e0e0 } /* Generic.Subheading */ +html[data-theme="dark"] .highlight .kc { color: #dcc6e0 } /* Keyword.Constant */ +html[data-theme="dark"] .highlight .kd { color: #dcc6e0 } /* Keyword.Declaration */ +html[data-theme="dark"] .highlight .kn { color: #dcc6e0 } /* Keyword.Namespace */ +html[data-theme="dark"] .highlight .kp { color: #dcc6e0 } /* Keyword.Pseudo */ +html[data-theme="dark"] .highlight .kr { color: #dcc6e0 } /* Keyword.Reserved */ +html[data-theme="dark"] .highlight .kt { color: #ffd900 } /* Keyword.Type */ +html[data-theme="dark"] .highlight .ld { color: #ffd900 } /* Literal.Date */ +html[data-theme="dark"] .highlight .m { color: #ffd900 } /* Literal.Number */ +html[data-theme="dark"] .highlight .s { color: #abe338 } /* Literal.String */ +html[data-theme="dark"] .highlight .na { color: #ffd900 } /* Name.Attribute */ +html[data-theme="dark"] .highlight .nb { color: #ffd900 } /* Name.Builtin */ +html[data-theme="dark"] .highlight .nc { color: #00e0e0 } /* Name.Class */ +html[data-theme="dark"] .highlight .no { color: #00e0e0 } /* Name.Constant */ +html[data-theme="dark"] .highlight .nd { color: #ffd900 } /* Name.Decorator */ +html[data-theme="dark"] .highlight .ni { color: #abe338 } /* Name.Entity */ +html[data-theme="dark"] .highlight .ne { color: #dcc6e0 } /* Name.Exception */ +html[data-theme="dark"] .highlight .nf { color: #00e0e0 } /* Name.Function */ +html[data-theme="dark"] .highlight .nl { color: #ffd900 } /* Name.Label */ +html[data-theme="dark"] .highlight .nn { color: #f8f8f2 } /* Name.Namespace */ +html[data-theme="dark"] .highlight .nx { color: #f8f8f2 } /* Name.Other */ +html[data-theme="dark"] .highlight .py { color: #00e0e0 } /* Name.Property */ +html[data-theme="dark"] .highlight .nt { color: #00e0e0 } /* Name.Tag */ +html[data-theme="dark"] .highlight .nv { color: #ffa07a } /* Name.Variable */ +html[data-theme="dark"] .highlight .ow { color: #dcc6e0 } /* Operator.Word */ +html[data-theme="dark"] .highlight .pm { color: #f8f8f2 } /* Punctuation.Marker */ +html[data-theme="dark"] .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ +html[data-theme="dark"] .highlight .mb { color: #ffd900 } /* Literal.Number.Bin */ +html[data-theme="dark"] .highlight .mf { color: #ffd900 } /* Literal.Number.Float */ +html[data-theme="dark"] .highlight .mh { color: #ffd900 } /* Literal.Number.Hex */ +html[data-theme="dark"] .highlight .mi { color: #ffd900 } /* Literal.Number.Integer */ +html[data-theme="dark"] .highlight .mo { color: #ffd900 } /* Literal.Number.Oct */ +html[data-theme="dark"] .highlight .sa { color: #abe338 } /* Literal.String.Affix */ +html[data-theme="dark"] .highlight .sb { color: #abe338 } /* Literal.String.Backtick */ +html[data-theme="dark"] .highlight .sc { color: #abe338 } /* Literal.String.Char */ +html[data-theme="dark"] .highlight .dl { color: #abe338 } /* Literal.String.Delimiter */ +html[data-theme="dark"] .highlight .sd { color: #abe338 } /* Literal.String.Doc */ +html[data-theme="dark"] .highlight .s2 { color: #abe338 } /* Literal.String.Double */ +html[data-theme="dark"] .highlight .se { color: #abe338 } /* Literal.String.Escape */ +html[data-theme="dark"] .highlight .sh { color: #abe338 } /* Literal.String.Heredoc */ +html[data-theme="dark"] .highlight .si { color: #abe338 } /* Literal.String.Interpol */ +html[data-theme="dark"] .highlight .sx { color: #abe338 } /* Literal.String.Other */ +html[data-theme="dark"] .highlight .sr { color: #ffa07a } /* Literal.String.Regex */ +html[data-theme="dark"] .highlight .s1 { color: #abe338 } /* Literal.String.Single */ +html[data-theme="dark"] .highlight .ss { color: #00e0e0 } /* Literal.String.Symbol */ +html[data-theme="dark"] .highlight .bp { color: #ffd900 } /* Name.Builtin.Pseudo */ +html[data-theme="dark"] .highlight .fm { color: #00e0e0 } /* Name.Function.Magic */ +html[data-theme="dark"] .highlight .vc { color: #ffa07a } /* Name.Variable.Class */ +html[data-theme="dark"] .highlight .vg { color: #ffa07a } /* Name.Variable.Global */ +html[data-theme="dark"] .highlight .vi { color: #ffa07a } /* Name.Variable.Instance */ +html[data-theme="dark"] .highlight .vm { color: #ffd900 } /* Name.Variable.Magic */ +html[data-theme="dark"] .highlight .il { color: #ffd900 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/version/0.3/_static/scripts/bootstrap.js b/version/0.3/_static/scripts/bootstrap.js new file mode 100644 index 000000000..766173aba --- /dev/null +++ b/version/0.3/_static/scripts/bootstrap.js @@ -0,0 +1,3 @@ +/*! For license information please see bootstrap.js.LICENSE.txt */ +(()=>{"use strict";var t={d:(e,i)=>{for(var n in i)t.o(i,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:i[n]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{afterMain:()=>w,afterRead:()=>b,afterWrite:()=>C,applyStyles:()=>$,arrow:()=>G,auto:()=>r,basePlacements:()=>a,beforeMain:()=>v,beforeRead:()=>m,beforeWrite:()=>A,bottom:()=>n,clippingParents:()=>h,computeStyles:()=>et,createPopper:()=>Dt,createPopperBase:()=>Lt,createPopperLite:()=>$t,detectOverflow:()=>mt,end:()=>c,eventListeners:()=>nt,flip:()=>_t,hide:()=>yt,left:()=>o,main:()=>y,modifierPhases:()=>T,offset:()=>wt,placements:()=>g,popper:()=>d,popperGenerator:()=>kt,popperOffsets:()=>At,preventOverflow:()=>Et,read:()=>_,reference:()=>f,right:()=>s,start:()=>l,top:()=>i,variationPlacements:()=>p,viewport:()=>u,write:()=>E});var i="top",n="bottom",s="right",o="left",r="auto",a=[i,n,s,o],l="start",c="end",h="clippingParents",u="viewport",d="popper",f="reference",p=a.reduce((function(t,e){return t.concat([e+"-"+l,e+"-"+c])}),[]),g=[].concat(a,[r]).reduce((function(t,e){return t.concat([e,e+"-"+l,e+"-"+c])}),[]),m="beforeRead",_="read",b="afterRead",v="beforeMain",y="main",w="afterMain",A="beforeWrite",E="write",C="afterWrite",T=[m,_,b,v,y,w,A,E,C];function O(t){return t?(t.nodeName||"").toLowerCase():null}function x(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function k(t){return t instanceof x(t).Element||t instanceof Element}function L(t){return t instanceof x(t).HTMLElement||t instanceof HTMLElement}function D(t){return"undefined"!=typeof ShadowRoot&&(t instanceof x(t).ShadowRoot||t instanceof ShadowRoot)}const $={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];L(s)&&O(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});L(n)&&O(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function S(t){return t.split("-")[0]}var I=Math.max,N=Math.min,P=Math.round;function j(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function M(){return!/^((?!chrome|android).)*safari/i.test(j())}function H(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=!1);var n=t.getBoundingClientRect(),s=1,o=1;e&&L(t)&&(s=t.offsetWidth>0&&P(n.width)/t.offsetWidth||1,o=t.offsetHeight>0&&P(n.height)/t.offsetHeight||1);var r=(k(t)?x(t):window).visualViewport,a=!M()&&i,l=(n.left+(a&&r?r.offsetLeft:0))/s,c=(n.top+(a&&r?r.offsetTop:0))/o,h=n.width/s,u=n.height/o;return{width:h,height:u,top:c,right:l+h,bottom:c+u,left:l,x:l,y:c}}function W(t){var e=H(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function F(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&D(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function B(t){return x(t).getComputedStyle(t)}function z(t){return["table","td","th"].indexOf(O(t))>=0}function q(t){return((k(t)?t.ownerDocument:t.document)||window.document).documentElement}function R(t){return"html"===O(t)?t:t.assignedSlot||t.parentNode||(D(t)?t.host:null)||q(t)}function V(t){return L(t)&&"fixed"!==B(t).position?t.offsetParent:null}function K(t){for(var e=x(t),i=V(t);i&&z(i)&&"static"===B(i).position;)i=V(i);return i&&("html"===O(i)||"body"===O(i)&&"static"===B(i).position)?e:i||function(t){var e=/firefox/i.test(j());if(/Trident/i.test(j())&&L(t)&&"fixed"===B(t).position)return null;var i=R(t);for(D(i)&&(i=i.host);L(i)&&["html","body"].indexOf(O(i))<0;){var n=B(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function Q(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function X(t,e,i){return I(t,N(e,i))}function Y(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function U(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}const G={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,r=t.state,l=t.name,c=t.options,h=r.elements.arrow,u=r.modifiersData.popperOffsets,d=S(r.placement),f=Q(d),p=[o,s].indexOf(d)>=0?"height":"width";if(h&&u){var g=function(t,e){return Y("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:U(t,a))}(c.padding,r),m=W(h),_="y"===f?i:o,b="y"===f?n:s,v=r.rects.reference[p]+r.rects.reference[f]-u[f]-r.rects.popper[p],y=u[f]-r.rects.reference[f],w=K(h),A=w?"y"===f?w.clientHeight||0:w.clientWidth||0:0,E=v/2-y/2,C=g[_],T=A-m[p]-g[b],O=A/2-m[p]/2+E,x=X(C,O,T),k=f;r.modifiersData[l]=((e={})[k]=x,e.centerOffset=x-O,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&F(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function J(t){return t.split("-")[1]}var Z={top:"auto",right:"auto",bottom:"auto",left:"auto"};function tt(t){var e,r=t.popper,a=t.popperRect,l=t.placement,h=t.variation,u=t.offsets,d=t.position,f=t.gpuAcceleration,p=t.adaptive,g=t.roundOffsets,m=t.isFixed,_=u.x,b=void 0===_?0:_,v=u.y,y=void 0===v?0:v,w="function"==typeof g?g({x:b,y}):{x:b,y};b=w.x,y=w.y;var A=u.hasOwnProperty("x"),E=u.hasOwnProperty("y"),C=o,T=i,O=window;if(p){var k=K(r),L="clientHeight",D="clientWidth";k===x(r)&&"static"!==B(k=q(r)).position&&"absolute"===d&&(L="scrollHeight",D="scrollWidth"),(l===i||(l===o||l===s)&&h===c)&&(T=n,y-=(m&&k===O&&O.visualViewport?O.visualViewport.height:k[L])-a.height,y*=f?1:-1),l!==o&&(l!==i&&l!==n||h!==c)||(C=s,b-=(m&&k===O&&O.visualViewport?O.visualViewport.width:k[D])-a.width,b*=f?1:-1)}var $,S=Object.assign({position:d},p&&Z),I=!0===g?function(t,e){var i=t.x,n=t.y,s=e.devicePixelRatio||1;return{x:P(i*s)/s||0,y:P(n*s)/s||0}}({x:b,y},x(r)):{x:b,y};return b=I.x,y=I.y,f?Object.assign({},S,(($={})[T]=E?"0":"",$[C]=A?"0":"",$.transform=(O.devicePixelRatio||1)<=1?"translate("+b+"px, "+y+"px)":"translate3d("+b+"px, "+y+"px, 0)",$)):Object.assign({},S,((e={})[T]=E?y+"px":"",e[C]=A?b+"px":"",e.transform="",e))}const et={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:S(e.placement),variation:J(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,tt(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,tt(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}};var it={passive:!0};const nt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=x(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,it)})),a&&l.addEventListener("resize",i.update,it),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,it)})),a&&l.removeEventListener("resize",i.update,it)}},data:{}};var st={left:"right",right:"left",bottom:"top",top:"bottom"};function ot(t){return t.replace(/left|right|bottom|top/g,(function(t){return st[t]}))}var rt={start:"end",end:"start"};function at(t){return t.replace(/start|end/g,(function(t){return rt[t]}))}function lt(t){var e=x(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ct(t){return H(q(t)).left+lt(t).scrollLeft}function ht(t){var e=B(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function ut(t){return["html","body","#document"].indexOf(O(t))>=0?t.ownerDocument.body:L(t)&&ht(t)?t:ut(R(t))}function dt(t,e){var i;void 0===e&&(e=[]);var n=ut(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=x(n),r=s?[o].concat(o.visualViewport||[],ht(n)?n:[]):n,a=e.concat(r);return s?a:a.concat(dt(R(r)))}function ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function pt(t,e,i){return e===u?ft(function(t,e){var i=x(t),n=q(t),s=i.visualViewport,o=n.clientWidth,r=n.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;var c=M();(c||!c&&"fixed"===e)&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a+ct(t),y:l}}(t,i)):k(e)?function(t,e){var i=H(t,!1,"fixed"===e);return i.top=i.top+t.clientTop,i.left=i.left+t.clientLeft,i.bottom=i.top+t.clientHeight,i.right=i.left+t.clientWidth,i.width=t.clientWidth,i.height=t.clientHeight,i.x=i.left,i.y=i.top,i}(e,i):ft(function(t){var e,i=q(t),n=lt(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=I(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=I(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+ct(t),l=-n.scrollTop;return"rtl"===B(s||i).direction&&(a+=I(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(q(t)))}function gt(t){var e,r=t.reference,a=t.element,h=t.placement,u=h?S(h):null,d=h?J(h):null,f=r.x+r.width/2-a.width/2,p=r.y+r.height/2-a.height/2;switch(u){case i:e={x:f,y:r.y-a.height};break;case n:e={x:f,y:r.y+r.height};break;case s:e={x:r.x+r.width,y:p};break;case o:e={x:r.x-a.width,y:p};break;default:e={x:r.x,y:r.y}}var g=u?Q(u):null;if(null!=g){var m="y"===g?"height":"width";switch(d){case l:e[g]=e[g]-(r[m]/2-a[m]/2);break;case c:e[g]=e[g]+(r[m]/2-a[m]/2)}}return e}function mt(t,e){void 0===e&&(e={});var o=e,r=o.placement,l=void 0===r?t.placement:r,c=o.strategy,p=void 0===c?t.strategy:c,g=o.boundary,m=void 0===g?h:g,_=o.rootBoundary,b=void 0===_?u:_,v=o.elementContext,y=void 0===v?d:v,w=o.altBoundary,A=void 0!==w&&w,E=o.padding,C=void 0===E?0:E,T=Y("number"!=typeof C?C:U(C,a)),x=y===d?f:d,D=t.rects.popper,$=t.elements[A?x:y],S=function(t,e,i,n){var s="clippingParents"===e?function(t){var e=dt(R(t)),i=["absolute","fixed"].indexOf(B(t).position)>=0&&L(t)?K(t):t;return k(i)?e.filter((function(t){return k(t)&&F(t,i)&&"body"!==O(t)})):[]}(t):[].concat(e),o=[].concat(s,[i]),r=o[0],a=o.reduce((function(e,i){var s=pt(t,i,n);return e.top=I(s.top,e.top),e.right=N(s.right,e.right),e.bottom=N(s.bottom,e.bottom),e.left=I(s.left,e.left),e}),pt(t,r,n));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}(k($)?$:$.contextElement||q(t.elements.popper),m,b,p),P=H(t.elements.reference),j=gt({reference:P,element:D,strategy:"absolute",placement:l}),M=ft(Object.assign({},D,j)),W=y===d?M:P,z={top:S.top-W.top+T.top,bottom:W.bottom-S.bottom+T.bottom,left:S.left-W.left+T.left,right:W.right-S.right+T.right},V=t.modifiersData.offset;if(y===d&&V){var Q=V[l];Object.keys(z).forEach((function(t){var e=[s,n].indexOf(t)>=0?1:-1,o=[i,n].indexOf(t)>=0?"y":"x";z[t]+=Q[o]*e}))}return z}const _t={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,c=t.options,h=t.name;if(!e.modifiersData[h]._skip){for(var u=c.mainAxis,d=void 0===u||u,f=c.altAxis,m=void 0===f||f,_=c.fallbackPlacements,b=c.padding,v=c.boundary,y=c.rootBoundary,w=c.altBoundary,A=c.flipVariations,E=void 0===A||A,C=c.allowedAutoPlacements,T=e.options.placement,O=S(T),x=_||(O!==T&&E?function(t){if(S(t)===r)return[];var e=ot(t);return[at(t),e,at(e)]}(T):[ot(T)]),k=[T].concat(x).reduce((function(t,i){return t.concat(S(i)===r?function(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,l=i.flipVariations,c=i.allowedAutoPlacements,h=void 0===c?g:c,u=J(n),d=u?l?p:p.filter((function(t){return J(t)===u})):a,f=d.filter((function(t){return h.indexOf(t)>=0}));0===f.length&&(f=d);var m=f.reduce((function(e,i){return e[i]=mt(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[S(i)],e}),{});return Object.keys(m).sort((function(t,e){return m[t]-m[e]}))}(e,{placement:i,boundary:v,rootBoundary:y,padding:b,flipVariations:E,allowedAutoPlacements:C}):i)}),[]),L=e.rects.reference,D=e.rects.popper,$=new Map,I=!0,N=k[0],P=0;P=0,F=W?"width":"height",B=mt(e,{placement:j,boundary:v,rootBoundary:y,altBoundary:w,padding:b}),z=W?H?s:o:H?n:i;L[F]>D[F]&&(z=ot(z));var q=ot(z),R=[];if(d&&R.push(B[M]<=0),m&&R.push(B[z]<=0,B[q]<=0),R.every((function(t){return t}))){N=j,I=!1;break}$.set(j,R)}if(I)for(var V=function(t){var e=k.find((function(e){var i=$.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return N=e,"break"},K=E?3:1;K>0&&"break"!==V(K);K--);e.placement!==N&&(e.modifiersData[h]._skip=!0,e.placement=N,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function vt(t){return[i,s,n,o].some((function(e){return t[e]>=0}))}const yt={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=mt(e,{elementContext:"reference"}),a=mt(e,{altBoundary:!0}),l=bt(r,n),c=bt(a,s,o),h=vt(l),u=vt(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}},wt={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,r=t.name,a=n.offset,l=void 0===a?[0,0]:a,c=g.reduce((function(t,n){return t[n]=function(t,e,n){var r=S(t),a=[o,i].indexOf(r)>=0?-1:1,l="function"==typeof n?n(Object.assign({},e,{placement:t})):n,c=l[0],h=l[1];return c=c||0,h=(h||0)*a,[o,s].indexOf(r)>=0?{x:h,y:c}:{x:c,y:h}}(n,e.rects,l),t}),{}),h=c[e.placement],u=h.x,d=h.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=d),e.modifiersData[r]=c}},At={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=gt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},Et={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,r=t.options,a=t.name,c=r.mainAxis,h=void 0===c||c,u=r.altAxis,d=void 0!==u&&u,f=r.boundary,p=r.rootBoundary,g=r.altBoundary,m=r.padding,_=r.tether,b=void 0===_||_,v=r.tetherOffset,y=void 0===v?0:v,w=mt(e,{boundary:f,rootBoundary:p,padding:m,altBoundary:g}),A=S(e.placement),E=J(e.placement),C=!E,T=Q(A),O="x"===T?"y":"x",x=e.modifiersData.popperOffsets,k=e.rects.reference,L=e.rects.popper,D="function"==typeof y?y(Object.assign({},e.rects,{placement:e.placement})):y,$="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),P=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,j={x:0,y:0};if(x){if(h){var M,H="y"===T?i:o,F="y"===T?n:s,B="y"===T?"height":"width",z=x[T],q=z+w[H],R=z-w[F],V=b?-L[B]/2:0,Y=E===l?k[B]:L[B],U=E===l?-L[B]:-k[B],G=e.elements.arrow,Z=b&&G?W(G):{width:0,height:0},tt=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},et=tt[H],it=tt[F],nt=X(0,k[B],Z[B]),st=C?k[B]/2-V-nt-et-$.mainAxis:Y-nt-et-$.mainAxis,ot=C?-k[B]/2+V+nt+it+$.mainAxis:U+nt+it+$.mainAxis,rt=e.elements.arrow&&K(e.elements.arrow),at=rt?"y"===T?rt.clientTop||0:rt.clientLeft||0:0,lt=null!=(M=null==P?void 0:P[T])?M:0,ct=z+ot-lt,ht=X(b?N(q,z+st-lt-at):q,z,b?I(R,ct):R);x[T]=ht,j[T]=ht-z}if(d){var ut,dt="x"===T?i:o,ft="x"===T?n:s,pt=x[O],gt="y"===O?"height":"width",_t=pt+w[dt],bt=pt-w[ft],vt=-1!==[i,o].indexOf(A),yt=null!=(ut=null==P?void 0:P[O])?ut:0,wt=vt?_t:pt-k[gt]-L[gt]-yt+$.altAxis,At=vt?pt+k[gt]+L[gt]-yt-$.altAxis:bt,Et=b&&vt?function(t,e,i){var n=X(t,e,i);return n>i?i:n}(wt,pt,At):X(b?wt:_t,pt,b?At:bt);x[O]=Et,j[O]=Et-pt}e.modifiersData[a]=j}},requiresIfExists:["offset"]};function Ct(t,e,i){void 0===i&&(i=!1);var n,s,o=L(e),r=L(e)&&function(t){var e=t.getBoundingClientRect(),i=P(e.width)/t.offsetWidth||1,n=P(e.height)/t.offsetHeight||1;return 1!==i||1!==n}(e),a=q(e),l=H(t,r,i),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(o||!o&&!i)&&(("body"!==O(e)||ht(a))&&(c=(n=e)!==x(n)&&L(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:lt(n)),L(e)?((h=H(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=ct(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function Tt(t){var e=new Map,i=new Set,n=[];function s(t){i.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!i.has(t)){var n=e.get(t);n&&s(n)}})),n.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||s(t)})),n}var Ot={placement:"bottom",modifiers:[],strategy:"absolute"};function xt(){for(var t=arguments.length,e=new Array(t),i=0;i{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},Nt=t=>{const e=It(t);return e&&document.querySelector(e)?e:null},Pt=t=>{const e=It(t);return e?document.querySelector(e):null},jt=t=>{t.dispatchEvent(new Event(St))},Mt=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),Ht=t=>Mt(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,Wt=t=>{if(!Mt(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},Ft=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),Bt=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?Bt(t.parentNode):null},zt=()=>{},qt=t=>{t.offsetHeight},Rt=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,Vt=[],Kt=()=>"rtl"===document.documentElement.dir,Qt=t=>{var e;e=()=>{const e=Rt();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(Vt.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of Vt)t()})),Vt.push(e)):e()},Xt=t=>{"function"==typeof t&&t()},Yt=(t,e,i=!0)=>{if(!i)return void Xt(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let s=!1;const o=({target:i})=>{i===e&&(s=!0,e.removeEventListener(St,o),Xt(t))};e.addEventListener(St,o),setTimeout((()=>{s||jt(e)}),n)},Ut=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},Gt=/[^.]*(?=\..*)\.|.*/,Jt=/\..*/,Zt=/::\d+$/,te={};let ee=1;const ie={mouseenter:"mouseover",mouseleave:"mouseout"},ne=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function se(t,e){return e&&`${e}::${ee++}`||t.uidEvent||ee++}function oe(t){const e=se(t);return t.uidEvent=e,te[e]=te[e]||{},te[e]}function re(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function ae(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=ue(t);return ne.has(o)||(o=t),[n,s,o]}function le(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=ae(e,i,n);if(e in ie){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=oe(t),c=l[a]||(l[a]={}),h=re(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const u=se(r,e.replace(Gt,"")),d=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return fe(s,{delegateTarget:r}),n.oneOff&&de.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return fe(n,{delegateTarget:t}),i.oneOff&&de.off(t,n.type,e),e.apply(t,[n])}}(t,r);d.delegationSelector=o?i:null,d.callable=r,d.oneOff=s,d.uidEvent=u,c[u]=d,t.addEventListener(a,d,o)}function ce(t,e,i,n,s){const o=re(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function he(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];ce(t,e,i,n.callable,n.delegationSelector)}}function ue(t){return t=t.replace(Jt,""),ie[t]||t}const de={on(t,e,i,n){le(t,e,i,n,!1)},one(t,e,i,n){le(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=ae(e,i,n),a=r!==e,l=oe(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))he(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(Zt,"");if(!a||e.includes(n)){const e=c[i];ce(t,l,r,e.callable,e.delegationSelector)}}}else{if(!Object.keys(c).length)return;ce(t,l,r,o,s?i:null)}},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=Rt();let s=null,o=!0,r=!0,a=!1;e!==ue(e)&&n&&(s=n.Event(e,i),n(t).trigger(s),o=!s.isPropagationStopped(),r=!s.isImmediatePropagationStopped(),a=s.isDefaultPrevented());let l=new Event(e,{bubbles:o,cancelable:!0});return l=fe(l,i),a&&l.preventDefault(),r&&t.dispatchEvent(l),l.defaultPrevented&&s&&s.preventDefault(),l}};function fe(t,e){for(const[i,n]of Object.entries(e||{}))try{t[i]=n}catch(e){Object.defineProperty(t,i,{configurable:!0,get:()=>n})}return t}const pe=new Map,ge={set(t,e,i){pe.has(t)||pe.set(t,new Map);const n=pe.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>pe.has(t)&&pe.get(t).get(e)||null,remove(t,e){if(!pe.has(t))return;const i=pe.get(t);i.delete(e),0===i.size&&pe.delete(t)}};function me(t){if("true"===t)return!0;if("false"===t)return!1;if(t===Number(t).toString())return Number(t);if(""===t||"null"===t)return null;if("string"!=typeof t)return t;try{return JSON.parse(decodeURIComponent(t))}catch(e){return t}}function _e(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}const be={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${_e(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${_e(e)}`)},getDataAttributes(t){if(!t)return{};const e={},i=Object.keys(t.dataset).filter((t=>t.startsWith("bs")&&!t.startsWith("bsConfig")));for(const n of i){let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=me(t.dataset[n])}return e},getDataAttribute:(t,e)=>me(t.getAttribute(`data-bs-${_e(e)}`))};class ve{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,e){const i=Mt(e)?be.getDataAttribute(e,"config"):{};return{...this.constructor.Default,..."object"==typeof i?i:{},...Mt(e)?be.getDataAttributes(e):{},..."object"==typeof t?t:{}}}_typeCheckConfig(t,e=this.constructor.DefaultType){for(const n of Object.keys(e)){const s=e[n],o=t[n],r=Mt(o)?"element":null==(i=o)?`${i}`:Object.prototype.toString.call(i).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(s).test(r))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)}var i}}class ye extends ve{constructor(t,e){super(),(t=Ht(t))&&(this._element=t,this._config=this._getConfig(e),ge.set(this._element,this.constructor.DATA_KEY,this))}dispose(){ge.remove(this._element,this.constructor.DATA_KEY),de.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,e,i=!0){Yt(t,e,i)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return ge.get(Ht(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.2.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const we=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,n=t.NAME;de.on(document,i,`[data-bs-dismiss="${n}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),Ft(this))return;const s=Pt(this)||this.closest(`.${n}`);t.getOrCreateInstance(s)[e]()}))},Ae=".bs.alert",Ee=`close${Ae}`,Ce=`closed${Ae}`;class Te extends ye{static get NAME(){return"alert"}close(){if(de.trigger(this._element,Ee).defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),de.trigger(this._element,Ce),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=Te.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}we(Te,"close"),Qt(Te);const Oe='[data-bs-toggle="button"]';class xe extends ye{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=xe.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}de.on(document,"click.bs.button.data-api",Oe,(t=>{t.preventDefault();const e=t.target.closest(Oe);xe.getOrCreateInstance(e).toggle()})),Qt(xe);const ke={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let n=t.parentNode.closest(e);for(;n;)i.push(n),n=n.parentNode.closest(e);return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(",");return this.find(e,t).filter((t=>!Ft(t)&&Wt(t)))}},Le=".bs.swipe",De=`touchstart${Le}`,$e=`touchmove${Le}`,Se=`touchend${Le}`,Ie=`pointerdown${Le}`,Ne=`pointerup${Le}`,Pe={endCallback:null,leftCallback:null,rightCallback:null},je={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Me extends ve{constructor(t,e){super(),this._element=t,t&&Me.isSupported()&&(this._config=this._getConfig(e),this._deltaX=0,this._supportPointerEvents=Boolean(window.PointerEvent),this._initEvents())}static get Default(){return Pe}static get DefaultType(){return je}static get NAME(){return"swipe"}dispose(){de.off(this._element,Le)}_start(t){this._supportPointerEvents?this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX):this._deltaX=t.touches[0].clientX}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),Xt(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=40)return;const e=t/this._deltaX;this._deltaX=0,e&&Xt(e>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(de.on(this._element,Ie,(t=>this._start(t))),de.on(this._element,Ne,(t=>this._end(t))),this._element.classList.add("pointer-event")):(de.on(this._element,De,(t=>this._start(t))),de.on(this._element,$e,(t=>this._move(t))),de.on(this._element,Se,(t=>this._end(t))))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&("pen"===t.pointerType||"touch"===t.pointerType)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const He=".bs.carousel",We=".data-api",Fe="next",Be="prev",ze="left",qe="right",Re=`slide${He}`,Ve=`slid${He}`,Ke=`keydown${He}`,Qe=`mouseenter${He}`,Xe=`mouseleave${He}`,Ye=`dragstart${He}`,Ue=`load${He}${We}`,Ge=`click${He}${We}`,Je="carousel",Ze="active",ti=".active",ei=".carousel-item",ii=ti+ei,ni={ArrowLeft:qe,ArrowRight:ze},si={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},oi={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class ri extends ye{constructor(t,e){super(t,e),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=ke.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Je&&this.cycle()}static get Default(){return si}static get DefaultType(){return oi}static get NAME(){return"carousel"}next(){this._slide(Fe)}nextWhenVisible(){!document.hidden&&Wt(this._element)&&this.next()}prev(){this._slide(Be)}pause(){this._isSliding&&jt(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval((()=>this.nextWhenVisible()),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?de.one(this._element,Ve,(()=>this.cycle())):this.cycle())}to(t){const e=this._getItems();if(t>e.length-1||t<0)return;if(this._isSliding)return void de.one(this._element,Ve,(()=>this.to(t)));const i=this._getItemIndex(this._getActive());if(i===t)return;const n=t>i?Fe:Be;this._slide(n,e[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&de.on(this._element,Ke,(t=>this._keydown(t))),"hover"===this._config.pause&&(de.on(this._element,Qe,(()=>this.pause())),de.on(this._element,Xe,(()=>this._maybeEnableCycle()))),this._config.touch&&Me.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const t of ke.find(".carousel-item img",this._element))de.on(t,Ye,(t=>t.preventDefault()));const t={leftCallback:()=>this._slide(this._directionToOrder(ze)),rightCallback:()=>this._slide(this._directionToOrder(qe)),endCallback:()=>{"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((()=>this._maybeEnableCycle()),500+this._config.interval))}};this._swipeHelper=new Me(this._element,t)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=ni[t.key];e&&(t.preventDefault(),this._slide(this._directionToOrder(e)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const e=ke.findOne(ti,this._indicatorsElement);e.classList.remove(Ze),e.removeAttribute("aria-current");const i=ke.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);i&&(i.classList.add(Ze),i.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=e||this._config.defaultInterval}_slide(t,e=null){if(this._isSliding)return;const i=this._getActive(),n=t===Fe,s=e||Ut(this._getItems(),i,n,this._config.wrap);if(s===i)return;const o=this._getItemIndex(s),r=e=>de.trigger(this._element,e,{relatedTarget:s,direction:this._orderToDirection(t),from:this._getItemIndex(i),to:o});if(r(Re).defaultPrevented)return;if(!i||!s)return;const a=Boolean(this._interval);this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=s;const l=n?"carousel-item-start":"carousel-item-end",c=n?"carousel-item-next":"carousel-item-prev";s.classList.add(c),qt(s),i.classList.add(l),s.classList.add(l),this._queueCallback((()=>{s.classList.remove(l,c),s.classList.add(Ze),i.classList.remove(Ze,c,l),this._isSliding=!1,r(Ve)}),i,this._isAnimated()),a&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return ke.findOne(ii,this._element)}_getItems(){return ke.find(ei,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Kt()?t===ze?Be:Fe:t===ze?Fe:Be}_orderToDirection(t){return Kt()?t===Be?ze:qe:t===Be?qe:ze}static jQueryInterface(t){return this.each((function(){const e=ri.getOrCreateInstance(this,t);if("number"!=typeof t){if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}else e.to(t)}))}}de.on(document,Ge,"[data-bs-slide], [data-bs-slide-to]",(function(t){const e=Pt(this);if(!e||!e.classList.contains(Je))return;t.preventDefault();const i=ri.getOrCreateInstance(e),n=this.getAttribute("data-bs-slide-to");return n?(i.to(n),void i._maybeEnableCycle()):"next"===be.getDataAttribute(this,"slide")?(i.next(),void i._maybeEnableCycle()):(i.prev(),void i._maybeEnableCycle())})),de.on(window,Ue,(()=>{const t=ke.find('[data-bs-ride="carousel"]');for(const e of t)ri.getOrCreateInstance(e)})),Qt(ri);const ai=".bs.collapse",li=`show${ai}`,ci=`shown${ai}`,hi=`hide${ai}`,ui=`hidden${ai}`,di=`click${ai}.data-api`,fi="show",pi="collapse",gi="collapsing",mi=`:scope .${pi} .${pi}`,_i='[data-bs-toggle="collapse"]',bi={parent:null,toggle:!0},vi={parent:"(null|element)",toggle:"boolean"};class yi extends ye{constructor(t,e){super(t,e),this._isTransitioning=!1,this._triggerArray=[];const i=ke.find(_i);for(const t of i){const e=Nt(t),i=ke.find(e).filter((t=>t===this._element));null!==e&&i.length&&this._triggerArray.push(t)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return bi}static get DefaultType(){return vi}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter((t=>t!==this._element)).map((t=>yi.getOrCreateInstance(t,{toggle:!1})))),t.length&&t[0]._isTransitioning)return;if(de.trigger(this._element,li).defaultPrevented)return;for(const e of t)e.hide();const e=this._getDimension();this._element.classList.remove(pi),this._element.classList.add(gi),this._element.style[e]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const i=`scroll${e[0].toUpperCase()+e.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(gi),this._element.classList.add(pi,fi),this._element.style[e]="",de.trigger(this._element,ci)}),this._element,!0),this._element.style[e]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if(de.trigger(this._element,hi).defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,qt(this._element),this._element.classList.add(gi),this._element.classList.remove(pi,fi);for(const t of this._triggerArray){const e=Pt(t);e&&!this._isShown(e)&&this._addAriaAndCollapsedClass([t],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(gi),this._element.classList.add(pi),de.trigger(this._element,ui)}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(fi)}_configAfterMerge(t){return t.toggle=Boolean(t.toggle),t.parent=Ht(t.parent),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(_i);for(const e of t){const t=Pt(e);t&&this._addAriaAndCollapsedClass([e],this._isShown(t))}}_getFirstLevelChildren(t){const e=ke.find(mi,this._config.parent);return ke.find(t,this._config.parent).filter((t=>!e.includes(t)))}_addAriaAndCollapsedClass(t,e){if(t.length)for(const i of t)i.classList.toggle("collapsed",!e),i.setAttribute("aria-expanded",e)}static jQueryInterface(t){const e={};return"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1),this.each((function(){const i=yi.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t]()}}))}}de.on(document,di,_i,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=Nt(this),i=ke.find(e);for(const t of i)yi.getOrCreateInstance(t,{toggle:!1}).toggle()})),Qt(yi);const wi="dropdown",Ai=".bs.dropdown",Ei=".data-api",Ci="ArrowUp",Ti="ArrowDown",Oi=`hide${Ai}`,xi=`hidden${Ai}`,ki=`show${Ai}`,Li=`shown${Ai}`,Di=`click${Ai}${Ei}`,$i=`keydown${Ai}${Ei}`,Si=`keyup${Ai}${Ei}`,Ii="show",Ni='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',Pi=`${Ni}.${Ii}`,ji=".dropdown-menu",Mi=Kt()?"top-end":"top-start",Hi=Kt()?"top-start":"top-end",Wi=Kt()?"bottom-end":"bottom-start",Fi=Kt()?"bottom-start":"bottom-end",Bi=Kt()?"left-start":"right-start",zi=Kt()?"right-start":"left-start",qi={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},Ri={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class Vi extends ye{constructor(t,e){super(t,e),this._popper=null,this._parent=this._element.parentNode,this._menu=ke.next(this._element,ji)[0]||ke.prev(this._element,ji)[0]||ke.findOne(ji,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return qi}static get DefaultType(){return Ri}static get NAME(){return wi}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Ft(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!de.trigger(this._element,ki,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(".navbar-nav"))for(const t of[].concat(...document.body.children))de.on(t,"mouseover",zt);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(Ii),this._element.classList.add(Ii),de.trigger(this._element,Li,t)}}hide(){if(Ft(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!de.trigger(this._element,Oi,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))de.off(t,"mouseover",zt);this._popper&&this._popper.destroy(),this._menu.classList.remove(Ii),this._element.classList.remove(Ii),this._element.setAttribute("aria-expanded","false"),be.removeDataAttribute(this._menu,"popper"),de.trigger(this._element,xi,t)}}_getConfig(t){if("object"==typeof(t=super._getConfig(t)).reference&&!Mt(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${wi.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(void 0===e)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;"parent"===this._config.reference?t=this._parent:Mt(this._config.reference)?t=Ht(this._config.reference):"object"==typeof this._config.reference&&(t=this._config.reference);const i=this._getPopperConfig();this._popper=Dt(t,this._menu,i)}_isShown(){return this._menu.classList.contains(Ii)}_getPlacement(){const t=this._parent;if(t.classList.contains("dropend"))return Bi;if(t.classList.contains("dropstart"))return zi;if(t.classList.contains("dropup-center"))return"top";if(t.classList.contains("dropdown-center"))return"bottom";const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Hi:Mi:e?Fi:Wi}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||"static"===this._config.display)&&(be.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=ke.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter((t=>Wt(t)));i.length&&Ut(i,e,t===Ti,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Vi.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(2===t.button||"keyup"===t.type&&"Tab"!==t.key)return;const e=ke.find(Pi);for(const i of e){const e=Vi.getInstance(i);if(!e||!1===e._config.autoClose)continue;const n=t.composedPath(),s=n.includes(e._menu);if(n.includes(e._element)||"inside"===e._config.autoClose&&!s||"outside"===e._config.autoClose&&s)continue;if(e._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const o={relatedTarget:e._element};"click"===t.type&&(o.clickEvent=t),e._completeHide(o)}}static dataApiKeydownHandler(t){const e=/input|textarea/i.test(t.target.tagName),i="Escape"===t.key,n=[Ci,Ti].includes(t.key);if(!n&&!i)return;if(e&&!i)return;t.preventDefault();const s=this.matches(Ni)?this:ke.prev(this,Ni)[0]||ke.next(this,Ni)[0]||ke.findOne(Ni,t.delegateTarget.parentNode),o=Vi.getOrCreateInstance(s);if(n)return t.stopPropagation(),o.show(),void o._selectMenuItem(t);o._isShown()&&(t.stopPropagation(),o.hide(),s.focus())}}de.on(document,$i,Ni,Vi.dataApiKeydownHandler),de.on(document,$i,ji,Vi.dataApiKeydownHandler),de.on(document,Di,Vi.clearMenus),de.on(document,Si,Vi.clearMenus),de.on(document,Di,Ni,(function(t){t.preventDefault(),Vi.getOrCreateInstance(this).toggle()})),Qt(Vi);const Ki=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Qi=".sticky-top",Xi="padding-right",Yi="margin-right";class Ui{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,Xi,(e=>e+t)),this._setElementAttributes(Ki,Xi,(e=>e+t)),this._setElementAttributes(Qi,Yi,(e=>e-t))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,Xi),this._resetElementAttributes(Ki,Xi),this._resetElementAttributes(Qi,Yi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const n=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+n)return;this._saveInitialAttribute(t,e);const s=window.getComputedStyle(t).getPropertyValue(e);t.style.setProperty(e,`${i(Number.parseFloat(s))}px`)}))}_saveInitialAttribute(t,e){const i=t.style.getPropertyValue(e);i&&be.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=be.getDataAttribute(t,e);null!==i?(be.removeDataAttribute(t,e),t.style.setProperty(e,i)):t.style.removeProperty(e)}))}_applyManipulationCallback(t,e){if(Mt(t))e(t);else for(const i of ke.find(t,this._element))e(i)}}const Gi="backdrop",Ji="show",Zi=`mousedown.bs.${Gi}`,tn={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},en={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class nn extends ve{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return tn}static get DefaultType(){return en}static get NAME(){return Gi}show(t){if(!this._config.isVisible)return void Xt(t);this._append();const e=this._getElement();this._config.isAnimated&&qt(e),e.classList.add(Ji),this._emulateAnimation((()=>{Xt(t)}))}hide(t){this._config.isVisible?(this._getElement().classList.remove(Ji),this._emulateAnimation((()=>{this.dispose(),Xt(t)}))):Xt(t)}dispose(){this._isAppended&&(de.off(this._element,Zi),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Ht(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),de.on(t,Zi,(()=>{Xt(this._config.clickCallback)})),this._isAppended=!0}_emulateAnimation(t){Yt(t,this._getElement(),this._config.isAnimated)}}const sn=".bs.focustrap",on=`focusin${sn}`,rn=`keydown.tab${sn}`,an="backward",ln={autofocus:!0,trapElement:null},cn={autofocus:"boolean",trapElement:"element"};class hn extends ve{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return ln}static get DefaultType(){return cn}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),de.off(document,sn),de.on(document,on,(t=>this._handleFocusin(t))),de.on(document,rn,(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,de.off(document,sn))}_handleFocusin(t){const{trapElement:e}=this._config;if(t.target===document||t.target===e||e.contains(t.target))return;const i=ke.focusableChildren(e);0===i.length?e.focus():this._lastTabNavDirection===an?i[i.length-1].focus():i[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?an:"forward")}}const un=".bs.modal",dn=`hide${un}`,fn=`hidePrevented${un}`,pn=`hidden${un}`,gn=`show${un}`,mn=`shown${un}`,_n=`resize${un}`,bn=`click.dismiss${un}`,vn=`mousedown.dismiss${un}`,yn=`keydown.dismiss${un}`,wn=`click${un}.data-api`,An="modal-open",En="show",Cn="modal-static",Tn={backdrop:!0,focus:!0,keyboard:!0},On={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class xn extends ye{constructor(t,e){super(t,e),this._dialog=ke.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Ui,this._addEventListeners()}static get Default(){return Tn}static get DefaultType(){return On}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||de.trigger(this._element,gn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(An),this._adjustDialog(),this._backdrop.show((()=>this._showElement(t))))}hide(){this._isShown&&!this._isTransitioning&&(de.trigger(this._element,dn).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(En),this._queueCallback((()=>this._hideModal()),this._element,this._isAnimated())))}dispose(){for(const t of[window,this._dialog])de.off(t,un);this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new nn({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new hn({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const e=ke.findOne(".modal-body",this._dialog);e&&(e.scrollTop=0),qt(this._element),this._element.classList.add(En),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,de.trigger(this._element,mn,{relatedTarget:t})}),this._dialog,this._isAnimated())}_addEventListeners(){de.on(this._element,yn,(t=>{if("Escape"===t.key)return this._config.keyboard?(t.preventDefault(),void this.hide()):void this._triggerBackdropTransition()})),de.on(window,_n,(()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()})),de.on(this._element,vn,(t=>{de.one(this._element,bn,(e=>{this._element===t.target&&this._element===e.target&&("static"!==this._config.backdrop?this._config.backdrop&&this.hide():this._triggerBackdropTransition())}))}))}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(An),this._resetAdjustments(),this._scrollBar.reset(),de.trigger(this._element,pn)}))}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(de.trigger(this._element,fn).defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._element.style.overflowY;"hidden"===e||this._element.classList.contains(Cn)||(t||(this._element.style.overflowY="hidden"),this._element.classList.add(Cn),this._queueCallback((()=>{this._element.classList.remove(Cn),this._queueCallback((()=>{this._element.style.overflowY=e}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;if(i&&!t){const t=Kt()?"paddingLeft":"paddingRight";this._element.style[t]=`${e}px`}if(!i&&t){const t=Kt()?"paddingRight":"paddingLeft";this._element.style[t]=`${e}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=xn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}de.on(document,wn,'[data-bs-toggle="modal"]',(function(t){const e=Pt(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),de.one(e,gn,(t=>{t.defaultPrevented||de.one(e,pn,(()=>{Wt(this)&&this.focus()}))}));const i=ke.findOne(".modal.show");i&&xn.getInstance(i).hide(),xn.getOrCreateInstance(e).toggle(this)})),we(xn),Qt(xn);const kn=".bs.offcanvas",Ln=".data-api",Dn=`load${kn}${Ln}`,$n="show",Sn="showing",In="hiding",Nn=".offcanvas.show",Pn=`show${kn}`,jn=`shown${kn}`,Mn=`hide${kn}`,Hn=`hidePrevented${kn}`,Wn=`hidden${kn}`,Fn=`resize${kn}`,Bn=`click${kn}${Ln}`,zn=`keydown.dismiss${kn}`,qn={backdrop:!0,keyboard:!0,scroll:!1},Rn={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class Vn extends ye{constructor(t,e){super(t,e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return qn}static get DefaultType(){return Rn}static get NAME(){return"offcanvas"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||de.trigger(this._element,Pn,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||(new Ui).hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Sn),this._queueCallback((()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add($n),this._element.classList.remove(Sn),de.trigger(this._element,jn,{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&(de.trigger(this._element,Mn).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(In),this._backdrop.hide(),this._queueCallback((()=>{this._element.classList.remove($n,In),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||(new Ui).reset(),de.trigger(this._element,Wn)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=Boolean(this._config.backdrop);return new nn({className:"offcanvas-backdrop",isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?()=>{"static"!==this._config.backdrop?this.hide():de.trigger(this._element,Hn)}:null})}_initializeFocusTrap(){return new hn({trapElement:this._element})}_addEventListeners(){de.on(this._element,zn,(t=>{"Escape"===t.key&&(this._config.keyboard?this.hide():de.trigger(this._element,Hn))}))}static jQueryInterface(t){return this.each((function(){const e=Vn.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}de.on(document,Bn,'[data-bs-toggle="offcanvas"]',(function(t){const e=Pt(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Ft(this))return;de.one(e,Wn,(()=>{Wt(this)&&this.focus()}));const i=ke.findOne(Nn);i&&i!==e&&Vn.getInstance(i).hide(),Vn.getOrCreateInstance(e).toggle(this)})),de.on(window,Dn,(()=>{for(const t of ke.find(Nn))Vn.getOrCreateInstance(t).show()})),de.on(window,Fn,(()=>{for(const t of ke.find("[aria-modal][class*=show][class*=offcanvas-]"))"fixed"!==getComputedStyle(t).position&&Vn.getOrCreateInstance(t).hide()})),we(Vn),Qt(Vn);const Kn=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Qn=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,Xn=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Yn=(t,e)=>{const i=t.nodeName.toLowerCase();return e.includes(i)?!Kn.has(i)||Boolean(Qn.test(t.nodeValue)||Xn.test(t.nodeValue)):e.filter((t=>t instanceof RegExp)).some((t=>t.test(i)))},Un={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Gn={allowList:Un,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Jn={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},Zn={entry:"(string|element|function|null)",selector:"(string|element)"};class ts extends ve{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Gn}static get DefaultType(){return Jn}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map((t=>this._resolvePossibleFunction(t))).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[e,i]of Object.entries(this._config.content))this._setContent(t,i,e);const e=t.children[0],i=this._resolvePossibleFunction(this._config.extraClass);return i&&e.classList.add(...i.split(" ")),e}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[e,i]of Object.entries(t))super._typeCheckConfig({selector:e,entry:i},Zn)}_setContent(t,e,i){const n=ke.findOne(i,t);n&&((e=this._resolvePossibleFunction(e))?Mt(e)?this._putElementInTemplate(Ht(e),n):this._config.html?n.innerHTML=this._maybeSanitize(e):n.textContent=e:n.remove())}_maybeSanitize(t){return this._config.sanitize?function(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=[].concat(...n.body.querySelectorAll("*"));for(const t of s){const i=t.nodeName.toLowerCase();if(!Object.keys(e).includes(i)){t.remove();continue}const n=[].concat(...t.attributes),s=[].concat(e["*"]||[],e[i]||[]);for(const e of n)Yn(e,s)||t.removeAttribute(e.nodeName)}return n.body.innerHTML}(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return"function"==typeof t?t(this):t}_putElementInTemplate(t,e){if(this._config.html)return e.innerHTML="",void e.append(t);e.textContent=t.textContent}}const es=new Set(["sanitize","allowList","sanitizeFn"]),is="fade",ns="show",ss=".modal",os="hide.bs.modal",rs="hover",as="focus",ls={AUTO:"auto",TOP:"top",RIGHT:Kt()?"left":"right",BOTTOM:"bottom",LEFT:Kt()?"right":"left"},cs={allowList:Un,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,0],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},hs={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class us extends ye{constructor(t,i){if(void 0===e)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,i),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return cs}static get DefaultType(){return hs}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),de.off(this._element.closest(ss),os,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const t=de.trigger(this._element,this.constructor.eventName("show")),e=(Bt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!e)return;this._disposePopper();const i=this._getTipElement();this._element.setAttribute("aria-describedby",i.getAttribute("id"));const{container:n}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(n.append(i),de.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(i),i.classList.add(ns),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))de.on(t,"mouseover",zt);this._queueCallback((()=>{de.trigger(this._element,this.constructor.eventName("shown")),!1===this._isHovered&&this._leave(),this._isHovered=!1}),this.tip,this._isAnimated())}hide(){if(this._isShown()&&!de.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(ns),"ontouchstart"in document.documentElement)for(const t of[].concat(...document.body.children))de.off(t,"mouseover",zt);this._activeTrigger.click=!1,this._activeTrigger[as]=!1,this._activeTrigger[rs]=!1,this._isHovered=null,this._queueCallback((()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),de.trigger(this._element,this.constructor.eventName("hidden")))}),this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return Boolean(this._getTitle())}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const e=this._getTemplateFactory(t).toHtml();if(!e)return null;e.classList.remove(is,ns),e.classList.add(`bs-${this.constructor.NAME}-auto`);const i=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME).toString();return e.setAttribute("id",i),this._isAnimated()&&e.classList.add(is),e}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new ts({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(is)}_isShown(){return this.tip&&this.tip.classList.contains(ns)}_createPopper(t){const e="function"==typeof this._config.placement?this._config.placement.call(this,t,this._element):this._config.placement,i=ls[e.toUpperCase()];return Dt(this._element,t,this._getPopperConfig(i))}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:t=>{this._getTipElement().setAttribute("data-popper-placement",t.state.placement)}}]};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_setListeners(){const t=this._config.trigger.split(" ");for(const e of t)if("click"===e)de.on(this._element,this.constructor.eventName("click"),this._config.selector,(t=>{this._initializeOnDelegatedTarget(t).toggle()}));else if("manual"!==e){const t=e===rs?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),i=e===rs?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");de.on(this._element,t,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusin"===t.type?as:rs]=!0,e._enter()})),de.on(this._element,i,this._config.selector,(t=>{const e=this._initializeOnDelegatedTarget(t);e._activeTrigger["focusout"===t.type?as:rs]=e._element.contains(t.relatedTarget),e._leave()}))}this._hideModalHandler=()=>{this._element&&this.hide()},de.on(this._element.closest(ss),os,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout((()=>{this._isHovered&&this.show()}),this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout((()=>{this._isHovered||this.hide()}),this._config.delay.hide))}_setTimeout(t,e){clearTimeout(this._timeout),this._timeout=setTimeout(t,e)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const e=be.getDataAttributes(this._element);for(const t of Object.keys(e))es.has(t)&&delete e[t];return t={...e,..."object"==typeof t&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=!1===t.container?document.body:Ht(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each((function(){const e=us.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Qt(us);const ds={...us.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},fs={...us.DefaultType,content:"(null|string|element|function)"};class ps extends us{static get Default(){return ds}static get DefaultType(){return fs}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each((function(){const e=ps.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}Qt(ps);const gs=".bs.scrollspy",ms=`activate${gs}`,_s=`click${gs}`,bs=`load${gs}.data-api`,vs="active",ys="[href]",ws=".nav-link",As=`${ws}, .nav-item > ${ws}, .list-group-item`,Es={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Cs={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Ts extends ye{constructor(t,e){super(t,e),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement="visible"===getComputedStyle(this._element).overflowY?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Es}static get DefaultType(){return Cs}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Ht(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,"string"==typeof t.threshold&&(t.threshold=t.threshold.split(",").map((t=>Number.parseFloat(t)))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(de.off(this._config.target,_s),de.on(this._config.target,_s,ys,(t=>{const e=this._observableSections.get(t.target.hash);if(e){t.preventDefault();const i=this._rootElement||window,n=e.offsetTop-this._element.offsetTop;if(i.scrollTo)return void i.scrollTo({top:n,behavior:"smooth"});i.scrollTop=n}})))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver((t=>this._observerCallback(t)),t)}_observerCallback(t){const e=t=>this._targetLinks.get(`#${t.target.id}`),i=t=>{this._previousScrollData.visibleEntryTop=t.target.offsetTop,this._process(e(t))},n=(this._rootElement||document.documentElement).scrollTop,s=n>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=n;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(e(o));continue}const t=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(s&&t){if(i(o),!n)return}else s||t||i(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=ke.find(ys,this._config.target);for(const e of t){if(!e.hash||Ft(e))continue;const t=ke.findOne(e.hash,this._element);Wt(t)&&(this._targetLinks.set(e.hash,e),this._observableSections.set(e.hash,t))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(vs),this._activateParents(t),de.trigger(this._element,ms,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains("dropdown-item"))ke.findOne(".dropdown-toggle",t.closest(".dropdown")).classList.add(vs);else for(const e of ke.parents(t,".nav, .list-group"))for(const t of ke.prev(e,As))t.classList.add(vs)}_clearActiveClass(t){t.classList.remove(vs);const e=ke.find(`${ys}.${vs}`,t);for(const t of e)t.classList.remove(vs)}static jQueryInterface(t){return this.each((function(){const e=Ts.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}de.on(window,bs,(()=>{for(const t of ke.find('[data-bs-spy="scroll"]'))Ts.getOrCreateInstance(t)})),Qt(Ts);const Os=".bs.tab",xs=`hide${Os}`,ks=`hidden${Os}`,Ls=`show${Os}`,Ds=`shown${Os}`,$s=`click${Os}`,Ss=`keydown${Os}`,Is=`load${Os}`,Ns="ArrowLeft",Ps="ArrowRight",js="ArrowUp",Ms="ArrowDown",Hs="active",Ws="fade",Fs="show",Bs=":not(.dropdown-toggle)",zs='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',qs=`.nav-link${Bs}, .list-group-item${Bs}, [role="tab"]${Bs}, ${zs}`,Rs=`.${Hs}[data-bs-toggle="tab"], .${Hs}[data-bs-toggle="pill"], .${Hs}[data-bs-toggle="list"]`;class Vs extends ye{constructor(t){super(t),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),de.on(this._element,Ss,(t=>this._keydown(t))))}static get NAME(){return"tab"}show(){const t=this._element;if(this._elemIsActive(t))return;const e=this._getActiveElem(),i=e?de.trigger(e,xs,{relatedTarget:t}):null;de.trigger(t,Ls,{relatedTarget:e}).defaultPrevented||i&&i.defaultPrevented||(this._deactivate(e,t),this._activate(t,e))}_activate(t,e){t&&(t.classList.add(Hs),this._activate(Pt(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),de.trigger(t,Ds,{relatedTarget:e})):t.classList.add(Fs)}),t,t.classList.contains(Ws)))}_deactivate(t,e){t&&(t.classList.remove(Hs),t.blur(),this._deactivate(Pt(t)),this._queueCallback((()=>{"tab"===t.getAttribute("role")?(t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),de.trigger(t,ks,{relatedTarget:e})):t.classList.remove(Fs)}),t,t.classList.contains(Ws)))}_keydown(t){if(![Ns,Ps,js,Ms].includes(t.key))return;t.stopPropagation(),t.preventDefault();const e=[Ps,Ms].includes(t.key),i=Ut(this._getChildren().filter((t=>!Ft(t))),t.target,e,!0);i&&(i.focus({preventScroll:!0}),Vs.getOrCreateInstance(i).show())}_getChildren(){return ke.find(qs,this._parent)}_getActiveElem(){return this._getChildren().find((t=>this._elemIsActive(t)))||null}_setInitialAttributes(t,e){this._setAttributeIfNotExists(t,"role","tablist");for(const t of e)this._setInitialAttributesOnChild(t)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const e=this._elemIsActive(t),i=this._getOuterElement(t);t.setAttribute("aria-selected",e),i!==t&&this._setAttributeIfNotExists(i,"role","presentation"),e||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const e=Pt(t);e&&(this._setAttributeIfNotExists(e,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(e,"aria-labelledby",`#${t.id}`))}_toggleDropDown(t,e){const i=this._getOuterElement(t);if(!i.classList.contains("dropdown"))return;const n=(t,n)=>{const s=ke.findOne(t,i);s&&s.classList.toggle(n,e)};n(".dropdown-toggle",Hs),n(".dropdown-menu",Fs),i.setAttribute("aria-expanded",e)}_setAttributeIfNotExists(t,e,i){t.hasAttribute(e)||t.setAttribute(e,i)}_elemIsActive(t){return t.classList.contains(Hs)}_getInnerElement(t){return t.matches(qs)?t:ke.findOne(qs,t)}_getOuterElement(t){return t.closest(".nav-item, .list-group-item")||t}static jQueryInterface(t){return this.each((function(){const e=Vs.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t]()}}))}}de.on(document,$s,zs,(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),Ft(this)||Vs.getOrCreateInstance(this).show()})),de.on(window,Is,(()=>{for(const t of ke.find(Rs))Vs.getOrCreateInstance(t)})),Qt(Vs);const Ks=".bs.toast",Qs=`mouseover${Ks}`,Xs=`mouseout${Ks}`,Ys=`focusin${Ks}`,Us=`focusout${Ks}`,Gs=`hide${Ks}`,Js=`hidden${Ks}`,Zs=`show${Ks}`,to=`shown${Ks}`,eo="hide",io="show",no="showing",so={animation:"boolean",autohide:"boolean",delay:"number"},oo={animation:!0,autohide:!0,delay:5e3};class ro extends ye{constructor(t,e){super(t,e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return oo}static get DefaultType(){return so}static get NAME(){return"toast"}show(){de.trigger(this._element,Zs).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(eo),qt(this._element),this._element.classList.add(io,no),this._queueCallback((()=>{this._element.classList.remove(no),de.trigger(this._element,to),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this.isShown()&&(de.trigger(this._element,Gs).defaultPrevented||(this._element.classList.add(no),this._queueCallback((()=>{this._element.classList.add(eo),this._element.classList.remove(no,io),de.trigger(this._element,Js)}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(io),super.dispose()}isShown(){return this._element.classList.contains(io)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){de.on(this._element,Qs,(t=>this._onInteraction(t,!0))),de.on(this._element,Xs,(t=>this._onInteraction(t,!1))),de.on(this._element,Ys,(t=>this._onInteraction(t,!0))),de.on(this._element,Us,(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=ro.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}var ao;we(ro),Qt(ro),ao=function(){[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).map((function(t){return new us(t,{delay:{show:500,hide:100}})}))},"loading"!=document.readyState?ao():document.addEventListener("DOMContentLoaded",ao)})(); +//# sourceMappingURL=bootstrap.js.map \ No newline at end of file diff --git a/version/0.3/_static/scripts/bootstrap.js.LICENSE.txt b/version/0.3/_static/scripts/bootstrap.js.LICENSE.txt new file mode 100644 index 000000000..91ad10aa0 --- /dev/null +++ b/version/0.3/_static/scripts/bootstrap.js.LICENSE.txt @@ -0,0 +1,5 @@ +/*! + * Bootstrap v5.2.3 (https://getbootstrap.com/) + * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ diff --git a/version/0.3/_static/scripts/bootstrap.js.map b/version/0.3/_static/scripts/bootstrap.js.map new file mode 100644 index 000000000..d83e2f7cd --- /dev/null +++ b/version/0.3/_static/scripts/bootstrap.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripts/bootstrap.js","mappings":";mBACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,ipBCLvD,IAAI,EAAM,MACNC,EAAS,SACTC,EAAQ,QACRC,EAAO,OACPC,EAAO,OACPC,EAAiB,CAAC,EAAKJ,EAAQC,EAAOC,GACtCG,EAAQ,QACRC,EAAM,MACNC,EAAkB,kBAClBC,EAAW,WACXC,EAAS,SACTC,EAAY,YACZC,EAAmCP,EAAeQ,QAAO,SAAUC,EAAKC,GACjF,OAAOD,EAAIE,OAAO,CAACD,EAAY,IAAMT,EAAOS,EAAY,IAAMR,GAChE,GAAG,IACQ,EAA0B,GAAGS,OAAOX,EAAgB,CAACD,IAAOS,QAAO,SAAUC,EAAKC,GAC3F,OAAOD,EAAIE,OAAO,CAACD,EAAWA,EAAY,IAAMT,EAAOS,EAAY,IAAMR,GAC3E,GAAG,IAEQU,EAAa,aACbC,EAAO,OACPC,EAAY,YAEZC,EAAa,aACbC,EAAO,OACPC,EAAY,YAEZC,EAAc,cACdC,EAAQ,QACRC,EAAa,aACbC,EAAiB,CAACT,EAAYC,EAAMC,EAAWC,EAAYC,EAAMC,EAAWC,EAAaC,EAAOC,GC9B5F,SAASE,EAAYC,GAClC,OAAOA,GAAWA,EAAQC,UAAY,IAAIC,cAAgB,IAC5D,CCFe,SAASC,EAAUC,GAChC,GAAY,MAARA,EACF,OAAOC,OAGT,GAAwB,oBAApBD,EAAKE,WAAkC,CACzC,IAAIC,EAAgBH,EAAKG,cACzB,OAAOA,GAAgBA,EAAcC,aAAwBH,MAC/D,CAEA,OAAOD,CACT,CCTA,SAASK,EAAUL,GAEjB,OAAOA,aADUD,EAAUC,GAAMM,SACIN,aAAgBM,OACvD,CAEA,SAASC,EAAcP,GAErB,OAAOA,aADUD,EAAUC,GAAMQ,aACIR,aAAgBQ,WACvD,CAEA,SAASC,EAAaT,GAEpB,MAA0B,oBAAfU,aAKJV,aADUD,EAAUC,GAAMU,YACIV,aAAgBU,WACvD,CCwDA,SACEC,KAAM,cACNC,SAAS,EACTC,MAAO,QACPC,GA5EF,SAAqBC,GACnB,IAAIC,EAAQD,EAAKC,MACjB3D,OAAO4D,KAAKD,EAAME,UAAUC,SAAQ,SAAUR,GAC5C,IAAIS,EAAQJ,EAAMK,OAAOV,IAAS,CAAC,EAC/BW,EAAaN,EAAMM,WAAWX,IAAS,CAAC,EACxCf,EAAUoB,EAAME,SAASP,GAExBJ,EAAcX,IAAaD,EAAYC,KAO5CvC,OAAOkE,OAAO3B,EAAQwB,MAAOA,GAC7B/D,OAAO4D,KAAKK,GAAYH,SAAQ,SAAUR,GACxC,IAAI3C,EAAQsD,EAAWX,IAET,IAAV3C,EACF4B,EAAQ4B,gBAAgBb,GAExBf,EAAQ6B,aAAad,GAAgB,IAAV3C,EAAiB,GAAKA,EAErD,IACF,GACF,EAoDE0D,OAlDF,SAAgBC,GACd,IAAIX,EAAQW,EAAMX,MACdY,EAAgB,CAClBlD,OAAQ,CACNmD,SAAUb,EAAMc,QAAQC,SACxB5D,KAAM,IACN6D,IAAK,IACLC,OAAQ,KAEVC,MAAO,CACLL,SAAU,YAEZlD,UAAW,CAAC,GASd,OAPAtB,OAAOkE,OAAOP,EAAME,SAASxC,OAAO0C,MAAOQ,EAAclD,QACzDsC,EAAMK,OAASO,EAEXZ,EAAME,SAASgB,OACjB7E,OAAOkE,OAAOP,EAAME,SAASgB,MAAMd,MAAOQ,EAAcM,OAGnD,WACL7E,OAAO4D,KAAKD,EAAME,UAAUC,SAAQ,SAAUR,GAC5C,IAAIf,EAAUoB,EAAME,SAASP,GACzBW,EAAaN,EAAMM,WAAWX,IAAS,CAAC,EAGxCS,EAFkB/D,OAAO4D,KAAKD,EAAMK,OAAOzD,eAAe+C,GAAQK,EAAMK,OAAOV,GAAQiB,EAAcjB,IAE7E9B,QAAO,SAAUuC,EAAOe,GAElD,OADAf,EAAMe,GAAY,GACXf,CACT,GAAG,CAAC,GAECb,EAAcX,IAAaD,EAAYC,KAI5CvC,OAAOkE,OAAO3B,EAAQwB,MAAOA,GAC7B/D,OAAO4D,KAAKK,GAAYH,SAAQ,SAAUiB,GACxCxC,EAAQ4B,gBAAgBY,EAC1B,IACF,GACF,CACF,EASEC,SAAU,CAAC,kBCjFE,SAASC,EAAiBvD,GACvC,OAAOA,EAAUwD,MAAM,KAAK,EAC9B,CCHO,IAAI,EAAMC,KAAKC,IACX,EAAMD,KAAKE,IACXC,EAAQH,KAAKG,MCFT,SAASC,IACtB,IAAIC,EAASC,UAAUC,cAEvB,OAAc,MAAVF,GAAkBA,EAAOG,QAAUC,MAAMC,QAAQL,EAAOG,QACnDH,EAAOG,OAAOG,KAAI,SAAUC,GACjC,OAAOA,EAAKC,MAAQ,IAAMD,EAAKE,OACjC,IAAGC,KAAK,KAGHT,UAAUU,SACnB,CCTe,SAASC,IACtB,OAAQ,iCAAiCC,KAAKd,IAChD,CCCe,SAASe,EAAsB/D,EAASgE,EAAcC,QAC9C,IAAjBD,IACFA,GAAe,QAGO,IAApBC,IACFA,GAAkB,GAGpB,IAAIC,EAAalE,EAAQ+D,wBACrBI,EAAS,EACTC,EAAS,EAETJ,GAAgBrD,EAAcX,KAChCmE,EAASnE,EAAQqE,YAAc,GAAItB,EAAMmB,EAAWI,OAAStE,EAAQqE,aAAmB,EACxFD,EAASpE,EAAQuE,aAAe,GAAIxB,EAAMmB,EAAWM,QAAUxE,EAAQuE,cAAoB,GAG7F,IACIE,GADOhE,EAAUT,GAAWG,EAAUH,GAAWK,QAC3BoE,eAEtBC,GAAoBb,KAAsBI,EAC1CU,GAAKT,EAAW3F,MAAQmG,GAAoBD,EAAiBA,EAAeG,WAAa,IAAMT,EAC/FU,GAAKX,EAAW9B,KAAOsC,GAAoBD,EAAiBA,EAAeK,UAAY,IAAMV,EAC7FE,EAAQJ,EAAWI,MAAQH,EAC3BK,EAASN,EAAWM,OAASJ,EACjC,MAAO,CACLE,MAAOA,EACPE,OAAQA,EACRpC,IAAKyC,EACLvG,MAAOqG,EAAIL,EACXjG,OAAQwG,EAAIL,EACZjG,KAAMoG,EACNA,EAAGA,EACHE,EAAGA,EAEP,CCrCe,SAASE,EAAc/E,GACpC,IAAIkE,EAAaH,EAAsB/D,GAGnCsE,EAAQtE,EAAQqE,YAChBG,EAASxE,EAAQuE,aAUrB,OARI3B,KAAKoC,IAAId,EAAWI,MAAQA,IAAU,IACxCA,EAAQJ,EAAWI,OAGjB1B,KAAKoC,IAAId,EAAWM,OAASA,IAAW,IAC1CA,EAASN,EAAWM,QAGf,CACLG,EAAG3E,EAAQ4E,WACXC,EAAG7E,EAAQ8E,UACXR,MAAOA,EACPE,OAAQA,EAEZ,CCvBe,SAASS,EAASC,EAAQC,GACvC,IAAIC,EAAWD,EAAME,aAAeF,EAAME,cAE1C,GAAIH,EAAOD,SAASE,GAClB,OAAO,EAEJ,GAAIC,GAAYvE,EAAauE,GAAW,CACzC,IAAIE,EAAOH,EAEX,EAAG,CACD,GAAIG,GAAQJ,EAAOK,WAAWD,GAC5B,OAAO,EAITA,EAAOA,EAAKE,YAAcF,EAAKG,IACjC,OAASH,EACX,CAGF,OAAO,CACT,CCrBe,SAAS,EAAiBtF,GACvC,OAAOG,EAAUH,GAAS0F,iBAAiB1F,EAC7C,CCFe,SAAS2F,EAAe3F,GACrC,MAAO,CAAC,QAAS,KAAM,MAAM4F,QAAQ7F,EAAYC,KAAa,CAChE,CCFe,SAAS6F,EAAmB7F,GAEzC,QAASS,EAAUT,GAAWA,EAAQO,cACtCP,EAAQ8F,WAAazF,OAAOyF,UAAUC,eACxC,CCFe,SAASC,EAAchG,GACpC,MAA6B,SAAzBD,EAAYC,GACPA,EAMPA,EAAQiG,cACRjG,EAAQwF,aACR3E,EAAab,GAAWA,EAAQyF,KAAO,OAEvCI,EAAmB7F,EAGvB,CCVA,SAASkG,EAAoBlG,GAC3B,OAAKW,EAAcX,IACoB,UAAvC,EAAiBA,GAASiC,SAInBjC,EAAQmG,aAHN,IAIX,CAwCe,SAASC,EAAgBpG,GAItC,IAHA,IAAIK,EAASF,EAAUH,GACnBmG,EAAeD,EAAoBlG,GAEhCmG,GAAgBR,EAAeQ,IAA6D,WAA5C,EAAiBA,GAAclE,UACpFkE,EAAeD,EAAoBC,GAGrC,OAAIA,IAA+C,SAA9BpG,EAAYoG,IAA0D,SAA9BpG,EAAYoG,IAAwE,WAA5C,EAAiBA,GAAclE,UAC3H5B,EAGF8F,GAhDT,SAA4BnG,GAC1B,IAAIqG,EAAY,WAAWvC,KAAKd,KAGhC,GAFW,WAAWc,KAAKd,MAEfrC,EAAcX,IAII,UAFX,EAAiBA,GAEnBiC,SACb,OAAO,KAIX,IAAIqE,EAAcN,EAAchG,GAMhC,IAJIa,EAAayF,KACfA,EAAcA,EAAYb,MAGrB9E,EAAc2F,IAAgB,CAAC,OAAQ,QAAQV,QAAQ7F,EAAYuG,IAAgB,GAAG,CAC3F,IAAIC,EAAM,EAAiBD,GAI3B,GAAsB,SAAlBC,EAAIC,WAA4C,SAApBD,EAAIE,aAA0C,UAAhBF,EAAIG,UAAiF,IAA1D,CAAC,YAAa,eAAed,QAAQW,EAAII,aAAsBN,GAAgC,WAAnBE,EAAII,YAA2BN,GAAaE,EAAIK,QAAyB,SAAfL,EAAIK,OACjO,OAAON,EAEPA,EAAcA,EAAYd,UAE9B,CAEA,OAAO,IACT,CAgByBqB,CAAmB7G,IAAYK,CACxD,CCpEe,SAASyG,EAAyB3H,GAC/C,MAAO,CAAC,MAAO,UAAUyG,QAAQzG,IAAc,EAAI,IAAM,GAC3D,CCDO,SAAS4H,EAAOjE,EAAK1E,EAAOyE,GACjC,OAAO,EAAQC,EAAK,EAAQ1E,EAAOyE,GACrC,CCFe,SAASmE,EAAmBC,GACzC,OAAOxJ,OAAOkE,OAAO,CAAC,ECDf,CACLS,IAAK,EACL9D,MAAO,EACPD,OAAQ,EACRE,KAAM,GDHuC0I,EACjD,CEHe,SAASC,EAAgB9I,EAAOiD,GAC7C,OAAOA,EAAKpC,QAAO,SAAUkI,EAAS5J,GAEpC,OADA4J,EAAQ5J,GAAOa,EACR+I,CACT,GAAG,CAAC,EACN,CCuFA,SACEpG,KAAM,QACNC,SAAS,EACTC,MAAO,OACPC,GA9EF,SAAeC,GACb,IAAIiG,EAEAhG,EAAQD,EAAKC,MACbL,EAAOI,EAAKJ,KACZmB,EAAUf,EAAKe,QACfmF,EAAejG,EAAME,SAASgB,MAC9BgF,EAAgBlG,EAAMmG,cAAcD,cACpCE,EAAgB9E,EAAiBtB,EAAMjC,WACvCsI,EAAOX,EAAyBU,GAEhCE,EADa,CAACnJ,EAAMD,GAAOsH,QAAQ4B,IAAkB,EAClC,SAAW,QAElC,GAAKH,GAAiBC,EAAtB,CAIA,IAAIL,EAxBgB,SAAyBU,EAASvG,GAItD,OAAO4F,EAAsC,iBAH7CW,EAA6B,mBAAZA,EAAyBA,EAAQlK,OAAOkE,OAAO,CAAC,EAAGP,EAAMwG,MAAO,CAC/EzI,UAAWiC,EAAMjC,aACbwI,GACkDA,EAAUT,EAAgBS,EAASlJ,GAC7F,CAmBsBoJ,CAAgB3F,EAAQyF,QAASvG,GACjD0G,EAAY/C,EAAcsC,GAC1BU,EAAmB,MAATN,EAAe,EAAMlJ,EAC/ByJ,EAAmB,MAATP,EAAepJ,EAASC,EAClC2J,EAAU7G,EAAMwG,MAAM7I,UAAU2I,GAAOtG,EAAMwG,MAAM7I,UAAU0I,GAAQH,EAAcG,GAAQrG,EAAMwG,MAAM9I,OAAO4I,GAC9GQ,EAAYZ,EAAcG,GAAQrG,EAAMwG,MAAM7I,UAAU0I,GACxDU,EAAoB/B,EAAgBiB,GACpCe,EAAaD,EAA6B,MAATV,EAAeU,EAAkBE,cAAgB,EAAIF,EAAkBG,aAAe,EAAI,EAC3HC,EAAoBN,EAAU,EAAIC,EAAY,EAG9CpF,EAAMmE,EAAcc,GACpBlF,EAAMuF,EAAaN,EAAUJ,GAAOT,EAAce,GAClDQ,EAASJ,EAAa,EAAIN,EAAUJ,GAAO,EAAIa,EAC/CE,EAAS1B,EAAOjE,EAAK0F,EAAQ3F,GAE7B6F,EAAWjB,EACfrG,EAAMmG,cAAcxG,KAASqG,EAAwB,CAAC,GAAyBsB,GAAYD,EAAQrB,EAAsBuB,aAAeF,EAASD,EAAQpB,EAnBzJ,CAoBF,EA4CEtF,OA1CF,SAAgBC,GACd,IAAIX,EAAQW,EAAMX,MAEdwH,EADU7G,EAAMG,QACWlC,QAC3BqH,OAAoC,IAArBuB,EAA8B,sBAAwBA,EAErD,MAAhBvB,IAKwB,iBAAjBA,IACTA,EAAejG,EAAME,SAASxC,OAAO+J,cAAcxB,MAahDpC,EAAS7D,EAAME,SAASxC,OAAQuI,KAQrCjG,EAAME,SAASgB,MAAQ+E,EACzB,EASE5E,SAAU,CAAC,iBACXqG,iBAAkB,CAAC,oBCnGN,SAASC,EAAa5J,GACnC,OAAOA,EAAUwD,MAAM,KAAK,EAC9B,CCOA,IAAIqG,EAAa,CACf5G,IAAK,OACL9D,MAAO,OACPD,OAAQ,OACRE,KAAM,QAeD,SAAS0K,GAAYlH,GAC1B,IAAImH,EAEApK,EAASiD,EAAMjD,OACfqK,EAAapH,EAAMoH,WACnBhK,EAAY4C,EAAM5C,UAClBiK,EAAYrH,EAAMqH,UAClBC,EAAUtH,EAAMsH,QAChBpH,EAAWF,EAAME,SACjBqH,EAAkBvH,EAAMuH,gBACxBC,EAAWxH,EAAMwH,SACjBC,EAAezH,EAAMyH,aACrBC,EAAU1H,EAAM0H,QAChBC,EAAaL,EAAQ1E,EACrBA,OAAmB,IAAf+E,EAAwB,EAAIA,EAChCC,EAAaN,EAAQxE,EACrBA,OAAmB,IAAf8E,EAAwB,EAAIA,EAEhCC,EAAgC,mBAAjBJ,EAA8BA,EAAa,CAC5D7E,EAAGA,EACHE,IACG,CACHF,EAAGA,EACHE,GAGFF,EAAIiF,EAAMjF,EACVE,EAAI+E,EAAM/E,EACV,IAAIgF,EAAOR,EAAQrL,eAAe,KAC9B8L,EAAOT,EAAQrL,eAAe,KAC9B+L,EAAQxL,EACRyL,EAAQ,EACRC,EAAM5J,OAEV,GAAIkJ,EAAU,CACZ,IAAIpD,EAAeC,EAAgBtH,GAC/BoL,EAAa,eACbC,EAAY,cAEZhE,IAAiBhG,EAAUrB,IAGmB,WAA5C,EAFJqH,EAAeN,EAAmB/G,IAECmD,UAAsC,aAAbA,IAC1DiI,EAAa,eACbC,EAAY,gBAOZhL,IAAc,IAAQA,IAAcZ,GAAQY,IAAcb,IAAU8K,IAAczK,KACpFqL,EAAQ3L,EAGRwG,IAFc4E,GAAWtD,IAAiB8D,GAAOA,EAAIxF,eAAiBwF,EAAIxF,eAAeD,OACzF2B,EAAa+D,IACEf,EAAW3E,OAC1BK,GAAKyE,EAAkB,GAAK,GAG1BnK,IAAcZ,IAASY,IAAc,GAAOA,IAAcd,GAAW+K,IAAczK,KACrFoL,EAAQzL,EAGRqG,IAFc8E,GAAWtD,IAAiB8D,GAAOA,EAAIxF,eAAiBwF,EAAIxF,eAAeH,MACzF6B,EAAagE,IACEhB,EAAW7E,MAC1BK,GAAK2E,EAAkB,GAAK,EAEhC,CAEA,IAgBMc,EAhBFC,EAAe5M,OAAOkE,OAAO,CAC/BM,SAAUA,GACTsH,GAAYP,GAEXsB,GAAyB,IAAjBd,EAlFd,SAA2BrI,EAAM8I,GAC/B,IAAItF,EAAIxD,EAAKwD,EACTE,EAAI1D,EAAK0D,EACT0F,EAAMN,EAAIO,kBAAoB,EAClC,MAAO,CACL7F,EAAG5B,EAAM4B,EAAI4F,GAAOA,GAAO,EAC3B1F,EAAG9B,EAAM8B,EAAI0F,GAAOA,GAAO,EAE/B,CA0EsCE,CAAkB,CACpD9F,EAAGA,EACHE,GACC1E,EAAUrB,IAAW,CACtB6F,EAAGA,EACHE,GAMF,OAHAF,EAAI2F,EAAM3F,EACVE,EAAIyF,EAAMzF,EAENyE,EAGK7L,OAAOkE,OAAO,CAAC,EAAG0I,IAAeD,EAAiB,CAAC,GAAkBJ,GAASF,EAAO,IAAM,GAAIM,EAAeL,GAASF,EAAO,IAAM,GAAIO,EAAe5D,WAAayD,EAAIO,kBAAoB,IAAM,EAAI,aAAe7F,EAAI,OAASE,EAAI,MAAQ,eAAiBF,EAAI,OAASE,EAAI,SAAUuF,IAG5R3M,OAAOkE,OAAO,CAAC,EAAG0I,IAAenB,EAAkB,CAAC,GAAmBc,GAASF,EAAOjF,EAAI,KAAO,GAAIqE,EAAgBa,GAASF,EAAOlF,EAAI,KAAO,GAAIuE,EAAgB1C,UAAY,GAAI0C,GAC9L,CAuDA,UACEnI,KAAM,gBACNC,SAAS,EACTC,MAAO,cACPC,GAzDF,SAAuBwJ,GACrB,IAAItJ,EAAQsJ,EAAMtJ,MACdc,EAAUwI,EAAMxI,QAChByI,EAAwBzI,EAAQoH,gBAChCA,OAA4C,IAA1BqB,GAA0CA,EAC5DC,EAAoB1I,EAAQqH,SAC5BA,OAAiC,IAAtBqB,GAAsCA,EACjDC,EAAwB3I,EAAQsH,aAChCA,OAAyC,IAA1BqB,GAA0CA,EAYzDR,EAAe,CACjBlL,UAAWuD,EAAiBtB,EAAMjC,WAClCiK,UAAWL,EAAa3H,EAAMjC,WAC9BL,OAAQsC,EAAME,SAASxC,OACvBqK,WAAY/H,EAAMwG,MAAM9I,OACxBwK,gBAAiBA,EACjBG,QAAoC,UAA3BrI,EAAMc,QAAQC,UAGgB,MAArCf,EAAMmG,cAAcD,gBACtBlG,EAAMK,OAAO3C,OAASrB,OAAOkE,OAAO,CAAC,EAAGP,EAAMK,OAAO3C,OAAQmK,GAAYxL,OAAOkE,OAAO,CAAC,EAAG0I,EAAc,CACvGhB,QAASjI,EAAMmG,cAAcD,cAC7BrF,SAAUb,EAAMc,QAAQC,SACxBoH,SAAUA,EACVC,aAAcA,OAIe,MAA7BpI,EAAMmG,cAAcjF,QACtBlB,EAAMK,OAAOa,MAAQ7E,OAAOkE,OAAO,CAAC,EAAGP,EAAMK,OAAOa,MAAO2G,GAAYxL,OAAOkE,OAAO,CAAC,EAAG0I,EAAc,CACrGhB,QAASjI,EAAMmG,cAAcjF,MAC7BL,SAAU,WACVsH,UAAU,EACVC,aAAcA,OAIlBpI,EAAMM,WAAW5C,OAASrB,OAAOkE,OAAO,CAAC,EAAGP,EAAMM,WAAW5C,OAAQ,CACnE,wBAAyBsC,EAAMjC,WAEnC,EAQE2L,KAAM,CAAC,GChLT,IAAIC,GAAU,CACZA,SAAS,GAsCX,UACEhK,KAAM,iBACNC,SAAS,EACTC,MAAO,QACPC,GAAI,WAAe,EACnBY,OAxCF,SAAgBX,GACd,IAAIC,EAAQD,EAAKC,MACb4J,EAAW7J,EAAK6J,SAChB9I,EAAUf,EAAKe,QACf+I,EAAkB/I,EAAQgJ,OAC1BA,OAA6B,IAApBD,GAAoCA,EAC7CE,EAAkBjJ,EAAQkJ,OAC1BA,OAA6B,IAApBD,GAAoCA,EAC7C9K,EAASF,EAAUiB,EAAME,SAASxC,QAClCuM,EAAgB,GAAGjM,OAAOgC,EAAMiK,cAActM,UAAWqC,EAAMiK,cAAcvM,QAYjF,OAVIoM,GACFG,EAAc9J,SAAQ,SAAU+J,GAC9BA,EAAaC,iBAAiB,SAAUP,EAASQ,OAAQT,GAC3D,IAGEK,GACF/K,EAAOkL,iBAAiB,SAAUP,EAASQ,OAAQT,IAG9C,WACDG,GACFG,EAAc9J,SAAQ,SAAU+J,GAC9BA,EAAaG,oBAAoB,SAAUT,EAASQ,OAAQT,GAC9D,IAGEK,GACF/K,EAAOoL,oBAAoB,SAAUT,EAASQ,OAAQT,GAE1D,CACF,EASED,KAAM,CAAC,GC/CT,IAAIY,GAAO,CACTnN,KAAM,QACND,MAAO,OACPD,OAAQ,MACR+D,IAAK,UAEQ,SAASuJ,GAAqBxM,GAC3C,OAAOA,EAAUyM,QAAQ,0BAA0B,SAAUC,GAC3D,OAAOH,GAAKG,EACd,GACF,CCVA,IAAI,GAAO,CACTnN,MAAO,MACPC,IAAK,SAEQ,SAASmN,GAA8B3M,GACpD,OAAOA,EAAUyM,QAAQ,cAAc,SAAUC,GAC/C,OAAO,GAAKA,EACd,GACF,CCPe,SAASE,GAAgB3L,GACtC,IAAI6J,EAAM9J,EAAUC,GAGpB,MAAO,CACL4L,WAHe/B,EAAIgC,YAInBC,UAHcjC,EAAIkC,YAKtB,CCNe,SAASC,GAAoBpM,GAQ1C,OAAO+D,EAAsB8B,EAAmB7F,IAAUzB,KAAOwN,GAAgB/L,GAASgM,UAC5F,CCXe,SAASK,GAAerM,GAErC,IAAIsM,EAAoB,EAAiBtM,GACrCuM,EAAWD,EAAkBC,SAC7BC,EAAYF,EAAkBE,UAC9BC,EAAYH,EAAkBG,UAElC,MAAO,6BAA6B3I,KAAKyI,EAAWE,EAAYD,EAClE,CCLe,SAASE,GAAgBtM,GACtC,MAAI,CAAC,OAAQ,OAAQ,aAAawF,QAAQ7F,EAAYK,KAAU,EAEvDA,EAAKG,cAAcoM,KAGxBhM,EAAcP,IAASiM,GAAejM,GACjCA,EAGFsM,GAAgB1G,EAAc5F,GACvC,CCJe,SAASwM,GAAkB5M,EAAS6M,GACjD,IAAIC,OAES,IAATD,IACFA,EAAO,IAGT,IAAIvB,EAAeoB,GAAgB1M,GAC/B+M,EAASzB,KAAqE,OAAlDwB,EAAwB9M,EAAQO,oBAAyB,EAASuM,EAAsBH,MACpH1C,EAAM9J,EAAUmL,GAChB0B,EAASD,EAAS,CAAC9C,GAAK7K,OAAO6K,EAAIxF,gBAAkB,GAAI4H,GAAef,GAAgBA,EAAe,IAAMA,EAC7G2B,EAAcJ,EAAKzN,OAAO4N,GAC9B,OAAOD,EAASE,EAChBA,EAAY7N,OAAOwN,GAAkB5G,EAAcgH,IACrD,CCzBe,SAASE,GAAiBC,GACvC,OAAO1P,OAAOkE,OAAO,CAAC,EAAGwL,EAAM,CAC7B5O,KAAM4O,EAAKxI,EACXvC,IAAK+K,EAAKtI,EACVvG,MAAO6O,EAAKxI,EAAIwI,EAAK7I,MACrBjG,OAAQ8O,EAAKtI,EAAIsI,EAAK3I,QAE1B,CCqBA,SAAS4I,GAA2BpN,EAASqN,EAAgBlL,GAC3D,OAAOkL,IAAmBxO,EAAWqO,GCzBxB,SAAyBlN,EAASmC,GAC/C,IAAI8H,EAAM9J,EAAUH,GAChBsN,EAAOzH,EAAmB7F,GAC1ByE,EAAiBwF,EAAIxF,eACrBH,EAAQgJ,EAAKhF,YACb9D,EAAS8I,EAAKjF,aACd1D,EAAI,EACJE,EAAI,EAER,GAAIJ,EAAgB,CAClBH,EAAQG,EAAeH,MACvBE,EAASC,EAAeD,OACxB,IAAI+I,EAAiB1J,KAEjB0J,IAAmBA,GAA+B,UAAbpL,KACvCwC,EAAIF,EAAeG,WACnBC,EAAIJ,EAAeK,UAEvB,CAEA,MAAO,CACLR,MAAOA,EACPE,OAAQA,EACRG,EAAGA,EAAIyH,GAAoBpM,GAC3B6E,EAAGA,EAEP,CDDwD2I,CAAgBxN,EAASmC,IAAa1B,EAAU4M,GAdxG,SAAoCrN,EAASmC,GAC3C,IAAIgL,EAAOpJ,EAAsB/D,GAAS,EAAoB,UAAbmC,GASjD,OARAgL,EAAK/K,IAAM+K,EAAK/K,IAAMpC,EAAQyN,UAC9BN,EAAK5O,KAAO4O,EAAK5O,KAAOyB,EAAQ0N,WAChCP,EAAK9O,OAAS8O,EAAK/K,IAAMpC,EAAQqI,aACjC8E,EAAK7O,MAAQ6O,EAAK5O,KAAOyB,EAAQsI,YACjC6E,EAAK7I,MAAQtE,EAAQsI,YACrB6E,EAAK3I,OAASxE,EAAQqI,aACtB8E,EAAKxI,EAAIwI,EAAK5O,KACd4O,EAAKtI,EAAIsI,EAAK/K,IACP+K,CACT,CAG0HQ,CAA2BN,EAAgBlL,GAAY+K,GEtBlK,SAAyBlN,GACtC,IAAI8M,EAEAQ,EAAOzH,EAAmB7F,GAC1B4N,EAAY7B,GAAgB/L,GAC5B2M,EAA0D,OAAlDG,EAAwB9M,EAAQO,oBAAyB,EAASuM,EAAsBH,KAChGrI,EAAQ,EAAIgJ,EAAKO,YAAaP,EAAKhF,YAAaqE,EAAOA,EAAKkB,YAAc,EAAGlB,EAAOA,EAAKrE,YAAc,GACvG9D,EAAS,EAAI8I,EAAKQ,aAAcR,EAAKjF,aAAcsE,EAAOA,EAAKmB,aAAe,EAAGnB,EAAOA,EAAKtE,aAAe,GAC5G1D,GAAKiJ,EAAU5B,WAAaI,GAAoBpM,GAChD6E,GAAK+I,EAAU1B,UAMnB,MAJiD,QAA7C,EAAiBS,GAAQW,GAAMS,YACjCpJ,GAAK,EAAI2I,EAAKhF,YAAaqE,EAAOA,EAAKrE,YAAc,GAAKhE,GAGrD,CACLA,MAAOA,EACPE,OAAQA,EACRG,EAAGA,EACHE,EAAGA,EAEP,CFCkMmJ,CAAgBnI,EAAmB7F,IACrO,CG1Be,SAASiO,GAAe9M,GACrC,IAOIkI,EAPAtK,EAAYoC,EAAKpC,UACjBiB,EAAUmB,EAAKnB,QACfb,EAAYgC,EAAKhC,UACjBqI,EAAgBrI,EAAYuD,EAAiBvD,GAAa,KAC1DiK,EAAYjK,EAAY4J,EAAa5J,GAAa,KAClD+O,EAAUnP,EAAU4F,EAAI5F,EAAUuF,MAAQ,EAAItE,EAAQsE,MAAQ,EAC9D6J,EAAUpP,EAAU8F,EAAI9F,EAAUyF,OAAS,EAAIxE,EAAQwE,OAAS,EAGpE,OAAQgD,GACN,KAAK,EACH6B,EAAU,CACR1E,EAAGuJ,EACHrJ,EAAG9F,EAAU8F,EAAI7E,EAAQwE,QAE3B,MAEF,KAAKnG,EACHgL,EAAU,CACR1E,EAAGuJ,EACHrJ,EAAG9F,EAAU8F,EAAI9F,EAAUyF,QAE7B,MAEF,KAAKlG,EACH+K,EAAU,CACR1E,EAAG5F,EAAU4F,EAAI5F,EAAUuF,MAC3BO,EAAGsJ,GAEL,MAEF,KAAK5P,EACH8K,EAAU,CACR1E,EAAG5F,EAAU4F,EAAI3E,EAAQsE,MACzBO,EAAGsJ,GAEL,MAEF,QACE9E,EAAU,CACR1E,EAAG5F,EAAU4F,EACbE,EAAG9F,EAAU8F,GAInB,IAAIuJ,EAAW5G,EAAgBV,EAAyBU,GAAiB,KAEzE,GAAgB,MAAZ4G,EAAkB,CACpB,IAAI1G,EAAmB,MAAb0G,EAAmB,SAAW,QAExC,OAAQhF,GACN,KAAK1K,EACH2K,EAAQ+E,GAAY/E,EAAQ+E,IAAarP,EAAU2I,GAAO,EAAI1H,EAAQ0H,GAAO,GAC7E,MAEF,KAAK/I,EACH0K,EAAQ+E,GAAY/E,EAAQ+E,IAAarP,EAAU2I,GAAO,EAAI1H,EAAQ0H,GAAO,GAKnF,CAEA,OAAO2B,CACT,CC3De,SAASgF,GAAejN,EAAOc,QAC5B,IAAZA,IACFA,EAAU,CAAC,GAGb,IAAIoM,EAAWpM,EACXqM,EAAqBD,EAASnP,UAC9BA,OAAmC,IAAvBoP,EAAgCnN,EAAMjC,UAAYoP,EAC9DC,EAAoBF,EAASnM,SAC7BA,OAAiC,IAAtBqM,EAA+BpN,EAAMe,SAAWqM,EAC3DC,EAAoBH,EAASI,SAC7BA,OAAiC,IAAtBD,EAA+B7P,EAAkB6P,EAC5DE,EAAwBL,EAASM,aACjCA,OAAyC,IAA1BD,EAAmC9P,EAAW8P,EAC7DE,EAAwBP,EAASQ,eACjCA,OAA2C,IAA1BD,EAAmC/P,EAAS+P,EAC7DE,EAAuBT,EAASU,YAChCA,OAAuC,IAAzBD,GAA0CA,EACxDE,EAAmBX,EAAS3G,QAC5BA,OAA+B,IAArBsH,EAA8B,EAAIA,EAC5ChI,EAAgBD,EAAsC,iBAAZW,EAAuBA,EAAUT,EAAgBS,EAASlJ,IACpGyQ,EAAaJ,IAAmBhQ,EAASC,EAAYD,EACrDqK,EAAa/H,EAAMwG,MAAM9I,OACzBkB,EAAUoB,EAAME,SAAS0N,EAAcE,EAAaJ,GACpDK,EJkBS,SAAyBnP,EAAS0O,EAAUE,EAAczM,GACvE,IAAIiN,EAAmC,oBAAbV,EAlB5B,SAA4B1O,GAC1B,IAAIpB,EAAkBgO,GAAkB5G,EAAchG,IAElDqP,EADoB,CAAC,WAAY,SAASzJ,QAAQ,EAAiB5F,GAASiC,WAAa,GACnDtB,EAAcX,GAAWoG,EAAgBpG,GAAWA,EAE9F,OAAKS,EAAU4O,GAKRzQ,EAAgBgI,QAAO,SAAUyG,GACtC,OAAO5M,EAAU4M,IAAmBpI,EAASoI,EAAgBgC,IAAmD,SAAhCtP,EAAYsN,EAC9F,IANS,EAOX,CAK6DiC,CAAmBtP,GAAW,GAAGZ,OAAOsP,GAC/F9P,EAAkB,GAAGQ,OAAOgQ,EAAqB,CAACR,IAClDW,EAAsB3Q,EAAgB,GACtC4Q,EAAe5Q,EAAgBK,QAAO,SAAUwQ,EAASpC,GAC3D,IAAIF,EAAOC,GAA2BpN,EAASqN,EAAgBlL,GAK/D,OAJAsN,EAAQrN,IAAM,EAAI+K,EAAK/K,IAAKqN,EAAQrN,KACpCqN,EAAQnR,MAAQ,EAAI6O,EAAK7O,MAAOmR,EAAQnR,OACxCmR,EAAQpR,OAAS,EAAI8O,EAAK9O,OAAQoR,EAAQpR,QAC1CoR,EAAQlR,KAAO,EAAI4O,EAAK5O,KAAMkR,EAAQlR,MAC/BkR,CACT,GAAGrC,GAA2BpN,EAASuP,EAAqBpN,IAK5D,OAJAqN,EAAalL,MAAQkL,EAAalR,MAAQkR,EAAajR,KACvDiR,EAAahL,OAASgL,EAAanR,OAASmR,EAAapN,IACzDoN,EAAa7K,EAAI6K,EAAajR,KAC9BiR,EAAa3K,EAAI2K,EAAapN,IACvBoN,CACT,CInC2BE,CAAgBjP,EAAUT,GAAWA,EAAUA,EAAQ2P,gBAAkB9J,EAAmBzE,EAAME,SAASxC,QAAS4P,EAAUE,EAAczM,GACjKyN,EAAsB7L,EAAsB3C,EAAME,SAASvC,WAC3DuI,EAAgB2G,GAAe,CACjClP,UAAW6Q,EACX5P,QAASmJ,EACThH,SAAU,WACVhD,UAAWA,IAET0Q,EAAmB3C,GAAiBzP,OAAOkE,OAAO,CAAC,EAAGwH,EAAY7B,IAClEwI,EAAoBhB,IAAmBhQ,EAAS+Q,EAAmBD,EAGnEG,EAAkB,CACpB3N,IAAK+M,EAAmB/M,IAAM0N,EAAkB1N,IAAM6E,EAAc7E,IACpE/D,OAAQyR,EAAkBzR,OAAS8Q,EAAmB9Q,OAAS4I,EAAc5I,OAC7EE,KAAM4Q,EAAmB5Q,KAAOuR,EAAkBvR,KAAO0I,EAAc1I,KACvED,MAAOwR,EAAkBxR,MAAQ6Q,EAAmB7Q,MAAQ2I,EAAc3I,OAExE0R,EAAa5O,EAAMmG,cAAckB,OAErC,GAAIqG,IAAmBhQ,GAAUkR,EAAY,CAC3C,IAAIvH,EAASuH,EAAW7Q,GACxB1B,OAAO4D,KAAK0O,GAAiBxO,SAAQ,SAAUhE,GAC7C,IAAI0S,EAAW,CAAC3R,EAAOD,GAAQuH,QAAQrI,IAAQ,EAAI,GAAK,EACpDkK,EAAO,CAAC,EAAKpJ,GAAQuH,QAAQrI,IAAQ,EAAI,IAAM,IACnDwS,EAAgBxS,IAAQkL,EAAOhB,GAAQwI,CACzC,GACF,CAEA,OAAOF,CACT,CCyEA,UACEhP,KAAM,OACNC,SAAS,EACTC,MAAO,OACPC,GA5HF,SAAcC,GACZ,IAAIC,EAAQD,EAAKC,MACbc,EAAUf,EAAKe,QACfnB,EAAOI,EAAKJ,KAEhB,IAAIK,EAAMmG,cAAcxG,GAAMmP,MAA9B,CAoCA,IAhCA,IAAIC,EAAoBjO,EAAQkM,SAC5BgC,OAAsC,IAAtBD,GAAsCA,EACtDE,EAAmBnO,EAAQoO,QAC3BC,OAAoC,IAArBF,GAAqCA,EACpDG,EAA8BtO,EAAQuO,mBACtC9I,EAAUzF,EAAQyF,QAClB+G,EAAWxM,EAAQwM,SACnBE,EAAe1M,EAAQ0M,aACvBI,EAAc9M,EAAQ8M,YACtB0B,EAAwBxO,EAAQyO,eAChCA,OAA2C,IAA1BD,GAA0CA,EAC3DE,EAAwB1O,EAAQ0O,sBAChCC,EAAqBzP,EAAMc,QAAQ/C,UACnCqI,EAAgB9E,EAAiBmO,GAEjCJ,EAAqBD,IADHhJ,IAAkBqJ,GACqCF,EAjC/E,SAAuCxR,GACrC,GAAIuD,EAAiBvD,KAAeX,EAClC,MAAO,GAGT,IAAIsS,EAAoBnF,GAAqBxM,GAC7C,MAAO,CAAC2M,GAA8B3M,GAAY2R,EAAmBhF,GAA8BgF,GACrG,CA0B6IC,CAA8BF,GAA3E,CAAClF,GAAqBkF,KAChHG,EAAa,CAACH,GAAoBzR,OAAOqR,GAAoBxR,QAAO,SAAUC,EAAKC,GACrF,OAAOD,EAAIE,OAAOsD,EAAiBvD,KAAeX,ECvCvC,SAA8B4C,EAAOc,QAClC,IAAZA,IACFA,EAAU,CAAC,GAGb,IAAIoM,EAAWpM,EACX/C,EAAYmP,EAASnP,UACrBuP,EAAWJ,EAASI,SACpBE,EAAeN,EAASM,aACxBjH,EAAU2G,EAAS3G,QACnBgJ,EAAiBrC,EAASqC,eAC1BM,EAAwB3C,EAASsC,sBACjCA,OAAkD,IAA1BK,EAAmC,EAAgBA,EAC3E7H,EAAYL,EAAa5J,GACzB6R,EAAa5H,EAAYuH,EAAiB3R,EAAsBA,EAAoB4H,QAAO,SAAUzH,GACvG,OAAO4J,EAAa5J,KAAeiK,CACrC,IAAK3K,EACDyS,EAAoBF,EAAWpK,QAAO,SAAUzH,GAClD,OAAOyR,EAAsBhL,QAAQzG,IAAc,CACrD,IAEiC,IAA7B+R,EAAkBC,SACpBD,EAAoBF,GAQtB,IAAII,EAAYF,EAAkBjS,QAAO,SAAUC,EAAKC,GAOtD,OANAD,EAAIC,GAAakP,GAAejN,EAAO,CACrCjC,UAAWA,EACXuP,SAAUA,EACVE,aAAcA,EACdjH,QAASA,IACRjF,EAAiBvD,IACbD,CACT,GAAG,CAAC,GACJ,OAAOzB,OAAO4D,KAAK+P,GAAWC,MAAK,SAAUC,EAAGC,GAC9C,OAAOH,EAAUE,GAAKF,EAAUG,EAClC,GACF,CDH6DC,CAAqBpQ,EAAO,CACnFjC,UAAWA,EACXuP,SAAUA,EACVE,aAAcA,EACdjH,QAASA,EACTgJ,eAAgBA,EAChBC,sBAAuBA,IACpBzR,EACP,GAAG,IACCsS,EAAgBrQ,EAAMwG,MAAM7I,UAC5BoK,EAAa/H,EAAMwG,MAAM9I,OACzB4S,EAAY,IAAIC,IAChBC,GAAqB,EACrBC,EAAwBb,EAAW,GAE9Bc,EAAI,EAAGA,EAAId,EAAWG,OAAQW,IAAK,CAC1C,IAAI3S,EAAY6R,EAAWc,GAEvBC,EAAiBrP,EAAiBvD,GAElC6S,EAAmBjJ,EAAa5J,KAAeT,EAC/CuT,EAAa,CAAC,EAAK5T,GAAQuH,QAAQmM,IAAmB,EACtDrK,EAAMuK,EAAa,QAAU,SAC7B1F,EAAW8B,GAAejN,EAAO,CACnCjC,UAAWA,EACXuP,SAAUA,EACVE,aAAcA,EACdI,YAAaA,EACbrH,QAASA,IAEPuK,EAAoBD,EAAaD,EAAmB1T,EAAQC,EAAOyT,EAAmB3T,EAAS,EAE/FoT,EAAc/J,GAAOyB,EAAWzB,KAClCwK,EAAoBvG,GAAqBuG,IAG3C,IAAIC,EAAmBxG,GAAqBuG,GACxCE,EAAS,GAUb,GARIhC,GACFgC,EAAOC,KAAK9F,EAASwF,IAAmB,GAGtCxB,GACF6B,EAAOC,KAAK9F,EAAS2F,IAAsB,EAAG3F,EAAS4F,IAAqB,GAG1EC,EAAOE,OAAM,SAAUC,GACzB,OAAOA,CACT,IAAI,CACFV,EAAwB1S,EACxByS,GAAqB,EACrB,KACF,CAEAF,EAAUc,IAAIrT,EAAWiT,EAC3B,CAEA,GAAIR,EAqBF,IAnBA,IAEIa,EAAQ,SAAeC,GACzB,IAAIC,EAAmB3B,EAAW4B,MAAK,SAAUzT,GAC/C,IAAIiT,EAASV,EAAU9T,IAAIuB,GAE3B,GAAIiT,EACF,OAAOA,EAAOS,MAAM,EAAGH,GAAIJ,OAAM,SAAUC,GACzC,OAAOA,CACT,GAEJ,IAEA,GAAII,EAEF,OADAd,EAAwBc,EACjB,OAEX,EAESD,EAnBY/B,EAAiB,EAAI,EAmBZ+B,EAAK,GAGpB,UAFFD,EAAMC,GADmBA,KAOpCtR,EAAMjC,YAAc0S,IACtBzQ,EAAMmG,cAAcxG,GAAMmP,OAAQ,EAClC9O,EAAMjC,UAAY0S,EAClBzQ,EAAM0R,OAAQ,EA5GhB,CA8GF,EAQEhK,iBAAkB,CAAC,UACnBgC,KAAM,CACJoF,OAAO,IE7IX,SAAS6C,GAAexG,EAAUY,EAAM6F,GAQtC,YAPyB,IAArBA,IACFA,EAAmB,CACjBrO,EAAG,EACHE,EAAG,IAIA,CACLzC,IAAKmK,EAASnK,IAAM+K,EAAK3I,OAASwO,EAAiBnO,EACnDvG,MAAOiO,EAASjO,MAAQ6O,EAAK7I,MAAQ0O,EAAiBrO,EACtDtG,OAAQkO,EAASlO,OAAS8O,EAAK3I,OAASwO,EAAiBnO,EACzDtG,KAAMgO,EAAShO,KAAO4O,EAAK7I,MAAQ0O,EAAiBrO,EAExD,CAEA,SAASsO,GAAsB1G,GAC7B,MAAO,CAAC,EAAKjO,EAAOD,EAAQE,GAAM2U,MAAK,SAAUC,GAC/C,OAAO5G,EAAS4G,IAAS,CAC3B,GACF,CA+BA,UACEpS,KAAM,OACNC,SAAS,EACTC,MAAO,OACP6H,iBAAkB,CAAC,mBACnB5H,GAlCF,SAAcC,GACZ,IAAIC,EAAQD,EAAKC,MACbL,EAAOI,EAAKJ,KACZ0Q,EAAgBrQ,EAAMwG,MAAM7I,UAC5BoK,EAAa/H,EAAMwG,MAAM9I,OACzBkU,EAAmB5R,EAAMmG,cAAc6L,gBACvCC,EAAoBhF,GAAejN,EAAO,CAC5C0N,eAAgB,cAEdwE,EAAoBjF,GAAejN,EAAO,CAC5C4N,aAAa,IAEXuE,EAA2BR,GAAeM,EAAmB5B,GAC7D+B,EAAsBT,GAAeO,EAAmBnK,EAAY6J,GACpES,EAAoBR,GAAsBM,GAC1CG,EAAmBT,GAAsBO,GAC7CpS,EAAMmG,cAAcxG,GAAQ,CAC1BwS,yBAA0BA,EAC1BC,oBAAqBA,EACrBC,kBAAmBA,EACnBC,iBAAkBA,GAEpBtS,EAAMM,WAAW5C,OAASrB,OAAOkE,OAAO,CAAC,EAAGP,EAAMM,WAAW5C,OAAQ,CACnE,+BAAgC2U,EAChC,sBAAuBC,GAE3B,GCJA,IACE3S,KAAM,SACNC,SAAS,EACTC,MAAO,OACPwB,SAAU,CAAC,iBACXvB,GA5BF,SAAgBa,GACd,IAAIX,EAAQW,EAAMX,MACdc,EAAUH,EAAMG,QAChBnB,EAAOgB,EAAMhB,KACb4S,EAAkBzR,EAAQuG,OAC1BA,OAA6B,IAApBkL,EAA6B,CAAC,EAAG,GAAKA,EAC/C7I,EAAO,UAAkB,SAAU5L,EAAKC,GAE1C,OADAD,EAAIC,GA5BD,SAAiCA,EAAWyI,EAAOa,GACxD,IAAIjB,EAAgB9E,EAAiBvD,GACjCyU,EAAiB,CAACrV,EAAM,GAAKqH,QAAQ4B,IAAkB,GAAK,EAAI,EAEhErG,EAAyB,mBAAXsH,EAAwBA,EAAOhL,OAAOkE,OAAO,CAAC,EAAGiG,EAAO,CACxEzI,UAAWA,KACPsJ,EACFoL,EAAW1S,EAAK,GAChB2S,EAAW3S,EAAK,GAIpB,OAFA0S,EAAWA,GAAY,EACvBC,GAAYA,GAAY,GAAKF,EACtB,CAACrV,EAAMD,GAAOsH,QAAQ4B,IAAkB,EAAI,CACjD7C,EAAGmP,EACHjP,EAAGgP,GACD,CACFlP,EAAGkP,EACHhP,EAAGiP,EAEP,CASqBC,CAAwB5U,EAAWiC,EAAMwG,MAAOa,GAC1DvJ,CACT,GAAG,CAAC,GACA8U,EAAwBlJ,EAAK1J,EAAMjC,WACnCwF,EAAIqP,EAAsBrP,EAC1BE,EAAImP,EAAsBnP,EAEW,MAArCzD,EAAMmG,cAAcD,gBACtBlG,EAAMmG,cAAcD,cAAc3C,GAAKA,EACvCvD,EAAMmG,cAAcD,cAAczC,GAAKA,GAGzCzD,EAAMmG,cAAcxG,GAAQ+J,CAC9B,GC1BA,IACE/J,KAAM,gBACNC,SAAS,EACTC,MAAO,OACPC,GApBF,SAAuBC,GACrB,IAAIC,EAAQD,EAAKC,MACbL,EAAOI,EAAKJ,KAKhBK,EAAMmG,cAAcxG,GAAQkN,GAAe,CACzClP,UAAWqC,EAAMwG,MAAM7I,UACvBiB,QAASoB,EAAMwG,MAAM9I,OACrBqD,SAAU,WACVhD,UAAWiC,EAAMjC,WAErB,EAQE2L,KAAM,CAAC,GCgHT,IACE/J,KAAM,kBACNC,SAAS,EACTC,MAAO,OACPC,GA/HF,SAAyBC,GACvB,IAAIC,EAAQD,EAAKC,MACbc,EAAUf,EAAKe,QACfnB,EAAOI,EAAKJ,KACZoP,EAAoBjO,EAAQkM,SAC5BgC,OAAsC,IAAtBD,GAAsCA,EACtDE,EAAmBnO,EAAQoO,QAC3BC,OAAoC,IAArBF,GAAsCA,EACrD3B,EAAWxM,EAAQwM,SACnBE,EAAe1M,EAAQ0M,aACvBI,EAAc9M,EAAQ8M,YACtBrH,EAAUzF,EAAQyF,QAClBsM,EAAkB/R,EAAQgS,OAC1BA,OAA6B,IAApBD,GAAoCA,EAC7CE,EAAwBjS,EAAQkS,aAChCA,OAAyC,IAA1BD,EAAmC,EAAIA,EACtD5H,EAAW8B,GAAejN,EAAO,CACnCsN,SAAUA,EACVE,aAAcA,EACdjH,QAASA,EACTqH,YAAaA,IAEXxH,EAAgB9E,EAAiBtB,EAAMjC,WACvCiK,EAAYL,EAAa3H,EAAMjC,WAC/BkV,GAAmBjL,EACnBgF,EAAWtH,EAAyBU,GACpC8I,ECrCY,MDqCSlC,ECrCH,IAAM,IDsCxB9G,EAAgBlG,EAAMmG,cAAcD,cACpCmK,EAAgBrQ,EAAMwG,MAAM7I,UAC5BoK,EAAa/H,EAAMwG,MAAM9I,OACzBwV,EAA4C,mBAAjBF,EAA8BA,EAAa3W,OAAOkE,OAAO,CAAC,EAAGP,EAAMwG,MAAO,CACvGzI,UAAWiC,EAAMjC,aACbiV,EACFG,EAA2D,iBAAtBD,EAAiC,CACxElG,SAAUkG,EACVhE,QAASgE,GACP7W,OAAOkE,OAAO,CAChByM,SAAU,EACVkC,QAAS,GACRgE,GACCE,EAAsBpT,EAAMmG,cAAckB,OAASrH,EAAMmG,cAAckB,OAAOrH,EAAMjC,WAAa,KACjG2L,EAAO,CACTnG,EAAG,EACHE,EAAG,GAGL,GAAKyC,EAAL,CAIA,GAAI8I,EAAe,CACjB,IAAIqE,EAEAC,EAAwB,MAAbtG,EAAmB,EAAM7P,EACpCoW,EAAuB,MAAbvG,EAAmB/P,EAASC,EACtCoJ,EAAmB,MAAb0G,EAAmB,SAAW,QACpC3F,EAASnB,EAAc8G,GACvBtL,EAAM2F,EAAS8D,EAASmI,GACxB7R,EAAM4F,EAAS8D,EAASoI,GACxBC,EAAWV,GAAU/K,EAAWzB,GAAO,EAAI,EAC3CmN,EAASzL,IAAc1K,EAAQ+S,EAAc/J,GAAOyB,EAAWzB,GAC/DoN,EAAS1L,IAAc1K,GAASyK,EAAWzB,IAAQ+J,EAAc/J,GAGjEL,EAAejG,EAAME,SAASgB,MAC9BwF,EAAYoM,GAAU7M,EAAetC,EAAcsC,GAAgB,CACrE/C,MAAO,EACPE,OAAQ,GAENuQ,GAAqB3T,EAAMmG,cAAc,oBAAsBnG,EAAMmG,cAAc,oBAAoBI,QxBhFtG,CACLvF,IAAK,EACL9D,MAAO,EACPD,OAAQ,EACRE,KAAM,GwB6EFyW,GAAkBD,GAAmBL,GACrCO,GAAkBF,GAAmBJ,GAMrCO,GAAWnO,EAAO,EAAG0K,EAAc/J,GAAMI,EAAUJ,IACnDyN,GAAYd,EAAkB5C,EAAc/J,GAAO,EAAIkN,EAAWM,GAAWF,GAAkBT,EAA4BnG,SAAWyG,EAASK,GAAWF,GAAkBT,EAA4BnG,SACxMgH,GAAYf,GAAmB5C,EAAc/J,GAAO,EAAIkN,EAAWM,GAAWD,GAAkBV,EAA4BnG,SAAW0G,EAASI,GAAWD,GAAkBV,EAA4BnG,SACzMjG,GAAoB/G,EAAME,SAASgB,OAAS8D,EAAgBhF,EAAME,SAASgB,OAC3E+S,GAAelN,GAAiC,MAAbiG,EAAmBjG,GAAkBsF,WAAa,EAAItF,GAAkBuF,YAAc,EAAI,EAC7H4H,GAAwH,OAAjGb,EAA+C,MAAvBD,OAA8B,EAASA,EAAoBpG,IAAqBqG,EAAwB,EAEvJc,GAAY9M,EAAS2M,GAAYE,GACjCE,GAAkBzO,EAAOmN,EAAS,EAAQpR,EAF9B2F,EAAS0M,GAAYG,GAAsBD,IAEKvS,EAAK2F,EAAQyL,EAAS,EAAQrR,EAAK0S,IAAa1S,GAChHyE,EAAc8G,GAAYoH,GAC1B1K,EAAKsD,GAAYoH,GAAkB/M,CACrC,CAEA,GAAI8H,EAAc,CAChB,IAAIkF,GAEAC,GAAyB,MAAbtH,EAAmB,EAAM7P,EAErCoX,GAAwB,MAAbvH,EAAmB/P,EAASC,EAEvCsX,GAAUtO,EAAcgJ,GAExBuF,GAAmB,MAAZvF,EAAkB,SAAW,QAEpCwF,GAAOF,GAAUrJ,EAASmJ,IAE1BK,GAAOH,GAAUrJ,EAASoJ,IAE1BK,IAAuD,IAAxC,CAAC,EAAKzX,GAAMqH,QAAQ4B,GAEnCyO,GAAyH,OAAjGR,GAAgD,MAAvBjB,OAA8B,EAASA,EAAoBlE,IAAoBmF,GAAyB,EAEzJS,GAAaF,GAAeF,GAAOF,GAAUnE,EAAcoE,IAAQ1M,EAAW0M,IAAQI,GAAuB1B,EAA4BjE,QAEzI6F,GAAaH,GAAeJ,GAAUnE,EAAcoE,IAAQ1M,EAAW0M,IAAQI,GAAuB1B,EAA4BjE,QAAUyF,GAE5IK,GAAmBlC,GAAU8B,G1BzH9B,SAAwBlT,EAAK1E,EAAOyE,GACzC,IAAIwT,EAAItP,EAAOjE,EAAK1E,EAAOyE,GAC3B,OAAOwT,EAAIxT,EAAMA,EAAMwT,CACzB,C0BsHoDC,CAAeJ,GAAYN,GAASO,IAAcpP,EAAOmN,EAASgC,GAAaJ,GAAMF,GAAS1B,EAASiC,GAAaJ,IAEpKzO,EAAcgJ,GAAW8F,GACzBtL,EAAKwF,GAAW8F,GAAmBR,EACrC,CAEAxU,EAAMmG,cAAcxG,GAAQ+J,CAvE5B,CAwEF,EAQEhC,iBAAkB,CAAC,WE1HN,SAASyN,GAAiBC,EAAyBrQ,EAAcsD,QAC9D,IAAZA,IACFA,GAAU,GAGZ,ICnBoCrJ,ECJOJ,EFuBvCyW,EAA0B9V,EAAcwF,GACxCuQ,EAAuB/V,EAAcwF,IAf3C,SAAyBnG,GACvB,IAAImN,EAAOnN,EAAQ+D,wBACfI,EAASpB,EAAMoK,EAAK7I,OAAStE,EAAQqE,aAAe,EACpDD,EAASrB,EAAMoK,EAAK3I,QAAUxE,EAAQuE,cAAgB,EAC1D,OAAkB,IAAXJ,GAA2B,IAAXC,CACzB,CAU4DuS,CAAgBxQ,GACtEJ,EAAkBF,EAAmBM,GACrCgH,EAAOpJ,EAAsByS,EAAyBE,EAAsBjN,GAC5EyB,EAAS,CACXc,WAAY,EACZE,UAAW,GAET7C,EAAU,CACZ1E,EAAG,EACHE,EAAG,GAkBL,OAfI4R,IAA4BA,IAA4BhN,MACxB,SAA9B1J,EAAYoG,IAChBkG,GAAetG,MACbmF,GCnCgC9K,EDmCT+F,KClCdhG,EAAUC,IAAUO,EAAcP,GCJxC,CACL4L,YAFyChM,EDQbI,GCNR4L,WACpBE,UAAWlM,EAAQkM,WDGZH,GAAgB3L,IDoCnBO,EAAcwF,KAChBkD,EAAUtF,EAAsBoC,GAAc,IACtCxB,GAAKwB,EAAauH,WAC1BrE,EAAQxE,GAAKsB,EAAasH,WACjB1H,IACTsD,EAAQ1E,EAAIyH,GAAoBrG,KAI7B,CACLpB,EAAGwI,EAAK5O,KAAO2M,EAAOc,WAAa3C,EAAQ1E,EAC3CE,EAAGsI,EAAK/K,IAAM8I,EAAOgB,UAAY7C,EAAQxE,EACzCP,MAAO6I,EAAK7I,MACZE,OAAQ2I,EAAK3I,OAEjB,CGvDA,SAASoS,GAAMC,GACb,IAAItT,EAAM,IAAIoO,IACVmF,EAAU,IAAIC,IACdC,EAAS,GAKb,SAAS3F,EAAK4F,GACZH,EAAQI,IAAID,EAASlW,MACN,GAAG3B,OAAO6X,EAASxU,UAAY,GAAIwU,EAASnO,kBAAoB,IACtEvH,SAAQ,SAAU4V,GACzB,IAAKL,EAAQM,IAAID,GAAM,CACrB,IAAIE,EAAc9T,EAAI3F,IAAIuZ,GAEtBE,GACFhG,EAAKgG,EAET,CACF,IACAL,EAAO3E,KAAK4E,EACd,CAQA,OAzBAJ,EAAUtV,SAAQ,SAAU0V,GAC1B1T,EAAIiP,IAAIyE,EAASlW,KAAMkW,EACzB,IAiBAJ,EAAUtV,SAAQ,SAAU0V,GACrBH,EAAQM,IAAIH,EAASlW,OAExBsQ,EAAK4F,EAET,IACOD,CACT,CClBA,IAEIM,GAAkB,CACpBnY,UAAW,SACX0X,UAAW,GACX1U,SAAU,YAGZ,SAASoV,KACP,IAAK,IAAI1B,EAAO2B,UAAUrG,OAAQsG,EAAO,IAAIpU,MAAMwS,GAAO6B,EAAO,EAAGA,EAAO7B,EAAM6B,IAC/ED,EAAKC,GAAQF,UAAUE,GAGzB,OAAQD,EAAKvE,MAAK,SAAUlT,GAC1B,QAASA,GAAoD,mBAAlCA,EAAQ+D,sBACrC,GACF,CAEO,SAAS4T,GAAgBC,QACL,IAArBA,IACFA,EAAmB,CAAC,GAGtB,IAAIC,EAAoBD,EACpBE,EAAwBD,EAAkBE,iBAC1CA,OAA6C,IAA1BD,EAAmC,GAAKA,EAC3DE,EAAyBH,EAAkBI,eAC3CA,OAA4C,IAA3BD,EAAoCV,GAAkBU,EAC3E,OAAO,SAAsBjZ,EAAWD,EAAQoD,QAC9B,IAAZA,IACFA,EAAU+V,GAGZ,IC/C6B/W,EAC3BgX,ED8CE9W,EAAQ,CACVjC,UAAW,SACXgZ,iBAAkB,GAClBjW,QAASzE,OAAOkE,OAAO,CAAC,EAAG2V,GAAiBW,GAC5C1Q,cAAe,CAAC,EAChBjG,SAAU,CACRvC,UAAWA,EACXD,OAAQA,GAEV4C,WAAY,CAAC,EACbD,OAAQ,CAAC,GAEP2W,EAAmB,GACnBC,GAAc,EACdrN,EAAW,CACb5J,MAAOA,EACPkX,WAAY,SAAoBC,GAC9B,IAAIrW,EAAsC,mBAArBqW,EAAkCA,EAAiBnX,EAAMc,SAAWqW,EACzFC,IACApX,EAAMc,QAAUzE,OAAOkE,OAAO,CAAC,EAAGsW,EAAgB7W,EAAMc,QAASA,GACjEd,EAAMiK,cAAgB,CACpBtM,UAAW0B,EAAU1B,GAAa6N,GAAkB7N,GAAaA,EAAU4Q,eAAiB/C,GAAkB7N,EAAU4Q,gBAAkB,GAC1I7Q,OAAQ8N,GAAkB9N,IAI5B,IEzE4B+X,EAC9B4B,EFwEMN,EDvCG,SAAwBtB,GAErC,IAAIsB,EAAmBvB,GAAMC,GAE7B,OAAO/W,EAAeb,QAAO,SAAUC,EAAK+B,GAC1C,OAAO/B,EAAIE,OAAO+Y,EAAiBvR,QAAO,SAAUqQ,GAClD,OAAOA,EAAShW,QAAUA,CAC5B,IACF,GAAG,GACL,CC8B+ByX,EEzEK7B,EFyEsB,GAAGzX,OAAO2Y,EAAkB3W,EAAMc,QAAQ2U,WExE9F4B,EAAS5B,EAAU5X,QAAO,SAAUwZ,EAAQE,GAC9C,IAAIC,EAAWH,EAAOE,EAAQ5X,MAK9B,OAJA0X,EAAOE,EAAQ5X,MAAQ6X,EAAWnb,OAAOkE,OAAO,CAAC,EAAGiX,EAAUD,EAAS,CACrEzW,QAASzE,OAAOkE,OAAO,CAAC,EAAGiX,EAAS1W,QAASyW,EAAQzW,SACrD4I,KAAMrN,OAAOkE,OAAO,CAAC,EAAGiX,EAAS9N,KAAM6N,EAAQ7N,QAC5C6N,EACEF,CACT,GAAG,CAAC,GAEGhb,OAAO4D,KAAKoX,GAAQlV,KAAI,SAAUhG,GACvC,OAAOkb,EAAOlb,EAChB,MFsGM,OAvCA6D,EAAM+W,iBAAmBA,EAAiBvR,QAAO,SAAUiS,GACzD,OAAOA,EAAE7X,OACX,IAoJFI,EAAM+W,iBAAiB5W,SAAQ,SAAUqI,GACvC,IAAI7I,EAAO6I,EAAM7I,KACb+X,EAAgBlP,EAAM1H,QACtBA,OAA4B,IAAlB4W,EAA2B,CAAC,EAAIA,EAC1ChX,EAAS8H,EAAM9H,OAEnB,GAAsB,mBAAXA,EAAuB,CAChC,IAAIiX,EAAYjX,EAAO,CACrBV,MAAOA,EACPL,KAAMA,EACNiK,SAAUA,EACV9I,QAASA,IAKXkW,EAAiB/F,KAAK0G,GAFT,WAAmB,EAGlC,CACF,IAjIS/N,EAASQ,QAClB,EAMAwN,YAAa,WACX,IAAIX,EAAJ,CAIA,IAAIY,EAAkB7X,EAAME,SACxBvC,EAAYka,EAAgBla,UAC5BD,EAASma,EAAgBna,OAG7B,GAAKyY,GAAiBxY,EAAWD,GAAjC,CASAsC,EAAMwG,MAAQ,CACZ7I,UAAWwX,GAAiBxX,EAAWqH,EAAgBtH,GAAoC,UAA3BsC,EAAMc,QAAQC,UAC9ErD,OAAQiG,EAAcjG,IAOxBsC,EAAM0R,OAAQ,EACd1R,EAAMjC,UAAYiC,EAAMc,QAAQ/C,UAKhCiC,EAAM+W,iBAAiB5W,SAAQ,SAAU0V,GACvC,OAAO7V,EAAMmG,cAAc0P,EAASlW,MAAQtD,OAAOkE,OAAO,CAAC,EAAGsV,EAASnM,KACzE,IAGA,IAFA,IAESoO,EAAQ,EAAGA,EAAQ9X,EAAM+W,iBAAiBhH,OAAQ+H,IAUzD,IAAoB,IAAhB9X,EAAM0R,MAAV,CAMA,IAAIqG,EAAwB/X,EAAM+W,iBAAiBe,GAC/ChY,EAAKiY,EAAsBjY,GAC3BkY,EAAyBD,EAAsBjX,QAC/CoM,OAAsC,IAA3B8K,EAAoC,CAAC,EAAIA,EACpDrY,EAAOoY,EAAsBpY,KAEf,mBAAPG,IACTE,EAAQF,EAAG,CACTE,MAAOA,EACPc,QAASoM,EACTvN,KAAMA,EACNiK,SAAUA,KACN5J,EAdR,MAHEA,EAAM0R,OAAQ,EACdoG,GAAS,CAnCb,CAbA,CAmEF,EAGA1N,QClM2BtK,EDkMV,WACf,OAAO,IAAImY,SAAQ,SAAUC,GAC3BtO,EAASgO,cACTM,EAAQlY,EACV,GACF,ECrMG,WAUL,OATK8W,IACHA,EAAU,IAAImB,SAAQ,SAAUC,GAC9BD,QAAQC,UAAUC,MAAK,WACrBrB,OAAUsB,EACVF,EAAQpY,IACV,GACF,KAGKgX,CACT,GD2LIuB,QAAS,WACPjB,IACAH,GAAc,CAChB,GAGF,IAAKd,GAAiBxY,EAAWD,GAK/B,OAAOkM,EAmCT,SAASwN,IACPJ,EAAiB7W,SAAQ,SAAUL,GACjC,OAAOA,GACT,IACAkX,EAAmB,EACrB,CAEA,OAvCApN,EAASsN,WAAWpW,GAASqX,MAAK,SAAUnY,IACrCiX,GAAenW,EAAQwX,eAC1BxX,EAAQwX,cAActY,EAE1B,IAmCO4J,CACT,CACF,CACO,IAAI2O,GAA4BhC,KGrPnC,GAA4BA,GAAgB,CAC9CI,iBAFqB,CAAC6B,GAAgB,GAAe,GAAe,EAAa,GAAQ,GAAM,GAAiB,EAAO,MCJrH,GAA4BjC,GAAgB,CAC9CI,iBAFqB,CAAC6B,GAAgB,GAAe,GAAe,KCQtE,MAEMC,GAAiB,gBAsBjBC,GAAc9Z,IAClB,IAAI+Z,EAAW/Z,EAAQga,aAAa,kBAEpC,IAAKD,GAAyB,MAAbA,EAAkB,CACjC,IAAIE,EAAgBja,EAAQga,aAAa,QAKzC,IAAKC,IAAkBA,EAAcC,SAAS,OAASD,EAAcE,WAAW,KAC9E,OAAO,KAILF,EAAcC,SAAS,OAASD,EAAcE,WAAW,OAC3DF,EAAgB,IAAIA,EAActX,MAAM,KAAK,MAG/CoX,EAAWE,GAAmC,MAAlBA,EAAwBA,EAAcG,OAAS,IAC7E,CAEA,OAAOL,CAAQ,EAGXM,GAAyBra,IAC7B,MAAM+Z,EAAWD,GAAY9Z,GAE7B,OAAI+Z,GACKjU,SAAS+C,cAAckR,GAAYA,EAGrC,IAAI,EAGPO,GAAyBta,IAC7B,MAAM+Z,EAAWD,GAAY9Z,GAC7B,OAAO+Z,EAAWjU,SAAS+C,cAAckR,GAAY,IAAI,EA0BrDQ,GAAuBva,IAC3BA,EAAQwa,cAAc,IAAIC,MAAMZ,IAAgB,EAG5C,GAAYa,MACXA,GAA4B,iBAAXA,UAIO,IAAlBA,EAAOC,SAChBD,EAASA,EAAO,SAGgB,IAApBA,EAAOE,UAGjBC,GAAaH,GAEb,GAAUA,GACLA,EAAOC,OAASD,EAAO,GAAKA,EAGf,iBAAXA,GAAuBA,EAAOvJ,OAAS,EACzCrL,SAAS+C,cAAc6R,GAGzB,KAGHI,GAAY9a,IAChB,IAAK,GAAUA,IAAgD,IAApCA,EAAQ+a,iBAAiB5J,OAClD,OAAO,EAGT,MAAM6J,EAAgF,YAA7DtV,iBAAiB1F,GAASib,iBAAiB,cAE9DC,EAAgBlb,EAAQmb,QAAQ,uBAEtC,IAAKD,EACH,OAAOF,EAGT,GAAIE,IAAkBlb,EAAS,CAC7B,MAAMob,EAAUpb,EAAQmb,QAAQ,WAEhC,GAAIC,GAAWA,EAAQ5V,aAAe0V,EACpC,OAAO,EAGT,GAAgB,OAAZE,EACF,OAAO,CAEX,CAEA,OAAOJ,CAAgB,EAGnBK,GAAarb,IACZA,GAAWA,EAAQ4a,WAAaU,KAAKC,gBAItCvb,EAAQwb,UAAUvW,SAAS,mBAIC,IAArBjF,EAAQyb,SACVzb,EAAQyb,SAGVzb,EAAQ0b,aAAa,aAAoD,UAArC1b,EAAQga,aAAa,aAG5D2B,GAAiB3b,IACrB,IAAK8F,SAASC,gBAAgB6V,aAC5B,OAAO,KAIT,GAAmC,mBAAxB5b,EAAQqF,YAA4B,CAC7C,MAAMwW,EAAO7b,EAAQqF,cACrB,OAAOwW,aAAgB/a,WAAa+a,EAAO,IAC7C,CAEA,OAAI7b,aAAmBc,WACdd,EAIJA,EAAQwF,WAINmW,GAAe3b,EAAQwF,YAHrB,IAGgC,EAGrCsW,GAAO,OAWPC,GAAS/b,IACbA,EAAQuE,YAAY,EAGhByX,GAAY,IACZ3b,OAAO4b,SAAWnW,SAAS6G,KAAK+O,aAAa,qBACxCrb,OAAO4b,OAGT,KAGHC,GAA4B,GAmB5BC,GAAQ,IAAuC,QAAjCrW,SAASC,gBAAgBqW,IAEvCC,GAAqBC,IAnBAC,QAoBN,KACjB,MAAMC,EAAIR,KAGV,GAAIQ,EAAG,CACL,MAAMzb,EAAOub,EAAOG,KACdC,EAAqBF,EAAEtb,GAAGH,GAChCyb,EAAEtb,GAAGH,GAAQub,EAAOK,gBACpBH,EAAEtb,GAAGH,GAAM6b,YAAcN,EAEzBE,EAAEtb,GAAGH,GAAM8b,WAAa,KACtBL,EAAEtb,GAAGH,GAAQ2b,EACNJ,EAAOK,gBAElB,GAjC0B,YAAxB7W,SAASgX,YAENZ,GAA0B/K,QAC7BrL,SAASyF,iBAAiB,oBAAoB,KAC5C,IAAK,MAAMgR,KAAYL,GACrBK,GACF,IAIJL,GAA0B7J,KAAKkK,IAE/BA,GAsBA,EAGEQ,GAAUR,IACU,mBAAbA,GACTA,GACF,EAGIS,GAAyB,CAACT,EAAUU,EAAmBC,GAAoB,KAC/E,IAAKA,EAEH,YADAH,GAAQR,GAIV,MACMY,EAnMiCnd,KACvC,IAAKA,EACH,OAAO,EAIT,IAAI,mBACFod,EAAkB,gBAClBC,GACEhd,OAAOqF,iBAAiB1F,GAC5B,MAAMsd,EAA0BC,OAAOC,WAAWJ,GAC5CK,EAAuBF,OAAOC,WAAWH,GAE/C,OAAKC,GAA4BG,GAKjCL,EAAqBA,EAAmBza,MAAM,KAAK,GACnD0a,EAAkBA,EAAgB1a,MAAM,KAAK,GAjFf,KAkFtB4a,OAAOC,WAAWJ,GAAsBG,OAAOC,WAAWH,KANzD,CAMoG,EA+KpFK,CAAiCT,GADlC,EAExB,IAAIU,GAAS,EAEb,MAAMC,EAAU,EACd5Q,aAEIA,IAAWiQ,IAIfU,GAAS,EACTV,EAAkBxR,oBAAoBoO,GAAgB+D,GACtDb,GAAQR,GAAS,EAGnBU,EAAkB1R,iBAAiBsO,GAAgB+D,GACnDC,YAAW,KACJF,GACHpD,GAAqB0C,EACvB,GACCE,EAAiB,EAahBW,GAAuB,CAACjR,EAAMkR,EAAeC,EAAeC,KAChE,MAAMC,EAAarR,EAAKsE,OACxB,IAAI+H,EAAQrM,EAAKjH,QAAQmY,GAGzB,OAAe,IAAX7E,GACM8E,GAAiBC,EAAiBpR,EAAKqR,EAAa,GAAKrR,EAAK,IAGxEqM,GAAS8E,EAAgB,GAAK,EAE1BC,IACF/E,GAASA,EAAQgF,GAAcA,GAG1BrR,EAAKjK,KAAKC,IAAI,EAAGD,KAAKE,IAAIoW,EAAOgF,EAAa,KAAI,EAarDC,GAAiB,qBACjBC,GAAiB,OACjBC,GAAgB,SAChBC,GAAgB,CAAC,EAEvB,IAAIC,GAAW,EACf,MAAMC,GAAe,CACnBC,WAAY,YACZC,WAAY,YAERC,GAAe,IAAI5H,IAAI,CAAC,QAAS,WAAY,UAAW,YAAa,cAAe,aAAc,iBAAkB,YAAa,WAAY,YAAa,cAAe,YAAa,UAAW,WAAY,QAAS,oBAAqB,aAAc,YAAa,WAAY,cAAe,cAAe,cAAe,YAAa,eAAgB,gBAAiB,eAAgB,gBAAiB,aAAc,QAAS,OAAQ,SAAU,QAAS,SAAU,SAAU,UAAW,WAAY,OAAQ,SAAU,eAAgB,SAAU,OAAQ,mBAAoB,mBAAoB,QAAS,QAAS,WAK/lB,SAAS6H,GAAa5e,EAAS6e,GAC7B,OAAOA,GAAO,GAAGA,MAAQN,QAAgBve,EAAQue,UAAYA,IAC/D,CAEA,SAASO,GAAiB9e,GACxB,MAAM6e,EAAMD,GAAa5e,GAGzB,OAFAA,EAAQue,SAAWM,EACnBP,GAAcO,GAAOP,GAAcO,IAAQ,CAAC,EACrCP,GAAcO,EACvB,CA0CA,SAASE,GAAYC,EAAQC,EAAUC,EAAqB,MAC1D,OAAOzhB,OAAO0hB,OAAOH,GAAQpM,MAAKwM,GAASA,EAAMH,WAAaA,GAAYG,EAAMF,qBAAuBA,GACzG,CAEA,SAASG,GAAoBC,EAAmB1B,EAAS2B,GACvD,MAAMC,EAAiC,iBAAZ5B,EAErBqB,EAAWO,EAAcD,EAAqB3B,GAAW2B,EAC/D,IAAIE,EAAYC,GAAaJ,GAM7B,OAJKX,GAAavH,IAAIqI,KACpBA,EAAYH,GAGP,CAACE,EAAaP,EAAUQ,EACjC,CAEA,SAASE,GAAW3f,EAASsf,EAAmB1B,EAAS2B,EAAoBK,GAC3E,GAAiC,iBAAtBN,IAAmCtf,EAC5C,OAGF,IAAKwf,EAAaP,EAAUQ,GAAaJ,GAAoBC,EAAmB1B,EAAS2B,GAGzF,GAAID,KAAqBd,GAAc,CACrC,MAAMqB,EAAe3e,GACZ,SAAUke,GACf,IAAKA,EAAMU,eAAiBV,EAAMU,gBAAkBV,EAAMW,iBAAmBX,EAAMW,eAAe9a,SAASma,EAAMU,eAC/G,OAAO5e,EAAGjD,KAAK+hB,KAAMZ,EAEzB,EAGFH,EAAWY,EAAaZ,EAC1B,CAEA,MAAMD,EAASF,GAAiB9e,GAC1BigB,EAAWjB,EAAOS,KAAeT,EAAOS,GAAa,CAAC,GACtDS,EAAmBnB,GAAYkB,EAAUhB,EAAUO,EAAc5B,EAAU,MAEjF,GAAIsC,EAEF,YADAA,EAAiBN,OAASM,EAAiBN,QAAUA,GAIvD,MAAMf,EAAMD,GAAaK,EAAUK,EAAkB1T,QAAQuS,GAAgB,KACvEjd,EAAKse,EAzEb,SAAoCxf,EAAS+Z,EAAU7Y,GACrD,OAAO,SAAS0c,EAAQwB,GACtB,MAAMe,EAAcngB,EAAQogB,iBAAiBrG,GAE7C,IAAK,IAAI,OACP/M,GACEoS,EAAOpS,GAAUA,IAAWgT,KAAMhT,EAASA,EAAOxH,WACpD,IAAK,MAAM6a,KAAcF,EACvB,GAAIE,IAAerT,EAYnB,OARAsT,GAAWlB,EAAO,CAChBW,eAAgB/S,IAGd4Q,EAAQgC,QACVW,GAAaC,IAAIxgB,EAASof,EAAMqB,KAAM1G,EAAU7Y,GAG3CA,EAAGwf,MAAM1T,EAAQ,CAACoS,GAG/B,CACF,CAiD2BuB,CAA2B3gB,EAAS4d,EAASqB,GAvFxE,SAA0Bjf,EAASkB,GACjC,OAAO,SAAS0c,EAAQwB,GAStB,OARAkB,GAAWlB,EAAO,CAChBW,eAAgB/f,IAGd4d,EAAQgC,QACVW,GAAaC,IAAIxgB,EAASof,EAAMqB,KAAMvf,GAGjCA,EAAGwf,MAAM1gB,EAAS,CAACof,GAC5B,CACF,CA2EoFwB,CAAiB5gB,EAASif,GAC5G/d,EAAGge,mBAAqBM,EAAc5B,EAAU,KAChD1c,EAAG+d,SAAWA,EACd/d,EAAG0e,OAASA,EACZ1e,EAAGqd,SAAWM,EACdoB,EAASpB,GAAO3d,EAChBlB,EAAQuL,iBAAiBkU,EAAWve,EAAIse,EAC1C,CAEA,SAASqB,GAAc7gB,EAASgf,EAAQS,EAAW7B,EAASsB,GAC1D,MAAMhe,EAAK6d,GAAYC,EAAOS,GAAY7B,EAASsB,GAE9Che,IAILlB,EAAQyL,oBAAoBgU,EAAWve,EAAI4f,QAAQ5B,WAC5CF,EAAOS,GAAWve,EAAGqd,UAC9B,CAEA,SAASwC,GAAyB/gB,EAASgf,EAAQS,EAAWuB,GAC5D,MAAMC,EAAoBjC,EAAOS,IAAc,CAAC,EAEhD,IAAK,MAAMyB,KAAczjB,OAAO4D,KAAK4f,GACnC,GAAIC,EAAWhH,SAAS8G,GAAY,CAClC,MAAM5B,EAAQ6B,EAAkBC,GAChCL,GAAc7gB,EAASgf,EAAQS,EAAWL,EAAMH,SAAUG,EAAMF,mBAClE,CAEJ,CAEA,SAASQ,GAAaN,GAGpB,OADAA,EAAQA,EAAMxT,QAAQwS,GAAgB,IAC/BI,GAAaY,IAAUA,CAChC,CAEA,MAAMmB,GAAe,CACnBY,GAAGnhB,EAASof,EAAOxB,EAAS2B,GAC1BI,GAAW3f,EAASof,EAAOxB,EAAS2B,GAAoB,EAC1D,EAEA6B,IAAIphB,EAASof,EAAOxB,EAAS2B,GAC3BI,GAAW3f,EAASof,EAAOxB,EAAS2B,GAAoB,EAC1D,EAEAiB,IAAIxgB,EAASsf,EAAmB1B,EAAS2B,GACvC,GAAiC,iBAAtBD,IAAmCtf,EAC5C,OAGF,MAAOwf,EAAaP,EAAUQ,GAAaJ,GAAoBC,EAAmB1B,EAAS2B,GACrF8B,EAAc5B,IAAcH,EAC5BN,EAASF,GAAiB9e,GAC1BihB,EAAoBjC,EAAOS,IAAc,CAAC,EAC1C6B,EAAchC,EAAkBnF,WAAW,KAEjD,QAAwB,IAAb8E,EAAX,CAUA,GAAIqC,EACF,IAAK,MAAMC,KAAgB9jB,OAAO4D,KAAK2d,GACrC+B,GAAyB/gB,EAASgf,EAAQuC,EAAcjC,EAAkBzM,MAAM,IAIpF,IAAK,MAAM2O,KAAe/jB,OAAO4D,KAAK4f,GAAoB,CACxD,MAAMC,EAAaM,EAAY5V,QAAQyS,GAAe,IAEtD,IAAKgD,GAAe/B,EAAkBpF,SAASgH,GAAa,CAC1D,MAAM9B,EAAQ6B,EAAkBO,GAChCX,GAAc7gB,EAASgf,EAAQS,EAAWL,EAAMH,SAAUG,EAAMF,mBAClE,CACF,CAfA,KARA,CAEE,IAAKzhB,OAAO4D,KAAK4f,GAAmB9P,OAClC,OAGF0P,GAAc7gB,EAASgf,EAAQS,EAAWR,EAAUO,EAAc5B,EAAU,KAE9E,CAgBF,EAEA6D,QAAQzhB,EAASof,EAAO3H,GACtB,GAAqB,iBAAV2H,IAAuBpf,EAChC,OAAO,KAGT,MAAMwc,EAAIR,KAGV,IAAI0F,EAAc,KACdC,GAAU,EACVC,GAAiB,EACjBC,GAAmB,EAJHzC,IADFM,GAAaN,IAOZ5C,IACjBkF,EAAclF,EAAE/B,MAAM2E,EAAO3H,GAC7B+E,EAAExc,GAASyhB,QAAQC,GACnBC,GAAWD,EAAYI,uBACvBF,GAAkBF,EAAYK,gCAC9BF,EAAmBH,EAAYM,sBAGjC,IAAIC,EAAM,IAAIxH,MAAM2E,EAAO,CACzBuC,UACAO,YAAY,IAgBd,OAdAD,EAAM3B,GAAW2B,EAAKxK,GAElBoK,GACFI,EAAIE,iBAGFP,GACF5hB,EAAQwa,cAAcyH,GAGpBA,EAAIJ,kBAAoBH,GAC1BA,EAAYS,iBAGPF,CACT,GAIF,SAAS3B,GAAWziB,EAAKukB,GACvB,IAAK,MAAO7kB,EAAKa,KAAUX,OAAO4kB,QAAQD,GAAQ,CAAC,GACjD,IACEvkB,EAAIN,GAAOa,CACb,CAAE,MAAOkkB,GACP7kB,OAAOC,eAAeG,EAAKN,EAAK,CAC9BglB,cAAc,EAEd3kB,IAAG,IACMQ,GAIb,CAGF,OAAOP,CACT,CAYA,MAAM2kB,GAAa,IAAI7Q,IACjB8Q,GAAO,CACXjQ,IAAIxS,EAASzC,EAAKyN,GACXwX,GAAWpL,IAAIpX,IAClBwiB,GAAWhQ,IAAIxS,EAAS,IAAI2R,KAG9B,MAAM+Q,EAAcF,GAAW5kB,IAAIoC,GAG9B0iB,EAAYtL,IAAI7Z,IAA6B,IAArBmlB,EAAYC,KAMzCD,EAAYlQ,IAAIjV,EAAKyN,GAJnB4X,QAAQC,MAAM,+EAA+Exf,MAAMyf,KAAKJ,EAAYrhB,QAAQ,MAKhI,EAEAzD,IAAG,CAACoC,EAASzC,IACPilB,GAAWpL,IAAIpX,IACVwiB,GAAW5kB,IAAIoC,GAASpC,IAAIL,IAG9B,KAGTwlB,OAAO/iB,EAASzC,GACd,IAAKilB,GAAWpL,IAAIpX,GAClB,OAGF,MAAM0iB,EAAcF,GAAW5kB,IAAIoC,GACnC0iB,EAAYM,OAAOzlB,GAEM,IAArBmlB,EAAYC,MACdH,GAAWQ,OAAOhjB,EAEtB,GAUF,SAASijB,GAAc7kB,GACrB,GAAc,SAAVA,EACF,OAAO,EAGT,GAAc,UAAVA,EACF,OAAO,EAGT,GAAIA,IAAUmf,OAAOnf,GAAOkC,WAC1B,OAAOid,OAAOnf,GAGhB,GAAc,KAAVA,GAA0B,SAAVA,EAClB,OAAO,KAGT,GAAqB,iBAAVA,EACT,OAAOA,EAGT,IACE,OAAO8kB,KAAKC,MAAMC,mBAAmBhlB,GACvC,CAAE,MAAOkkB,GACP,OAAOlkB,CACT,CACF,CAEA,SAASilB,GAAiB9lB,GACxB,OAAOA,EAAIqO,QAAQ,UAAU0X,GAAO,IAAIA,EAAIpjB,iBAC9C,CAEA,MAAMqjB,GAAc,CAClBC,iBAAiBxjB,EAASzC,EAAKa,GAC7B4B,EAAQ6B,aAAa,WAAWwhB,GAAiB9lB,KAAQa,EAC3D,EAEAqlB,oBAAoBzjB,EAASzC,GAC3ByC,EAAQ4B,gBAAgB,WAAWyhB,GAAiB9lB,KACtD,EAEAmmB,kBAAkB1jB,GAChB,IAAKA,EACH,MAAO,CAAC,EAGV,MAAM0B,EAAa,CAAC,EACdiiB,EAASlmB,OAAO4D,KAAKrB,EAAQ4jB,SAAShd,QAAOrJ,GAAOA,EAAI4c,WAAW,QAAU5c,EAAI4c,WAAW,cAElG,IAAK,MAAM5c,KAAOomB,EAAQ,CACxB,IAAIE,EAAUtmB,EAAIqO,QAAQ,MAAO,IACjCiY,EAAUA,EAAQC,OAAO,GAAG5jB,cAAgB2jB,EAAQhR,MAAM,EAAGgR,EAAQ1S,QACrEzP,EAAWmiB,GAAWZ,GAAcjjB,EAAQ4jB,QAAQrmB,GACtD,CAEA,OAAOmE,CACT,EAEAqiB,iBAAgB,CAAC/jB,EAASzC,IACjB0lB,GAAcjjB,EAAQga,aAAa,WAAWqJ,GAAiB9lB,QAe1E,MAAMymB,GAEOC,qBACT,MAAO,CAAC,CACV,CAEWC,yBACT,MAAO,CAAC,CACV,CAEWzH,kBACT,MAAM,IAAI0H,MAAM,sEAClB,CAEAC,WAAWC,GAMT,OALAA,EAASrE,KAAKsE,gBAAgBD,GAC9BA,EAASrE,KAAKuE,kBAAkBF,GAEhCrE,KAAKwE,iBAAiBH,GAEfA,CACT,CAEAE,kBAAkBF,GAChB,OAAOA,CACT,CAEAC,gBAAgBD,EAAQrkB,GACtB,MAAMykB,EAAa,GAAUzkB,GAAWujB,GAAYQ,iBAAiB/jB,EAAS,UAAY,CAAC,EAE3F,MAAO,IAAKggB,KAAK0E,YAAYT,WACD,iBAAfQ,EAA0BA,EAAa,CAAC,KAC/C,GAAUzkB,GAAWujB,GAAYG,kBAAkB1jB,GAAW,CAAC,KAC7C,iBAAXqkB,EAAsBA,EAAS,CAAC,EAE/C,CAEAG,iBAAiBH,EAAQM,EAAc3E,KAAK0E,YAAYR,aACtD,IAAK,MAAM3hB,KAAY9E,OAAO4D,KAAKsjB,GAAc,CAC/C,MAAMC,EAAgBD,EAAYpiB,GAC5BnE,EAAQimB,EAAO9hB,GACfsiB,EAAY,GAAUzmB,GAAS,UA1uBrCsc,OADSA,EA2uB+Ctc,GAzuBnD,GAAGsc,IAGLjd,OAAOM,UAAUuC,SAASrC,KAAKyc,GAAQoK,MAAM,eAAe,GAAG5kB,cAwuBlE,IAAK,IAAI6kB,OAAOH,GAAe9gB,KAAK+gB,GAClC,MAAM,IAAIG,UAAU,GAAGhF,KAAK0E,YAAYjI,KAAKwI,0BAA0B1iB,qBAA4BsiB,yBAAiCD,MAExI,CAhvBWlK,KAivBb,EAmBF,MAAMwK,WAAsBlB,GAC1BU,YAAY1kB,EAASqkB,GACnBc,SACAnlB,EAAU6a,GAAW7a,MAMrBggB,KAAKoF,SAAWplB,EAChBggB,KAAKqF,QAAUrF,KAAKoE,WAAWC,GAC/B5B,GAAKjQ,IAAIwN,KAAKoF,SAAUpF,KAAK0E,YAAYY,SAAUtF,MACrD,CAGAuF,UACE9C,GAAKM,OAAO/C,KAAKoF,SAAUpF,KAAK0E,YAAYY,UAC5C/E,GAAaC,IAAIR,KAAKoF,SAAUpF,KAAK0E,YAAYc,WAEjD,IAAK,MAAMC,KAAgBhoB,OAAOioB,oBAAoB1F,MACpDA,KAAKyF,GAAgB,IAEzB,CAEAE,eAAepJ,EAAUvc,EAAS4lB,GAAa,GAC7C5I,GAAuBT,EAAUvc,EAAS4lB,EAC5C,CAEAxB,WAAWC,GAMT,OALAA,EAASrE,KAAKsE,gBAAgBD,EAAQrE,KAAKoF,UAC3Cf,EAASrE,KAAKuE,kBAAkBF,GAEhCrE,KAAKwE,iBAAiBH,GAEfA,CACT,CAGAwB,mBAAmB7lB,GACjB,OAAOyiB,GAAK7kB,IAAIid,GAAW7a,GAAUggB,KAAKsF,SAC5C,CAEAO,2BAA2B7lB,EAASqkB,EAAS,CAAC,GAC5C,OAAOrE,KAAK8F,YAAY9lB,IAAY,IAAIggB,KAAKhgB,EAA2B,iBAAXqkB,EAAsBA,EAAS,KAC9F,CAEW0B,qBACT,MApDY,OAqDd,CAEWT,sBACT,MAAO,MAAMtF,KAAKvD,MACpB,CAEW+I,uBACT,MAAO,IAAIxF,KAAKsF,UAClB,CAEAO,iBAAiB9kB,GACf,MAAO,GAAGA,IAAOif,KAAKwF,WACxB,EAWF,MAAMQ,GAAuB,CAACC,EAAWC,EAAS,UAChD,MAAMC,EAAa,gBAAgBF,EAAUT,YACvCzkB,EAAOklB,EAAUxJ,KACvB8D,GAAaY,GAAGrb,SAAUqgB,EAAY,qBAAqBplB,OAAU,SAAUqe,GAK7E,GAJI,CAAC,IAAK,QAAQlF,SAAS8F,KAAKoG,UAC9BhH,EAAM+C,iBAGJ9G,GAAW2E,MACb,OAGF,MAAMhT,EAASsN,GAAuB0F,OAASA,KAAK7E,QAAQ,IAAIpa,KAC/CklB,EAAUI,oBAAoBrZ,GAEtCkZ,IACX,GAAE,EAeEI,GAAc,YACdC,GAAc,QAAQD,KACtBE,GAAe,SAASF,KAO9B,MAAMG,WAAcvB,GAEPzI,kBACT,MAdW,OAeb,CAGAiK,QAGE,GAFmBnG,GAAakB,QAAQzB,KAAKoF,SAAUmB,IAExC1E,iBACb,OAGF7B,KAAKoF,SAAS5J,UAAUuH,OAnBF,QAqBtB,MAAM6C,EAAa5F,KAAKoF,SAAS5J,UAAUvW,SAtBrB,QAwBtB+a,KAAK2F,gBAAe,IAAM3F,KAAK2G,mBAAmB3G,KAAKoF,SAAUQ,EACnE,CAGAe,kBACE3G,KAAKoF,SAASrC,SAEdxC,GAAakB,QAAQzB,KAAKoF,SAAUoB,IACpCxG,KAAKuF,SACP,CAGAM,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAO2b,GAAMJ,oBAAoBrG,MAEvC,GAAsB,iBAAXqE,EAAX,CAIA,QAAqB7K,IAAjB1O,EAAKuZ,IAAyBA,EAAOlK,WAAW,MAAmB,gBAAXkK,EAC1D,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,GAAQrE,KANb,CAOF,GACF,EAQFgG,GAAqBS,GAAO,SAK5BpK,GAAmBoK,IAYnB,MAKMI,GAAyB,4BAM/B,MAAMC,WAAe5B,GAERzI,kBACT,MAdW,QAeb,CAGAsK,SAEE/G,KAAKoF,SAASvjB,aAAa,eAAgBme,KAAKoF,SAAS5J,UAAUuL,OAhB3C,UAiB1B,CAGAlB,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAOgc,GAAOT,oBAAoBrG,MAEzB,WAAXqE,GACFvZ,EAAKuZ,IAET,GACF,EAQF9D,GAAaY,GAAGrb,SAlCe,2BAkCmB+gB,IAAwBzH,IACxEA,EAAM+C,iBACN,MAAM6E,EAAS5H,EAAMpS,OAAOmO,QAAQ0L,IACvBC,GAAOT,oBAAoBW,GACnCD,QAAQ,IAMf1K,GAAmByK,IAYnB,MAAMG,GAAiB,CACrBrU,KAAI,CAACmH,EAAU/Z,EAAU8F,SAASC,kBACzB,GAAG3G,UAAUsB,QAAQ3C,UAAUqiB,iBAAiBniB,KAAK+B,EAAS+Z,IAGvEmN,QAAO,CAACnN,EAAU/Z,EAAU8F,SAASC,kBAC5BrF,QAAQ3C,UAAU8K,cAAc5K,KAAK+B,EAAS+Z,GAGvDoN,SAAQ,CAACnnB,EAAS+Z,IACT,GAAG3a,UAAUY,EAAQmnB,UAAUvgB,QAAOzB,GAASA,EAAMiiB,QAAQrN,KAGtEsN,QAAQrnB,EAAS+Z,GACf,MAAMsN,EAAU,GAChB,IAAIC,EAAWtnB,EAAQwF,WAAW2V,QAAQpB,GAE1C,KAAOuN,GACLD,EAAQhV,KAAKiV,GACbA,EAAWA,EAAS9hB,WAAW2V,QAAQpB,GAGzC,OAAOsN,CACT,EAEAE,KAAKvnB,EAAS+Z,GACZ,IAAIyN,EAAWxnB,EAAQynB,uBAEvB,KAAOD,GAAU,CACf,GAAIA,EAASJ,QAAQrN,GACnB,MAAO,CAACyN,GAGVA,EAAWA,EAASC,sBACtB,CAEA,MAAO,EACT,EAGAniB,KAAKtF,EAAS+Z,GACZ,IAAIzU,EAAOtF,EAAQ0nB,mBAEnB,KAAOpiB,GAAM,CACX,GAAIA,EAAK8hB,QAAQrN,GACf,MAAO,CAACzU,GAGVA,EAAOA,EAAKoiB,kBACd,CAEA,MAAO,EACT,EAEAC,kBAAkB3nB,GAChB,MAAM4nB,EAAa,CAAC,IAAK,SAAU,QAAS,WAAY,SAAU,UAAW,aAAc,4BAA4BrkB,KAAIwW,GAAY,GAAGA,2BAAiCpW,KAAK,KAChL,OAAOqc,KAAKpN,KAAKgV,EAAY5nB,GAAS4G,QAAOihB,IAAOxM,GAAWwM,IAAO/M,GAAU+M,IAClF,GAeIC,GAAc,YACdC,GAAmB,aAAaD,KAChCE,GAAkB,YAAYF,KAC9BG,GAAiB,WAAWH,KAC5BI,GAAoB,cAAcJ,KAClCK,GAAkB,YAAYL,KAK9BM,GAAY,CAChBC,YAAa,KACbC,aAAc,KACdC,cAAe,MAEXC,GAAgB,CACpBH,YAAa,kBACbC,aAAc,kBACdC,cAAe,mBAMjB,MAAME,WAAczE,GAClBU,YAAY1kB,EAASqkB,GACnBc,QACAnF,KAAKoF,SAAWplB,EAEXA,GAAYyoB,GAAMC,gBAIvB1I,KAAKqF,QAAUrF,KAAKoE,WAAWC,GAC/BrE,KAAK2I,QAAU,EACf3I,KAAK4I,sBAAwB9H,QAAQzgB,OAAOwoB,cAE5C7I,KAAK8I,cACP,CAGW7E,qBACT,OAAOmE,EACT,CAEWlE,yBACT,OAAOsE,EACT,CAEW/L,kBACT,MAnDW,OAoDb,CAGA8I,UACEhF,GAAaC,IAAIR,KAAKoF,SAAU0C,GAClC,CAGAiB,OAAO3J,GACAY,KAAK4I,sBAKN5I,KAAKgJ,wBAAwB5J,KAC/BY,KAAK2I,QAAUvJ,EAAM6J,SALrBjJ,KAAK2I,QAAUvJ,EAAM8J,QAAQ,GAAGD,OAOpC,CAEAE,KAAK/J,GACCY,KAAKgJ,wBAAwB5J,KAC/BY,KAAK2I,QAAUvJ,EAAM6J,QAAUjJ,KAAK2I,SAGtC3I,KAAKoJ,eAELrM,GAAQiD,KAAKqF,QAAQgD,YACvB,CAEAgB,MAAMjK,GACJY,KAAK2I,QAAUvJ,EAAM8J,SAAW9J,EAAM8J,QAAQ/X,OAAS,EAAI,EAAIiO,EAAM8J,QAAQ,GAAGD,QAAUjJ,KAAK2I,OACjG,CAEAS,eACE,MAAME,EAAY1mB,KAAKoC,IAAIgb,KAAK2I,SAEhC,GAAIW,GA9EgB,GA+ElB,OAGF,MAAMvb,EAAYub,EAAYtJ,KAAK2I,QACnC3I,KAAK2I,QAAU,EAEV5a,GAILgP,GAAQhP,EAAY,EAAIiS,KAAKqF,QAAQkD,cAAgBvI,KAAKqF,QAAQiD,aACpE,CAEAQ,cACM9I,KAAK4I,uBACPrI,GAAaY,GAAGnB,KAAKoF,SAAU8C,IAAmB9I,GAASY,KAAK+I,OAAO3J,KACvEmB,GAAaY,GAAGnB,KAAKoF,SAAU+C,IAAiB/I,GAASY,KAAKmJ,KAAK/J,KAEnEY,KAAKoF,SAAS5J,UAAUtE,IAlGG,mBAoG3BqJ,GAAaY,GAAGnB,KAAKoF,SAAU2C,IAAkB3I,GAASY,KAAK+I,OAAO3J,KACtEmB,GAAaY,GAAGnB,KAAKoF,SAAU4C,IAAiB5I,GAASY,KAAKqJ,MAAMjK,KACpEmB,GAAaY,GAAGnB,KAAKoF,SAAU6C,IAAgB7I,GAASY,KAAKmJ,KAAK/J,KAEtE,CAEA4J,wBAAwB5J,GACtB,OAAOY,KAAK4I,wBA5GS,QA4GiBxJ,EAAMmK,aA7GrB,UA6GyDnK,EAAMmK,YACxF,CAGA1D,qBACE,MAAO,iBAAkB/f,SAASC,iBAAmB7C,UAAUsmB,eAAiB,CAClF,EAcF,MAEMC,GAAc,eACdC,GAAiB,YAKjBC,GAAa,OACbC,GAAa,OACbC,GAAiB,OACjBC,GAAkB,QAClBC,GAAc,QAAQN,KACtBO,GAAa,OAAOP,KACpBQ,GAAkB,UAAUR,KAC5BS,GAAqB,aAAaT,KAClCU,GAAqB,aAAaV,KAClCW,GAAmB,YAAYX,KAC/BY,GAAwB,OAAOZ,KAAcC,KAC7CY,GAAyB,QAAQb,KAAcC,KAC/Ca,GAAsB,WACtBC,GAAsB,SAMtBC,GAAkB,UAClBC,GAAgB,iBAChBC,GAAuBF,GAAkBC,GAKzCE,GAAmB,CACvB,UAAoBd,GACpB,WAAqBD,IAEjBgB,GAAY,CAChBC,SAAU,IACVC,UAAU,EACVC,MAAO,QACPC,MAAM,EACNC,OAAO,EACPC,MAAM,GAEFC,GAAgB,CACpBN,SAAU,mBAEVC,SAAU,UACVC,MAAO,mBACPC,KAAM,mBACNC,MAAO,UACPC,KAAM,WAMR,MAAME,WAAiBnG,GACrBR,YAAY1kB,EAASqkB,GACnBc,MAAMnlB,EAASqkB,GACfrE,KAAKsL,UAAY,KACjBtL,KAAKuL,eAAiB,KACtBvL,KAAKwL,YAAa,EAClBxL,KAAKyL,aAAe,KACpBzL,KAAK0L,aAAe,KACpB1L,KAAK2L,mBAAqB1E,GAAeC,QApCjB,uBAoC8ClH,KAAKoF,UAE3EpF,KAAK4L,qBAED5L,KAAKqF,QAAQ4F,OAASV,IACxBvK,KAAK6L,OAET,CAGW5H,qBACT,OAAO4G,EACT,CAEW3G,yBACT,OAAOkH,EACT,CAEW3O,kBACT,MAtFW,UAuFb,CAGAnX,OACE0a,KAAK8L,OAAOnC,GACd,CAEAoC,mBAIOjmB,SAASkmB,QAAUlR,GAAUkF,KAAKoF,WACrCpF,KAAK1a,MAET,CAEAiiB,OACEvH,KAAK8L,OAAOlC,GACd,CAEAoB,QACMhL,KAAKwL,YACPjR,GAAqByF,KAAKoF,UAG5BpF,KAAKiM,gBACP,CAEAJ,QACE7L,KAAKiM,iBAELjM,KAAKkM,kBAELlM,KAAKsL,UAAYa,aAAY,IAAMnM,KAAK+L,mBAAmB/L,KAAKqF,QAAQyF,SAC1E,CAEAsB,oBACOpM,KAAKqF,QAAQ4F,OAIdjL,KAAKwL,WACPjL,GAAaa,IAAIpB,KAAKoF,SAAU4E,IAAY,IAAMhK,KAAK6L,UAIzD7L,KAAK6L,QACP,CAEAQ,GAAGnT,GACD,MAAMoT,EAAQtM,KAAKuM,YAEnB,GAAIrT,EAAQoT,EAAMnb,OAAS,GAAK+H,EAAQ,EACtC,OAGF,GAAI8G,KAAKwL,WAEP,YADAjL,GAAaa,IAAIpB,KAAKoF,SAAU4E,IAAY,IAAMhK,KAAKqM,GAAGnT,KAI5D,MAAMsT,EAAcxM,KAAKyM,cAAczM,KAAK0M,cAE5C,GAAIF,IAAgBtT,EAClB,OAGF,MAAMtC,EAAQsC,EAAQsT,EAAc7C,GAAaC,GAEjD5J,KAAK8L,OAAOlV,EAAO0V,EAAMpT,GAC3B,CAEAqM,UACMvF,KAAK0L,cACP1L,KAAK0L,aAAanG,UAGpBJ,MAAMI,SACR,CAGAhB,kBAAkBF,GAEhB,OADAA,EAAOsI,gBAAkBtI,EAAOyG,SACzBzG,CACT,CAEAuH,qBACM5L,KAAKqF,QAAQ0F,UACfxK,GAAaY,GAAGnB,KAAKoF,SAAU6E,IAAiB7K,GAASY,KAAK4M,SAASxN,KAG9C,UAAvBY,KAAKqF,QAAQ2F,QACfzK,GAAaY,GAAGnB,KAAKoF,SAAU8E,IAAoB,IAAMlK,KAAKgL,UAC9DzK,GAAaY,GAAGnB,KAAKoF,SAAU+E,IAAoB,IAAMnK,KAAKoM,uBAG5DpM,KAAKqF,QAAQ6F,OAASzC,GAAMC,eAC9B1I,KAAK6M,yBAET,CAEAA,0BACE,IAAK,MAAMC,KAAO7F,GAAerU,KA/JX,qBA+JmCoN,KAAKoF,UAC5D7E,GAAaY,GAAG2L,EAAK1C,IAAkBhL,GAASA,EAAM+C,mBAGxD,MAqBM4K,EAAc,CAClBzE,aAAc,IAAMtI,KAAK8L,OAAO9L,KAAKgN,kBAAkBnD,KACvDtB,cAAe,IAAMvI,KAAK8L,OAAO9L,KAAKgN,kBAAkBlD,KACxDzB,YAxBkB,KACS,UAAvBrI,KAAKqF,QAAQ2F,QAWjBhL,KAAKgL,QAEDhL,KAAKyL,cACPwB,aAAajN,KAAKyL,cAGpBzL,KAAKyL,aAAe5N,YAAW,IAAMmC,KAAKoM,qBA7MjB,IA6M+DpM,KAAKqF,QAAQyF,UAAS,GAQhH9K,KAAK0L,aAAe,IAAIjD,GAAMzI,KAAKoF,SAAU2H,EAC/C,CAEAH,SAASxN,GACP,GAAI,kBAAkBtb,KAAKsb,EAAMpS,OAAOoZ,SACtC,OAGF,MAAMrY,EAAY6c,GAAiBxL,EAAM7hB,KAErCwQ,IACFqR,EAAM+C,iBAENnC,KAAK8L,OAAO9L,KAAKgN,kBAAkBjf,IAEvC,CAEA0e,cAAczsB,GACZ,OAAOggB,KAAKuM,YAAY3mB,QAAQ5F,EAClC,CAEAktB,2BAA2BhU,GACzB,IAAK8G,KAAK2L,mBACR,OAGF,MAAMwB,EAAkBlG,GAAeC,QAAQuD,GAAiBzK,KAAK2L,oBACrEwB,EAAgB3R,UAAUuH,OAAOyH,IACjC2C,EAAgBvrB,gBAAgB,gBAChC,MAAMwrB,EAAqBnG,GAAeC,QAAQ,sBAAsBhO,MAAW8G,KAAK2L,oBAEpFyB,IACFA,EAAmB5R,UAAUtE,IAAIsT,IACjC4C,EAAmBvrB,aAAa,eAAgB,QAEpD,CAEAqqB,kBACE,MAAMlsB,EAAUggB,KAAKuL,gBAAkBvL,KAAK0M,aAE5C,IAAK1sB,EACH,OAGF,MAAMqtB,EAAkB9P,OAAO+P,SAASttB,EAAQga,aAAa,oBAAqB,IAClFgG,KAAKqF,QAAQyF,SAAWuC,GAAmBrN,KAAKqF,QAAQsH,eAC1D,CAEAb,OAAOlV,EAAO5W,EAAU,MACtB,GAAIggB,KAAKwL,WACP,OAGF,MAAMzN,EAAgBiC,KAAK0M,aAErBa,EAAS3W,IAAU+S,GACnB6D,EAAcxtB,GAAW8d,GAAqBkC,KAAKuM,YAAaxO,EAAewP,EAAQvN,KAAKqF,QAAQ8F,MAE1G,GAAIqC,IAAgBzP,EAClB,OAGF,MAAM0P,EAAmBzN,KAAKyM,cAAce,GAEtCE,EAAeC,GACZpN,GAAakB,QAAQzB,KAAKoF,SAAUuI,EAAW,CACpD7N,cAAe0N,EACfzf,UAAWiS,KAAK4N,kBAAkBhX,GAClCkM,KAAM9C,KAAKyM,cAAc1O,GACzBsO,GAAIoB,IAMR,GAFmBC,EAAa3D,IAEjBlI,iBACb,OAGF,IAAK9D,IAAkByP,EAGrB,OAGF,MAAMK,EAAY/M,QAAQd,KAAKsL,WAC/BtL,KAAKgL,QACLhL,KAAKwL,YAAa,EAElBxL,KAAKkN,2BAA2BO,GAEhCzN,KAAKuL,eAAiBiC,EACtB,MAAMM,EAAuBP,EA/RR,sBADF,oBAiSbQ,EAAiBR,EA/RH,qBACA,qBA+RpBC,EAAYhS,UAAUtE,IAAI6W,GAC1BhS,GAAOyR,GACPzP,EAAcvC,UAAUtE,IAAI4W,GAC5BN,EAAYhS,UAAUtE,IAAI4W,GAU1B9N,KAAK2F,gBARoB,KACvB6H,EAAYhS,UAAUuH,OAAO+K,EAAsBC,GACnDP,EAAYhS,UAAUtE,IAAIsT,IAC1BzM,EAAcvC,UAAUuH,OAAOyH,GAAqBuD,EAAgBD,GACpE9N,KAAKwL,YAAa,EAClBkC,EAAa1D,GAAW,GAGYjM,EAAeiC,KAAKgO,eAEtDH,GACF7N,KAAK6L,OAET,CAEAmC,cACE,OAAOhO,KAAKoF,SAAS5J,UAAUvW,SAxTV,QAyTvB,CAEAynB,aACE,OAAOzF,GAAeC,QAAQyD,GAAsB3K,KAAKoF,SAC3D,CAEAmH,YACE,OAAOtF,GAAerU,KAAK8X,GAAe1K,KAAKoF,SACjD,CAEA6G,iBACMjM,KAAKsL,YACP2C,cAAcjO,KAAKsL,WACnBtL,KAAKsL,UAAY,KAErB,CAEA0B,kBAAkBjf,GAChB,OAAIoO,KACKpO,IAAc8b,GAAiBD,GAAaD,GAG9C5b,IAAc8b,GAAiBF,GAAaC,EACrD,CAEAgE,kBAAkBhX,GAChB,OAAIuF,KACKvF,IAAUgT,GAAaC,GAAiBC,GAG1ClT,IAAUgT,GAAaE,GAAkBD,EAClD,CAGAhE,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAOugB,GAAShF,oBAAoBrG,KAAMqE,GAEhD,GAAsB,iBAAXA,GAKX,GAAsB,iBAAXA,EAAqB,CAC9B,QAAqB7K,IAAjB1O,EAAKuZ,IAAyBA,EAAOlK,WAAW,MAAmB,gBAAXkK,EAC1D,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,IACP,OAVEvZ,EAAKuhB,GAAGhI,EAWZ,GACF,EAQF9D,GAAaY,GAAGrb,SAAUwkB,GA1WE,uCA0W2C,SAAUlL,GAC/E,MAAMpS,EAASsN,GAAuB0F,MAEtC,IAAKhT,IAAWA,EAAOwO,UAAUvW,SAASslB,IACxC,OAGFnL,EAAM+C,iBACN,MAAM+L,EAAW7C,GAAShF,oBAAoBrZ,GACxCmhB,EAAanO,KAAKhG,aAAa,oBAErC,OAAImU,GACFD,EAAS7B,GAAG8B,QAEZD,EAAS9B,qBAKyC,SAAhD7I,GAAYQ,iBAAiB/D,KAAM,UACrCkO,EAAS5oB,YAET4oB,EAAS9B,sBAKX8B,EAAS3G,YAET2G,EAAS9B,oBACX,IACA7L,GAAaY,GAAG9gB,OAAQgqB,IAAuB,KAC7C,MAAM+D,EAAYnH,GAAerU,KAzYR,6BA2YzB,IAAK,MAAMsb,KAAYE,EACrB/C,GAAShF,oBAAoB6H,EAC/B,IAMF7R,GAAmBgP,IAYnB,MAEMgD,GAAc,eAEdC,GAAe,OAAOD,KACtBE,GAAgB,QAAQF,KACxBG,GAAe,OAAOH,KACtBI,GAAiB,SAASJ,KAC1BK,GAAyB,QAAQL,cACjCM,GAAoB,OACpBC,GAAsB,WACtBC,GAAwB,aAExBC,GAA6B,WAAWF,OAAwBA,KAKhEG,GAAyB,8BACzBC,GAAY,CAChB9pB,OAAQ,KACR6hB,QAAQ,GAEJkI,GAAgB,CACpB/pB,OAAQ,iBACR6hB,OAAQ,WAMV,MAAMmI,WAAiBhK,GACrBR,YAAY1kB,EAASqkB,GACnBc,MAAMnlB,EAASqkB,GACfrE,KAAKmP,kBAAmB,EACxBnP,KAAKoP,cAAgB,GACrB,MAAMC,EAAapI,GAAerU,KAAKmc,IAEvC,IAAK,MAAMO,KAAQD,EAAY,CAC7B,MAAMtV,EAAWM,GAAuBiV,GAClCC,EAAgBtI,GAAerU,KAAKmH,GAAUnT,QAAO4oB,GAAgBA,IAAiBxP,KAAKoF,WAEhF,OAAbrL,GAAqBwV,EAAcpe,QACrC6O,KAAKoP,cAAc/c,KAAKid,EAE5B,CAEAtP,KAAKyP,sBAEAzP,KAAKqF,QAAQngB,QAChB8a,KAAK0P,0BAA0B1P,KAAKoP,cAAepP,KAAK2P,YAGtD3P,KAAKqF,QAAQ0B,QACf/G,KAAK+G,QAET,CAGW9C,qBACT,OAAO+K,EACT,CAEW9K,yBACT,OAAO+K,EACT,CAEWxS,kBACT,MApEW,UAqEb,CAGAsK,SACM/G,KAAK2P,WACP3P,KAAK4P,OAEL5P,KAAK6P,MAET,CAEAA,OACE,GAAI7P,KAAKmP,kBAAoBnP,KAAK2P,WAChC,OAGF,IAAIG,EAAiB,GAQrB,GANI9P,KAAKqF,QAAQngB,SACf4qB,EAAiB9P,KAAK+P,uBAvEH,wCAuE4CnpB,QAAO5G,GAAWA,IAAYggB,KAAKoF,WAAU7hB,KAAIvD,GAAWkvB,GAAS7I,oBAAoBrmB,EAAS,CAC/J+mB,QAAQ,OAIR+I,EAAe3e,QAAU2e,EAAe,GAAGX,iBAC7C,OAKF,GAFmB5O,GAAakB,QAAQzB,KAAKoF,SAAUkJ,IAExCzM,iBACb,OAGF,IAAK,MAAMmO,KAAkBF,EAC3BE,EAAeJ,OAGjB,MAAMK,EAAYjQ,KAAKkQ,gBAEvBlQ,KAAKoF,SAAS5J,UAAUuH,OAAO6L,IAE/B5O,KAAKoF,SAAS5J,UAAUtE,IAAI2X,IAE5B7O,KAAKoF,SAAS5jB,MAAMyuB,GAAa,EAEjCjQ,KAAK0P,0BAA0B1P,KAAKoP,eAAe,GAEnDpP,KAAKmP,kBAAmB,EAExB,MAYMgB,EAAa,SADUF,EAAU,GAAGhL,cAAgBgL,EAAUpd,MAAM,KAG1EmN,KAAK2F,gBAdY,KACf3F,KAAKmP,kBAAmB,EAExBnP,KAAKoF,SAAS5J,UAAUuH,OAAO8L,IAE/B7O,KAAKoF,SAAS5J,UAAUtE,IAAI0X,GAAqBD,IAEjD3O,KAAKoF,SAAS5jB,MAAMyuB,GAAa,GACjC1P,GAAakB,QAAQzB,KAAKoF,SAAUmJ,GAAc,GAMtBvO,KAAKoF,UAAU,GAE7CpF,KAAKoF,SAAS5jB,MAAMyuB,GAAa,GAAGjQ,KAAKoF,SAAS+K,MACpD,CAEAP,OACE,GAAI5P,KAAKmP,mBAAqBnP,KAAK2P,WACjC,OAKF,GAFmBpP,GAAakB,QAAQzB,KAAKoF,SAAUoJ,IAExC3M,iBACb,OAGF,MAAMoO,EAAYjQ,KAAKkQ,gBAEvBlQ,KAAKoF,SAAS5jB,MAAMyuB,GAAa,GAAGjQ,KAAKoF,SAASrhB,wBAAwBksB,OAC1ElU,GAAOiE,KAAKoF,UAEZpF,KAAKoF,SAAS5J,UAAUtE,IAAI2X,IAE5B7O,KAAKoF,SAAS5J,UAAUuH,OAAO6L,GAAqBD,IAEpD,IAAK,MAAMlN,KAAWzB,KAAKoP,cAAe,CACxC,MAAMpvB,EAAUsa,GAAuBmH,GAEnCzhB,IAAYggB,KAAK2P,SAAS3vB,IAC5BggB,KAAK0P,0BAA0B,CAACjO,IAAU,EAE9C,CAEAzB,KAAKmP,kBAAmB,EAYxBnP,KAAKoF,SAAS5jB,MAAMyuB,GAAa,GAEjCjQ,KAAK2F,gBAZY,KACf3F,KAAKmP,kBAAmB,EAExBnP,KAAKoF,SAAS5J,UAAUuH,OAAO8L,IAE/B7O,KAAKoF,SAAS5J,UAAUtE,IAAI0X,IAE5BrO,GAAakB,QAAQzB,KAAKoF,SAAUqJ,GAAe,GAKvBzO,KAAKoF,UAAU,EAC/C,CAEAuK,SAAS3vB,EAAUggB,KAAKoF,UACtB,OAAOplB,EAAQwb,UAAUvW,SAAS0pB,GACpC,CAGApK,kBAAkBF,GAIhB,OAHAA,EAAO0C,OAASjG,QAAQuD,EAAO0C,QAE/B1C,EAAOnf,OAAS2V,GAAWwJ,EAAOnf,QAC3Bmf,CACT,CAEA6L,gBACE,OAAOlQ,KAAKoF,SAAS5J,UAAUvW,SAtLL,uBAChB,QACC,QAqLb,CAEAwqB,sBACE,IAAKzP,KAAKqF,QAAQngB,OAChB,OAGF,MAAMiiB,EAAWnH,KAAK+P,uBAAuBhB,IAE7C,IAAK,MAAM/uB,KAAWmnB,EAAU,CAC9B,MAAMiJ,EAAW9V,GAAuBta,GAEpCowB,GACFpQ,KAAK0P,0BAA0B,CAAC1vB,GAAUggB,KAAK2P,SAASS,GAE5D,CACF,CAEAL,uBAAuBhW,GACrB,MAAMoN,EAAWF,GAAerU,KAAKkc,GAA4B9O,KAAKqF,QAAQngB,QAE9E,OAAO+hB,GAAerU,KAAKmH,EAAUiG,KAAKqF,QAAQngB,QAAQ0B,QAAO5G,IAAYmnB,EAASjN,SAASla,IACjG,CAEA0vB,0BAA0BW,EAAcC,GACtC,GAAKD,EAAalf,OAIlB,IAAK,MAAMnR,KAAWqwB,EACpBrwB,EAAQwb,UAAUuL,OAvNK,aAuNyBuJ,GAChDtwB,EAAQ6B,aAAa,gBAAiByuB,EAE1C,CAGAzK,uBAAuBxB,GACrB,MAAMgB,EAAU,CAAC,EAMjB,MAJsB,iBAAXhB,GAAuB,YAAYvgB,KAAKugB,KACjDgB,EAAQ0B,QAAS,GAGZ/G,KAAK4G,MAAK,WACf,MAAM9b,EAAOokB,GAAS7I,oBAAoBrG,KAAMqF,GAEhD,GAAsB,iBAAXhB,EAAqB,CAC9B,QAA4B,IAAjBvZ,EAAKuZ,GACd,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,IACP,CACF,GACF,EAQF9D,GAAaY,GAAGrb,SAAU4oB,GAAwBK,IAAwB,SAAU3P,IAErD,MAAzBA,EAAMpS,OAAOoZ,SAAmBhH,EAAMW,gBAAmD,MAAjCX,EAAMW,eAAeqG,UAC/EhH,EAAM+C,iBAGR,MAAMpI,EAAWM,GAAuB2F,MAClCuQ,EAAmBtJ,GAAerU,KAAKmH,GAE7C,IAAK,MAAM/Z,KAAWuwB,EACpBrB,GAAS7I,oBAAoBrmB,EAAS,CACpC+mB,QAAQ,IACPA,QAEP,IAKA1K,GAAmB6S,IAYnB,MAAMsB,GAAS,WAETC,GAAc,eACdC,GAAiB,YAGjBC,GAAiB,UACjBC,GAAmB,YAGnBC,GAAe,OAAOJ,KACtBK,GAAiB,SAASL,KAC1BM,GAAe,OAAON,KACtBO,GAAgB,QAAQP,KACxBQ,GAAyB,QAAQR,KAAcC,KAC/CQ,GAAyB,UAAUT,KAAcC,KACjDS,GAAuB,QAAQV,KAAcC,KAC7CU,GAAoB,OAMpBC,GAAyB,4DACzBC,GAA6B,GAAGD,MAA0BD,KAC1DG,GAAgB,iBAIhBC,GAAgBrV,KAAU,UAAY,YACtCsV,GAAmBtV,KAAU,YAAc,UAC3CuV,GAAmBvV,KAAU,aAAe,eAC5CwV,GAAsBxV,KAAU,eAAiB,aACjDyV,GAAkBzV,KAAU,aAAe,cAC3C0V,GAAiB1V,KAAU,cAAgB,aAG3C2V,GAAY,CAChBC,WAAW,EACXrjB,SAAU,kBACVsjB,QAAS,UACTvpB,OAAQ,CAAC,EAAG,GACZwpB,aAAc,KACdlzB,UAAW,UAEPmzB,GAAgB,CACpBH,UAAW,mBACXrjB,SAAU,mBACVsjB,QAAS,SACTvpB,OAAQ,0BACRwpB,aAAc,yBACdlzB,UAAW,2BAMb,MAAMozB,WAAiBjN,GACrBR,YAAY1kB,EAASqkB,GACnBc,MAAMnlB,EAASqkB,GACfrE,KAAKoS,QAAU,KACfpS,KAAKqS,QAAUrS,KAAKoF,SAAS5f,WAG7Bwa,KAAKsS,MAAQrL,GAAe3hB,KAAK0a,KAAKoF,SAAUmM,IAAe,IAAMtK,GAAeM,KAAKvH,KAAKoF,SAAUmM,IAAe,IAAMtK,GAAeC,QAAQqK,GAAevR,KAAKqS,SACxKrS,KAAKuS,UAAYvS,KAAKwS,eACxB,CAGWvO,qBACT,OAAO6N,EACT,CAEW5N,yBACT,OAAOgO,EACT,CAEWzV,kBACT,OAAO+T,EACT,CAGAzJ,SACE,OAAO/G,KAAK2P,WAAa3P,KAAK4P,OAAS5P,KAAK6P,MAC9C,CAEAA,OACE,GAAIxU,GAAW2E,KAAKoF,WAAapF,KAAK2P,WACpC,OAGF,MAAM7P,EAAgB,CACpBA,cAAeE,KAAKoF,UAItB,IAFkB7E,GAAakB,QAAQzB,KAAKoF,SAAU2L,GAAcjR,GAEtD+B,iBAAd,CAUA,GANA7B,KAAKyS,gBAMD,iBAAkB3sB,SAASC,kBAAoBia,KAAKqS,QAAQlX,QA/ExC,eAgFtB,IAAK,MAAMnb,IAAW,GAAGZ,UAAU0G,SAAS6G,KAAKwa,UAC/C5G,GAAaY,GAAGnhB,EAAS,YAAa8b,IAI1CkE,KAAKoF,SAASsN,QAEd1S,KAAKoF,SAASvjB,aAAa,iBAAiB,GAE5Cme,KAAKsS,MAAM9W,UAAUtE,IAAIka,IAEzBpR,KAAKoF,SAAS5J,UAAUtE,IAAIka,IAE5B7Q,GAAakB,QAAQzB,KAAKoF,SAAU4L,GAAelR,EAtBnD,CAuBF,CAEA8P,OACE,GAAIvU,GAAW2E,KAAKoF,YAAcpF,KAAK2P,WACrC,OAGF,MAAM7P,EAAgB,CACpBA,cAAeE,KAAKoF,UAGtBpF,KAAK2S,cAAc7S,EACrB,CAEAyF,UACMvF,KAAKoS,SACPpS,KAAKoS,QAAQ3Y,UAGf0L,MAAMI,SACR,CAEA/Z,SACEwU,KAAKuS,UAAYvS,KAAKwS,gBAElBxS,KAAKoS,SACPpS,KAAKoS,QAAQ5mB,QAEjB,CAGAmnB,cAAc7S,GAGZ,IAFkBS,GAAakB,QAAQzB,KAAKoF,SAAUyL,GAAc/Q,GAEtD+B,iBAAd,CAMA,GAAI,iBAAkB/b,SAASC,gBAC7B,IAAK,MAAM/F,IAAW,GAAGZ,UAAU0G,SAAS6G,KAAKwa,UAC/C5G,GAAaC,IAAIxgB,EAAS,YAAa8b,IAIvCkE,KAAKoS,SACPpS,KAAKoS,QAAQ3Y,UAGfuG,KAAKsS,MAAM9W,UAAUuH,OAAOqO,IAE5BpR,KAAKoF,SAAS5J,UAAUuH,OAAOqO,IAE/BpR,KAAKoF,SAASvjB,aAAa,gBAAiB,SAE5C0hB,GAAYE,oBAAoBzD,KAAKsS,MAAO,UAC5C/R,GAAakB,QAAQzB,KAAKoF,SAAU0L,GAAgBhR,EArBpD,CAsBF,CAEAsE,WAAWC,GAGT,GAAgC,iBAFhCA,EAASc,MAAMf,WAAWC,IAERtlB,YAA2B,GAAUslB,EAAOtlB,YAAgE,mBAA3CslB,EAAOtlB,UAAUgF,sBAElG,MAAM,IAAIihB,UAAU,GAAGwL,GAAOvL,+GAGhC,OAAOZ,CACT,CAEAoO,gBACE,QAAsB,IAAX,EACT,MAAM,IAAIzN,UAAU,gEAGtB,IAAI4N,EAAmB5S,KAAKoF,SAEG,WAA3BpF,KAAKqF,QAAQtmB,UACf6zB,EAAmB5S,KAAKqS,QACf,GAAUrS,KAAKqF,QAAQtmB,WAChC6zB,EAAmB/X,GAAWmF,KAAKqF,QAAQtmB,WACA,iBAA3BihB,KAAKqF,QAAQtmB,YAC7B6zB,EAAmB5S,KAAKqF,QAAQtmB,WAGlC,MAAMkzB,EAAejS,KAAK6S,mBAE1B7S,KAAKoS,QAAU,GAAoBQ,EAAkB5S,KAAKsS,MAAOL,EACnE,CAEAtC,WACE,OAAO3P,KAAKsS,MAAM9W,UAAUvW,SAASmsB,GACvC,CAEA0B,gBACE,MAAMC,EAAiB/S,KAAKqS,QAE5B,GAAIU,EAAevX,UAAUvW,SAxMN,WAyMrB,OAAO2sB,GAGT,GAAImB,EAAevX,UAAUvW,SA3MJ,aA4MvB,OAAO4sB,GAGT,GAAIkB,EAAevX,UAAUvW,SA9MA,iBA+M3B,MAjMsB,MAoMxB,GAAI8tB,EAAevX,UAAUvW,SAjNE,mBAkN7B,MApMyB,SAwM3B,MAAM+tB,EAAkF,QAA1EttB,iBAAiBsa,KAAKsS,OAAOrX,iBAAiB,iBAAiBb,OAE7E,OAAI2Y,EAAevX,UAAUvW,SA5NP,UA6Nb+tB,EAAQvB,GAAmBD,GAG7BwB,EAAQrB,GAAsBD,EACvC,CAEAc,gBACE,OAAkD,OAA3CxS,KAAKoF,SAASjK,QA5ND,UA6NtB,CAEA8X,aACE,MAAM,OACJxqB,GACEuX,KAAKqF,QAET,MAAsB,iBAAX5c,EACFA,EAAO9F,MAAM,KAAKY,KAAInF,GAASmf,OAAO+P,SAASlvB,EAAO,MAGzC,mBAAXqK,EACFyqB,GAAczqB,EAAOyqB,EAAYlT,KAAKoF,UAGxC3c,CACT,CAEAoqB,mBACE,MAAMM,EAAwB,CAC5Bh0B,UAAW6gB,KAAK8S,gBAChBjc,UAAW,CAAC,CACV9V,KAAM,kBACNmB,QAAS,CACPwM,SAAUsR,KAAKqF,QAAQ3W,WAExB,CACD3N,KAAM,SACNmB,QAAS,CACPuG,OAAQuX,KAAKiT,iBAcnB,OATIjT,KAAKuS,WAAsC,WAAzBvS,KAAKqF,QAAQ2M,WACjCzO,GAAYC,iBAAiBxD,KAAKsS,MAAO,SAAU,UAEnDa,EAAsBtc,UAAY,CAAC,CACjC9V,KAAM,cACNC,SAAS,KAIN,IAAKmyB,KAC+B,mBAA9BnT,KAAKqF,QAAQ4M,aAA8BjS,KAAKqF,QAAQ4M,aAAakB,GAAyBnT,KAAKqF,QAAQ4M,aAE1H,CAEAmB,iBAAgB,IACd71B,EAAG,OACHyP,IAEA,MAAMsf,EAAQrF,GAAerU,KA/QF,8DA+Q+BoN,KAAKsS,OAAO1rB,QAAO5G,GAAW8a,GAAU9a,KAE7FssB,EAAMnb,QAMX2M,GAAqBwO,EAAOtf,EAAQzP,IAAQqzB,IAAmBtE,EAAMpS,SAASlN,IAAS0lB,OACzF,CAGA7M,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAOqnB,GAAS9L,oBAAoBrG,KAAMqE,GAEhD,GAAsB,iBAAXA,EAAX,CAIA,QAA4B,IAAjBvZ,EAAKuZ,GACd,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,IANL,CAOF,GACF,CAEAwB,kBAAkBzG,GAChB,GAhUuB,IAgUnBA,EAAM4H,QAAgD,UAAf5H,EAAMqB,MAnUnC,QAmUuDrB,EAAM7hB,IACzE,OAGF,MAAM81B,EAAcpM,GAAerU,KAAK0e,IAExC,IAAK,MAAMvK,KAAUsM,EAAa,CAChC,MAAMC,EAAUnB,GAASrM,YAAYiB,GAErC,IAAKuM,IAAyC,IAA9BA,EAAQjO,QAAQ0M,UAC9B,SAGF,MAAMwB,EAAenU,EAAMmU,eACrBC,EAAeD,EAAarZ,SAASoZ,EAAQhB,OAEnD,GAAIiB,EAAarZ,SAASoZ,EAAQlO,WAA2C,WAA9BkO,EAAQjO,QAAQ0M,YAA2ByB,GAA8C,YAA9BF,EAAQjO,QAAQ0M,WAA2ByB,EACnJ,SAIF,GAAIF,EAAQhB,MAAMrtB,SAASma,EAAMpS,UAA2B,UAAfoS,EAAMqB,MAxVvC,QAwV2DrB,EAAM7hB,KAAqB,qCAAqCuG,KAAKsb,EAAMpS,OAAOoZ,UACvJ,SAGF,MAAMtG,EAAgB,CACpBA,cAAewT,EAAQlO,UAGN,UAAfhG,EAAMqB,OACRX,EAAcqG,WAAa/G,GAG7BkU,EAAQX,cAAc7S,EACxB,CACF,CAEA+F,6BAA6BzG,GAG3B,MAAMqU,EAAU,kBAAkB3vB,KAAKsb,EAAMpS,OAAOoZ,SAC9CsN,EA7WW,WA6WKtU,EAAM7hB,IACtBo2B,EAAkB,CAAChD,GAAgBC,IAAkB1W,SAASkF,EAAM7hB,KAE1E,IAAKo2B,IAAoBD,EACvB,OAGF,GAAID,IAAYC,EACd,OAGFtU,EAAM+C,iBAEN,MAAMyR,EAAkB5T,KAAKoH,QAAQiK,IAA0BrR,KAAOiH,GAAeM,KAAKvH,KAAMqR,IAAwB,IAAMpK,GAAe3hB,KAAK0a,KAAMqR,IAAwB,IAAMpK,GAAeC,QAAQmK,GAAwBjS,EAAMW,eAAeva,YACpPwF,EAAWmnB,GAAS9L,oBAAoBuN,GAE9C,GAAID,EAMF,OALAvU,EAAMyU,kBACN7oB,EAAS6kB,YAET7kB,EAASooB,gBAAgBhU,GAKvBpU,EAAS2kB,aAEXvQ,EAAMyU,kBACN7oB,EAAS4kB,OACTgE,EAAgBlB,QAEpB,EAQFnS,GAAaY,GAAGrb,SAAUorB,GAAwBG,GAAwBc,GAAS2B,uBACnFvT,GAAaY,GAAGrb,SAAUorB,GAAwBK,GAAeY,GAAS2B,uBAC1EvT,GAAaY,GAAGrb,SAAUmrB,GAAwBkB,GAAS4B,YAC3DxT,GAAaY,GAAGrb,SAAUqrB,GAAsBgB,GAAS4B,YACzDxT,GAAaY,GAAGrb,SAAUmrB,GAAwBI,IAAwB,SAAUjS,GAClFA,EAAM+C,iBACNgQ,GAAS9L,oBAAoBrG,MAAM+G,QACrC,IAKA1K,GAAmB8V,IAYnB,MAAM6B,GAAyB,oDACzBC,GAA0B,cAC1BC,GAAmB,gBACnBC,GAAkB,eAKxB,MAAMC,GACJ1P,cACE1E,KAAKoF,SAAWtf,SAAS6G,IAC3B,CAGA0nB,WAEE,MAAMC,EAAgBxuB,SAASC,gBAAgBuC,YAC/C,OAAO1F,KAAKoC,IAAI3E,OAAOk0B,WAAaD,EACtC,CAEA1E,OACE,MAAMtrB,EAAQ0b,KAAKqU,WAEnBrU,KAAKwU,mBAGLxU,KAAKyU,sBAAsBzU,KAAKoF,SAAU8O,IAAkBQ,GAAmBA,EAAkBpwB,IAGjG0b,KAAKyU,sBAAsBT,GAAwBE,IAAkBQ,GAAmBA,EAAkBpwB,IAE1G0b,KAAKyU,sBAAsBR,GAAyBE,IAAiBO,GAAmBA,EAAkBpwB,GAC5G,CAEAwO,QACEkN,KAAK2U,wBAAwB3U,KAAKoF,SAAU,YAE5CpF,KAAK2U,wBAAwB3U,KAAKoF,SAAU8O,IAE5ClU,KAAK2U,wBAAwBX,GAAwBE,IAErDlU,KAAK2U,wBAAwBV,GAAyBE,GACxD,CAEAS,gBACE,OAAO5U,KAAKqU,WAAa,CAC3B,CAGAG,mBACExU,KAAK6U,sBAAsB7U,KAAKoF,SAAU,YAE1CpF,KAAKoF,SAAS5jB,MAAM+K,SAAW,QACjC,CAEAkoB,sBAAsB1a,EAAU+a,EAAevY,GAC7C,MAAMwY,EAAiB/U,KAAKqU,WAa5BrU,KAAKgV,2BAA2Bjb,GAXH/Z,IAC3B,GAAIA,IAAYggB,KAAKoF,UAAY/kB,OAAOk0B,WAAav0B,EAAQsI,YAAcysB,EACzE,OAGF/U,KAAK6U,sBAAsB70B,EAAS80B,GAEpC,MAAMJ,EAAkBr0B,OAAOqF,iBAAiB1F,GAASib,iBAAiB6Z,GAC1E90B,EAAQwB,MAAMyzB,YAAYH,EAAe,GAAGvY,EAASgB,OAAOC,WAAWkX,QAAsB,GAIjG,CAEAG,sBAAsB70B,EAAS80B,GAC7B,MAAMI,EAAcl1B,EAAQwB,MAAMyZ,iBAAiB6Z,GAE/CI,GACF3R,GAAYC,iBAAiBxjB,EAAS80B,EAAeI,EAEzD,CAEAP,wBAAwB5a,EAAU+a,GAahC9U,KAAKgV,2BAA2Bjb,GAZH/Z,IAC3B,MAAM5B,EAAQmlB,GAAYQ,iBAAiB/jB,EAAS80B,GAEtC,OAAV12B,GAKJmlB,GAAYE,oBAAoBzjB,EAAS80B,GACzC90B,EAAQwB,MAAMyzB,YAAYH,EAAe12B,IALvC4B,EAAQwB,MAAM2zB,eAAeL,EAKgB,GAInD,CAEAE,2BAA2Bjb,EAAUqb,GACnC,GAAI,GAAUrb,GACZqb,EAASrb,QAIX,IAAK,MAAMsb,KAAOpO,GAAerU,KAAKmH,EAAUiG,KAAKoF,UACnDgQ,EAASC,EAEb,EAcF,MAAMC,GAAS,WAETC,GAAoB,OACpBC,GAAkB,gBAAgBF,KAClCG,GAAY,CAChBC,UAAW,iBACXC,cAAe,KACf/P,YAAY,EACZ9K,WAAW,EAEX8a,YAAa,QAGTC,GAAgB,CACpBH,UAAW,SACXC,cAAe,kBACf/P,WAAY,UACZ9K,UAAW,UACX8a,YAAa,oBAMf,MAAME,WAAiB9R,GACrBU,YAAYL,GACVc,QACAnF,KAAKqF,QAAUrF,KAAKoE,WAAWC,GAC/BrE,KAAK+V,aAAc,EACnB/V,KAAKoF,SAAW,IAClB,CAGWnB,qBACT,OAAOwR,EACT,CAEWvR,yBACT,OAAO2R,EACT,CAEWpZ,kBACT,OAAO6Y,EACT,CAGAzF,KAAKtT,GACH,IAAKyD,KAAKqF,QAAQvK,UAEhB,YADAiC,GAAQR,GAIVyD,KAAKgW,UAEL,MAAMh2B,EAAUggB,KAAKiW,cAEjBjW,KAAKqF,QAAQO,YACf7J,GAAO/b,GAGTA,EAAQwb,UAAUtE,IAAIqe,IAEtBvV,KAAKkW,mBAAkB,KACrBnZ,GAAQR,EAAS,GAErB,CAEAqT,KAAKrT,GACEyD,KAAKqF,QAAQvK,WAKlBkF,KAAKiW,cAAcza,UAAUuH,OAAOwS,IAEpCvV,KAAKkW,mBAAkB,KACrBlW,KAAKuF,UACLxI,GAAQR,EAAS,KARjBQ,GAAQR,EAUZ,CAEAgJ,UACOvF,KAAK+V,cAIVxV,GAAaC,IAAIR,KAAKoF,SAAUoQ,IAEhCxV,KAAKoF,SAASrC,SAEd/C,KAAK+V,aAAc,EACrB,CAGAE,cACE,IAAKjW,KAAKoF,SAAU,CAClB,MAAM+Q,EAAWrwB,SAASswB,cAAc,OACxCD,EAAST,UAAY1V,KAAKqF,QAAQqQ,UAE9B1V,KAAKqF,QAAQO,YACfuQ,EAAS3a,UAAUtE,IAnGD,QAsGpB8I,KAAKoF,SAAW+Q,CAClB,CAEA,OAAOnW,KAAKoF,QACd,CAEAb,kBAAkBF,GAGhB,OADAA,EAAOuR,YAAc/a,GAAWwJ,EAAOuR,aAChCvR,CACT,CAEA2R,UACE,GAAIhW,KAAK+V,YACP,OAGF,MAAM/1B,EAAUggB,KAAKiW,cAErBjW,KAAKqF,QAAQuQ,YAAYS,OAAOr2B,GAEhCugB,GAAaY,GAAGnhB,EAASw1B,IAAiB,KACxCzY,GAAQiD,KAAKqF,QAAQsQ,cAAc,IAErC3V,KAAK+V,aAAc,CACrB,CAEAG,kBAAkB3Z,GAChBS,GAAuBT,EAAUyD,KAAKiW,cAAejW,KAAKqF,QAAQO,WACpE,EAcF,MAEM0Q,GAAc,gBACdC,GAAkB,UAAUD,KAC5BE,GAAoB,cAAcF,KAGlCG,GAAmB,WACnBC,GAAY,CAChBC,WAAW,EACXC,YAAa,MAGTC,GAAgB,CACpBF,UAAW,UACXC,YAAa,WAMf,MAAME,WAAkB9S,GACtBU,YAAYL,GACVc,QACAnF,KAAKqF,QAAUrF,KAAKoE,WAAWC,GAC/BrE,KAAK+W,WAAY,EACjB/W,KAAKgX,qBAAuB,IAC9B,CAGW/S,qBACT,OAAOyS,EACT,CAEWxS,yBACT,OAAO2S,EACT,CAEWpa,kBACT,MAvCW,WAwCb,CAGAwa,WACMjX,KAAK+W,YAIL/W,KAAKqF,QAAQsR,WACf3W,KAAKqF,QAAQuR,YAAYlE,QAG3BnS,GAAaC,IAAI1a,SAAUwwB,IAE3B/V,GAAaY,GAAGrb,SAAUywB,IAAiBnX,GAASY,KAAKkX,eAAe9X,KACxEmB,GAAaY,GAAGrb,SAAU0wB,IAAmBpX,GAASY,KAAKmX,eAAe/X,KAC1EY,KAAK+W,WAAY,EACnB,CAEAK,aACOpX,KAAK+W,YAIV/W,KAAK+W,WAAY,EACjBxW,GAAaC,IAAI1a,SAAUwwB,IAC7B,CAGAY,eAAe9X,GACb,MAAM,YACJwX,GACE5W,KAAKqF,QAET,GAAIjG,EAAMpS,SAAWlH,UAAYsZ,EAAMpS,SAAW4pB,GAAeA,EAAY3xB,SAASma,EAAMpS,QAC1F,OAGF,MAAM1L,EAAW2lB,GAAeU,kBAAkBiP,GAE1B,IAApBt1B,EAAS6P,OACXylB,EAAYlE,QACH1S,KAAKgX,uBAAyBP,GACvCn1B,EAASA,EAAS6P,OAAS,GAAGuhB,QAE9BpxB,EAAS,GAAGoxB,OAEhB,CAEAyE,eAAe/X,GApFD,QAqFRA,EAAM7hB,MAIVyiB,KAAKgX,qBAAuB5X,EAAMiY,SAAWZ,GAxFzB,UAyFtB,EAcF,MAEMa,GAAc,YAGdC,GAAe,OAAOD,KACtBE,GAAyB,gBAAgBF,KACzCG,GAAiB,SAASH,KAC1BI,GAAe,OAAOJ,KACtBK,GAAgB,QAAQL,KACxBM,GAAiB,SAASN,KAC1BO,GAAsB,gBAAgBP,KACtCQ,GAA0B,oBAAoBR,KAC9CS,GAA0B,kBAAkBT,KAC5CU,GAAyB,QAAQV,cACjCW,GAAkB,aAElBC,GAAoB,OACpBC,GAAoB,eAKpBC,GAAY,CAChBjC,UAAU,EACVzD,OAAO,EACP3H,UAAU,GAENsN,GAAgB,CACpBlC,SAAU,mBACVzD,MAAO,UACP3H,SAAU,WAMZ,MAAMuN,WAAcpT,GAClBR,YAAY1kB,EAASqkB,GACnBc,MAAMnlB,EAASqkB,GACfrE,KAAKuY,QAAUtR,GAAeC,QApBV,gBAoBmClH,KAAKoF,UAC5DpF,KAAKwY,UAAYxY,KAAKyY,sBACtBzY,KAAK0Y,WAAa1Y,KAAK2Y,uBACvB3Y,KAAK2P,UAAW,EAChB3P,KAAKmP,kBAAmB,EACxBnP,KAAK4Y,WAAa,IAAIxE,GAEtBpU,KAAK4L,oBACP,CAGW3H,qBACT,OAAOmU,EACT,CAEWlU,yBACT,OAAOmU,EACT,CAEW5b,kBACT,MA5DW,OA6Db,CAGAsK,OAAOjH,GACL,OAAOE,KAAK2P,SAAW3P,KAAK4P,OAAS5P,KAAK6P,KAAK/P,EACjD,CAEA+P,KAAK/P,GACCE,KAAK2P,UAAY3P,KAAKmP,kBAIR5O,GAAakB,QAAQzB,KAAKoF,SAAUsS,GAAc,CAClE5X,kBAGY+B,mBAId7B,KAAK2P,UAAW,EAChB3P,KAAKmP,kBAAmB,EAExBnP,KAAK4Y,WAAWhJ,OAEhB9pB,SAAS6G,KAAK6O,UAAUtE,IAAI+gB,IAE5BjY,KAAK6Y,gBAEL7Y,KAAKwY,UAAU3I,MAAK,IAAM7P,KAAK8Y,aAAahZ,KAC9C,CAEA8P,OACO5P,KAAK2P,WAAY3P,KAAKmP,mBAIT5O,GAAakB,QAAQzB,KAAKoF,SAAUmS,IAExC1V,mBAId7B,KAAK2P,UAAW,EAChB3P,KAAKmP,kBAAmB,EAExBnP,KAAK0Y,WAAWtB,aAEhBpX,KAAKoF,SAAS5J,UAAUuH,OAAOmV,IAE/BlY,KAAK2F,gBAAe,IAAM3F,KAAK+Y,cAAc/Y,KAAKoF,SAAUpF,KAAKgO,gBACnE,CAEAzI,UACE,IAAK,MAAMyT,IAAe,CAAC34B,OAAQ2f,KAAKuY,SACtChY,GAAaC,IAAIwY,EAAa1B,IAGhCtX,KAAKwY,UAAUjT,UAEfvF,KAAK0Y,WAAWtB,aAEhBjS,MAAMI,SACR,CAEA0T,eACEjZ,KAAK6Y,eACP,CAGAJ,sBACE,OAAO,IAAI3C,GAAS,CAClBhb,UAAWgG,QAAQd,KAAKqF,QAAQ8Q,UAEhCvQ,WAAY5F,KAAKgO,eAErB,CAEA2K,uBACE,OAAO,IAAI7B,GAAU,CACnBF,YAAa5W,KAAKoF,UAEtB,CAEA0T,aAAahZ,GAENha,SAAS6G,KAAK1H,SAAS+a,KAAKoF,WAC/Btf,SAAS6G,KAAK0pB,OAAOrW,KAAKoF,UAG5BpF,KAAKoF,SAAS5jB,MAAMwwB,QAAU,QAE9BhS,KAAKoF,SAASxjB,gBAAgB,eAE9Boe,KAAKoF,SAASvjB,aAAa,cAAc,GAEzCme,KAAKoF,SAASvjB,aAAa,OAAQ,UAEnCme,KAAKoF,SAASlZ,UAAY,EAC1B,MAAMgtB,EAAYjS,GAAeC,QA3IT,cA2IsClH,KAAKuY,SAE/DW,IACFA,EAAUhtB,UAAY,GAGxB6P,GAAOiE,KAAKoF,UAEZpF,KAAKoF,SAAS5J,UAAUtE,IAAIghB,IAa5BlY,KAAK2F,gBAXsB,KACrB3F,KAAKqF,QAAQqN,OACf1S,KAAK0Y,WAAWzB,WAGlBjX,KAAKmP,kBAAmB,EACxB5O,GAAakB,QAAQzB,KAAKoF,SAAUuS,GAAe,CACjD7X,iBACA,GAGoCE,KAAKuY,QAASvY,KAAKgO,cAC7D,CAEApC,qBACErL,GAAaY,GAAGnB,KAAKoF,SAAU2S,IAAyB3Y,IACtD,GAtLe,WAsLXA,EAAM7hB,IAIV,OAAIyiB,KAAKqF,QAAQ0F,UACf3L,EAAM+C,sBACNnC,KAAK4P,aAIP5P,KAAKmZ,4BAA4B,IAEnC5Y,GAAaY,GAAG9gB,OAAQu3B,IAAgB,KAClC5X,KAAK2P,WAAa3P,KAAKmP,kBACzBnP,KAAK6Y,eACP,IAEFtY,GAAaY,GAAGnB,KAAKoF,SAAU0S,IAAyB1Y,IAEtDmB,GAAaa,IAAIpB,KAAKoF,SAAUyS,IAAqBuB,IAC/CpZ,KAAKoF,WAAahG,EAAMpS,QAAUgT,KAAKoF,WAAagU,EAAOpsB,SAIjC,WAA1BgT,KAAKqF,QAAQ8Q,SAMbnW,KAAKqF,QAAQ8Q,UACfnW,KAAK4P,OANL5P,KAAKmZ,6BAOP,GACA,GAEN,CAEAJ,aACE/Y,KAAKoF,SAAS5jB,MAAMwwB,QAAU,OAE9BhS,KAAKoF,SAASvjB,aAAa,eAAe,GAE1Cme,KAAKoF,SAASxjB,gBAAgB,cAE9Boe,KAAKoF,SAASxjB,gBAAgB,QAE9Boe,KAAKmP,kBAAmB,EAExBnP,KAAKwY,UAAU5I,MAAK,KAClB9pB,SAAS6G,KAAK6O,UAAUuH,OAAOkV,IAE/BjY,KAAKqZ,oBAELrZ,KAAK4Y,WAAW9lB,QAEhByN,GAAakB,QAAQzB,KAAKoF,SAAUqS,GAAe,GAEvD,CAEAzJ,cACE,OAAOhO,KAAKoF,SAAS5J,UAAUvW,SAtOT,OAuOxB,CAEAk0B,6BAGE,GAFkB5Y,GAAakB,QAAQzB,KAAKoF,SAAUoS,IAExC3V,iBACZ,OAGF,MAAMyX,EAAqBtZ,KAAKoF,SAAStX,aAAehI,SAASC,gBAAgBsC,aAC3EkxB,EAAmBvZ,KAAKoF,SAAS5jB,MAAMiL,UAEpB,WAArB8sB,GAAiCvZ,KAAKoF,SAAS5J,UAAUvW,SAASkzB,MAIjEmB,IACHtZ,KAAKoF,SAAS5jB,MAAMiL,UAAY,UAGlCuT,KAAKoF,SAAS5J,UAAUtE,IAAIihB,IAE5BnY,KAAK2F,gBAAe,KAClB3F,KAAKoF,SAAS5J,UAAUuH,OAAOoV,IAE/BnY,KAAK2F,gBAAe,KAClB3F,KAAKoF,SAAS5jB,MAAMiL,UAAY8sB,CAAgB,GAC/CvZ,KAAKuY,QAAQ,GACfvY,KAAKuY,SAERvY,KAAKoF,SAASsN,QAChB,CAMAmG,gBACE,MAAMS,EAAqBtZ,KAAKoF,SAAStX,aAAehI,SAASC,gBAAgBsC,aAE3E0sB,EAAiB/U,KAAK4Y,WAAWvE,WAEjCmF,EAAoBzE,EAAiB,EAE3C,GAAIyE,IAAsBF,EAAoB,CAC5C,MAAM/2B,EAAW4Z,KAAU,cAAgB,eAC3C6D,KAAKoF,SAAS5jB,MAAMe,GAAY,GAAGwyB,KACrC,CAEA,IAAKyE,GAAqBF,EAAoB,CAC5C,MAAM/2B,EAAW4Z,KAAU,eAAiB,cAC5C6D,KAAKoF,SAAS5jB,MAAMe,GAAY,GAAGwyB,KACrC,CACF,CAEAsE,oBACErZ,KAAKoF,SAAS5jB,MAAMi4B,YAAc,GAClCzZ,KAAKoF,SAAS5jB,MAAMk4B,aAAe,EACrC,CAGA7T,uBAAuBxB,EAAQvE,GAC7B,OAAOE,KAAK4G,MAAK,WACf,MAAM9b,EAAOwtB,GAAMjS,oBAAoBrG,KAAMqE,GAE7C,GAAsB,iBAAXA,EAAX,CAIA,QAA4B,IAAjBvZ,EAAKuZ,GACd,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,GAAQvE,EANb,CAOF,GACF,EAQFS,GAAaY,GAAGrb,SAAUkyB,GApTK,4BAoT2C,SAAU5Y,GAClF,MAAMpS,EAASsN,GAAuB0F,MAElC,CAAC,IAAK,QAAQ9F,SAAS8F,KAAKoG,UAC9BhH,EAAM+C,iBAGR5B,GAAaa,IAAIpU,EAAQ0qB,IAAciC,IACjCA,EAAU9X,kBAKdtB,GAAaa,IAAIpU,EAAQyqB,IAAgB,KACnC3c,GAAUkF,OACZA,KAAK0S,OACP,GACA,IAGJ,MAAMkH,EAAc3S,GAAeC,QA3Ub,eA6UlB0S,GACFtB,GAAMxS,YAAY8T,GAAahK,OAGpB0I,GAAMjS,oBAAoBrZ,GAClC+Z,OAAO/G,KACd,IACAgG,GAAqBsS,IAKrBjc,GAAmBic,IAYnB,MAEMuB,GAAc,gBACdC,GAAiB,YACjBC,GAAwB,OAAOF,KAAcC,KAE7CE,GAAoB,OACpBC,GAAuB,UACvBC,GAAoB,SAEpBC,GAAgB,kBAChBC,GAAe,OAAOP,KACtBQ,GAAgB,QAAQR,KACxBS,GAAe,OAAOT,KACtBU,GAAuB,gBAAgBV,KACvCW,GAAiB,SAASX,KAC1BY,GAAe,SAASZ,KACxBa,GAAyB,QAAQb,KAAcC,KAC/Ca,GAAwB,kBAAkBd,KAE1Ce,GAAY,CAChBzE,UAAU,EACVpL,UAAU,EACV7f,QAAQ,GAEJ2vB,GAAgB,CACpB1E,SAAU,mBACVpL,SAAU,UACV7f,OAAQ,WAMV,MAAM4vB,WAAkB5V,GACtBR,YAAY1kB,EAASqkB,GACnBc,MAAMnlB,EAASqkB,GACfrE,KAAK2P,UAAW,EAChB3P,KAAKwY,UAAYxY,KAAKyY,sBACtBzY,KAAK0Y,WAAa1Y,KAAK2Y,uBAEvB3Y,KAAK4L,oBACP,CAGW3H,qBACT,OAAO2W,EACT,CAEW1W,yBACT,OAAO2W,EACT,CAEWpe,kBACT,MAtDW,WAuDb,CAGAsK,OAAOjH,GACL,OAAOE,KAAK2P,SAAW3P,KAAK4P,OAAS5P,KAAK6P,KAAK/P,EACjD,CAEA+P,KAAK/P,GACCE,KAAK2P,UAISpP,GAAakB,QAAQzB,KAAKoF,SAAUgV,GAAc,CAClEta,kBAGY+B,mBAId7B,KAAK2P,UAAW,EAEhB3P,KAAKwY,UAAU3I,OAEV7P,KAAKqF,QAAQna,SAChB,IAAIkpB,IAAkBxE,OAGxB5P,KAAKoF,SAASvjB,aAAa,cAAc,GAEzCme,KAAKoF,SAASvjB,aAAa,OAAQ,UAEnCme,KAAKoF,SAAS5J,UAAUtE,IAAI+iB,IAgB5Bja,KAAK2F,gBAdoB,KAClB3F,KAAKqF,QAAQna,SAAU8U,KAAKqF,QAAQ8Q,UACvCnW,KAAK0Y,WAAWzB,WAGlBjX,KAAKoF,SAAS5J,UAAUtE,IAAI8iB,IAE5Bha,KAAKoF,SAAS5J,UAAUuH,OAAOkX,IAE/B1Z,GAAakB,QAAQzB,KAAKoF,SAAUiV,GAAe,CACjDva,iBACA,GAGkCE,KAAKoF,UAAU,GACvD,CAEAwK,OACO5P,KAAK2P,WAIQpP,GAAakB,QAAQzB,KAAKoF,SAAUkV,IAExCzY,mBAId7B,KAAK0Y,WAAWtB,aAEhBpX,KAAKoF,SAAS2V,OAEd/a,KAAK2P,UAAW,EAEhB3P,KAAKoF,SAAS5J,UAAUtE,IAAIgjB,IAE5Bla,KAAKwY,UAAU5I,OAgBf5P,KAAK2F,gBAdoB,KACvB3F,KAAKoF,SAAS5J,UAAUuH,OAAOiX,GAAmBE,IAElDla,KAAKoF,SAASxjB,gBAAgB,cAE9Boe,KAAKoF,SAASxjB,gBAAgB,QAEzBoe,KAAKqF,QAAQna,SAChB,IAAIkpB,IAAkBthB,QAGxByN,GAAakB,QAAQzB,KAAKoF,SAAUoV,GAAe,GAGfxa,KAAKoF,UAAU,IACvD,CAEAG,UACEvF,KAAKwY,UAAUjT,UAEfvF,KAAK0Y,WAAWtB,aAEhBjS,MAAMI,SACR,CAGAkT,sBACE,MAUM3d,EAAYgG,QAAQd,KAAKqF,QAAQ8Q,UACvC,OAAO,IAAIL,GAAS,CAClBJ,UA7JsB,qBA8JtB5a,YACA8K,YAAY,EACZgQ,YAAa5V,KAAKoF,SAAS5f,WAC3BmwB,cAAe7a,EAhBK,KACU,WAA1BkF,KAAKqF,QAAQ8Q,SAKjBnW,KAAK4P,OAJHrP,GAAakB,QAAQzB,KAAKoF,SAAUmV,GAI3B,EAUgC,MAE/C,CAEA5B,uBACE,OAAO,IAAI7B,GAAU,CACnBF,YAAa5W,KAAKoF,UAEtB,CAEAwG,qBACErL,GAAaY,GAAGnB,KAAKoF,SAAUuV,IAAuBvb,IAhLvC,WAiLTA,EAAM7hB,MAILyiB,KAAKqF,QAAQ0F,SAKlB/K,KAAK4P,OAJHrP,GAAakB,QAAQzB,KAAKoF,SAAUmV,IAI3B,GAEf,CAGA1U,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAOgwB,GAAUzU,oBAAoBrG,KAAMqE,GAEjD,GAAsB,iBAAXA,EAAX,CAIA,QAAqB7K,IAAjB1O,EAAKuZ,IAAyBA,EAAOlK,WAAW,MAAmB,gBAAXkK,EAC1D,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,GAAQrE,KANb,CAOF,GACF,EAQFO,GAAaY,GAAGrb,SAAU40B,GAvMK,gCAuM2C,SAAUtb,GAClF,MAAMpS,EAASsN,GAAuB0F,MAMtC,GAJI,CAAC,IAAK,QAAQ9F,SAAS8F,KAAKoG,UAC9BhH,EAAM+C,iBAGJ9G,GAAW2E,MACb,OAGFO,GAAaa,IAAIpU,EAAQwtB,IAAgB,KAEnC1f,GAAUkF,OACZA,KAAK0S,OACP,IAGF,MAAMkH,EAAc3S,GAAeC,QAAQiT,IAEvCP,GAAeA,IAAgB5sB,GACjC8tB,GAAUhV,YAAY8T,GAAahK,OAGxBkL,GAAUzU,oBAAoBrZ,GACtC+Z,OAAO/G,KACd,IACAO,GAAaY,GAAG9gB,OAAQ05B,IAAuB,KAC7C,IAAK,MAAMhgB,KAAYkN,GAAerU,KAAKunB,IACzCW,GAAUzU,oBAAoBtM,GAAU8V,MAC1C,IAEFtP,GAAaY,GAAG9gB,OAAQo6B,IAAc,KACpC,IAAK,MAAMz6B,KAAWinB,GAAerU,KAAK,gDACG,UAAvClN,iBAAiB1F,GAASiC,UAC5B64B,GAAUzU,oBAAoBrmB,GAAS4vB,MAE3C,IAEF5J,GAAqB8U,IAKrBze,GAAmBye,IAQnB,MAAME,GAAgB,IAAIjkB,IAAI,CAAC,aAAc,OAAQ,OAAQ,WAAY,WAAY,SAAU,MAAO,eAQhGkkB,GAAmB,iEAOnBC,GAAmB,qIAEnBC,GAAmB,CAAC34B,EAAW44B,KACnC,MAAMC,EAAgB74B,EAAUvC,SAASC,cAEzC,OAAIk7B,EAAqBlhB,SAASmhB,IAC5BL,GAAc5jB,IAAIikB,IACbva,QAAQma,GAAiBn3B,KAAKtB,EAAU84B,YAAcJ,GAAiBp3B,KAAKtB,EAAU84B,YAO1FF,EAAqBx0B,QAAO20B,GAAkBA,aAA0BxW,SAAQ7R,MAAKsoB,GAASA,EAAM13B,KAAKu3B,IAAe,EAG3HI,GAAmB,CAEvB,IAAK,CAAC,QAAS,MAAO,KAAM,OAAQ,OAjCP,kBAkC7BnqB,EAAG,CAAC,SAAU,OAAQ,QAAS,OAC/BoqB,KAAM,GACNnqB,EAAG,GACHoqB,GAAI,GACJC,IAAK,GACLC,KAAM,GACNC,IAAK,GACLC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJxqB,EAAG,GACHgb,IAAK,CAAC,MAAO,SAAU,MAAO,QAAS,QAAS,UAChDyP,GAAI,GACJC,GAAI,GACJC,EAAG,GACHC,IAAK,GACLC,EAAG,GACHC,MAAO,GACPC,KAAM,GACNC,IAAK,GACLC,IAAK,GACLC,OAAQ,GACRC,EAAG,GACHC,GAAI,IA+CAC,GAAY,CAChBC,UAAW3B,GACX4B,QAAS,CAAC,EAEVC,WAAY,GACZhwB,MAAM,EACNiwB,UAAU,EACVC,WAAY,KACZC,SAAU,eAENC,GAAgB,CACpBN,UAAW,SACXC,QAAS,SACTC,WAAY,oBACZhwB,KAAM,UACNiwB,SAAU,UACVC,WAAY,kBACZC,SAAU,UAENE,GAAqB,CACzBC,MAAO,iCACP7jB,SAAU,oBAMZ,MAAM8jB,WAAwB7Z,GAC5BU,YAAYL,GACVc,QACAnF,KAAKqF,QAAUrF,KAAKoE,WAAWC,EACjC,CAGWJ,qBACT,OAAOkZ,EACT,CAEWjZ,yBACT,OAAOwZ,EACT,CAEWjhB,kBACT,MA5CW,iBA6Cb,CAGAqhB,aACE,OAAOrgC,OAAO0hB,OAAOa,KAAKqF,QAAQgY,SAAS95B,KAAI8gB,GAAUrE,KAAK+d,yBAAyB1Z,KAASzd,OAAOka,QACzG,CAEAkd,aACE,OAAOhe,KAAK8d,aAAa3sB,OAAS,CACpC,CAEA8sB,cAAcZ,GAMZ,OALArd,KAAKke,cAAcb,GAEnBrd,KAAKqF,QAAQgY,QAAU,IAAKrd,KAAKqF,QAAQgY,WACpCA,GAEErd,IACT,CAEAme,SACE,MAAMC,EAAkBt4B,SAASswB,cAAc,OAC/CgI,EAAgBC,UAAYre,KAAKse,eAAete,KAAKqF,QAAQoY,UAE7D,IAAK,MAAO1jB,EAAUwkB,KAAS9gC,OAAO4kB,QAAQrC,KAAKqF,QAAQgY,SACzDrd,KAAKwe,YAAYJ,EAAiBG,EAAMxkB,GAG1C,MAAM0jB,EAAWW,EAAgBjX,SAAS,GAEpCmW,EAAatd,KAAK+d,yBAAyB/d,KAAKqF,QAAQiY,YAM9D,OAJIA,GACFG,EAASjiB,UAAUtE,OAAOomB,EAAW36B,MAAM,MAGtC86B,CACT,CAGAjZ,iBAAiBH,GACfc,MAAMX,iBAAiBH,GAEvBrE,KAAKke,cAAc7Z,EAAOgZ,QAC5B,CAEAa,cAAcO,GACZ,IAAK,MAAO1kB,EAAUsjB,KAAY5/B,OAAO4kB,QAAQoc,GAC/CtZ,MAAMX,iBAAiB,CACrBzK,WACA6jB,MAAOP,GACNM,GAEP,CAEAa,YAAYf,EAAUJ,EAAStjB,GAC7B,MAAM2kB,EAAkBzX,GAAeC,QAAQnN,EAAU0jB,GAEpDiB,KAILrB,EAAUrd,KAAK+d,yBAAyBV,IAOpC,GAAUA,GACZrd,KAAK2e,sBAAsB9jB,GAAWwiB,GAAUqB,GAK9C1e,KAAKqF,QAAQ/X,KACfoxB,EAAgBL,UAAYre,KAAKse,eAAejB,GAIlDqB,EAAgBE,YAAcvB,EAf5BqB,EAAgB3b,SAgBpB,CAEAub,eAAeG,GACb,OAAOze,KAAKqF,QAAQkY,SA7KxB,SAAsBsB,EAAYzB,EAAW0B,GAC3C,IAAKD,EAAW1tB,OACd,OAAO0tB,EAGT,GAAIC,GAAgD,mBAArBA,EAC7B,OAAOA,EAAiBD,GAG1B,MACME,GADY,IAAI1+B,OAAO2+B,WACKC,gBAAgBJ,EAAY,aACxDv9B,EAAW,GAAGlC,UAAU2/B,EAAgBpyB,KAAKyT,iBAAiB,MAEpE,IAAK,MAAMpgB,KAAWsB,EAAU,CAC9B,MAAM49B,EAAcl/B,EAAQC,SAASC,cAErC,IAAKzC,OAAO4D,KAAK+7B,GAAWljB,SAASglB,GAAc,CACjDl/B,EAAQ+iB,SACR,QACF,CAEA,MAAMoc,EAAgB,GAAG//B,UAAUY,EAAQ0B,YACrC09B,EAAoB,GAAGhgC,OAAOg+B,EAAU,MAAQ,GAAIA,EAAU8B,IAAgB,IAEpF,IAAK,MAAM18B,KAAa28B,EACjBhE,GAAiB34B,EAAW48B,IAC/Bp/B,EAAQ4B,gBAAgBY,EAAUvC,SAGxC,CAEA,OAAO8+B,EAAgBpyB,KAAK0xB,SAC9B,CA6ImCgB,CAAaZ,EAAKze,KAAKqF,QAAQ+X,UAAWpd,KAAKqF,QAAQmY,YAAciB,CACtG,CAEAV,yBAAyBU,GACvB,MAAsB,mBAARA,EAAqBA,EAAIze,MAAQye,CACjD,CAEAE,sBAAsB3+B,EAAS0+B,GAC7B,GAAI1e,KAAKqF,QAAQ/X,KAGf,OAFAoxB,EAAgBL,UAAY,QAC5BK,EAAgBrI,OAAOr2B,GAIzB0+B,EAAgBE,YAAc5+B,EAAQ4+B,WACxC,EAcF,MACMU,GAAwB,IAAIvoB,IAAI,CAAC,WAAY,YAAa,eAC1DwoB,GAAoB,OAEpBC,GAAoB,OAEpBC,GAAiB,SACjBC,GAAmB,gBACnBC,GAAgB,QAChBC,GAAgB,QAahBC,GAAgB,CACpBC,KAAM,OACNC,IAAK,MACLC,MAAO7jB,KAAU,OAAS,QAC1B8jB,OAAQ,SACRC,KAAM/jB,KAAU,QAAU,QAEtBgkB,GAAY,CAChB/C,UAAW3B,GACX2E,WAAW,EACX1xB,SAAU,kBACV2xB,WAAW,EACXC,YAAa,GACbC,MAAO,EACP9vB,mBAAoB,CAAC,MAAO,QAAS,SAAU,QAC/CnD,MAAM,EACN7E,OAAQ,CAAC,EAAG,GACZtJ,UAAW,MACX8yB,aAAc,KACdsL,UAAU,EACVC,WAAY,KACZzjB,UAAU,EACV0jB,SAAU,+GACV+C,MAAO,GACP/e,QAAS,eAELgf,GAAgB,CACpBrD,UAAW,SACXgD,UAAW,UACX1xB,SAAU,mBACV2xB,UAAW,2BACXC,YAAa,oBACbC,MAAO,kBACP9vB,mBAAoB,QACpBnD,KAAM,UACN7E,OAAQ,0BACRtJ,UAAW,oBACX8yB,aAAc,yBACdsL,SAAU,UACVC,WAAY,kBACZzjB,SAAU,mBACV0jB,SAAU,SACV+C,MAAO,4BACP/e,QAAS,UAMX,MAAMif,WAAgBxb,GACpBR,YAAY1kB,EAASqkB,GACnB,QAAsB,IAAX,EACT,MAAM,IAAIW,UAAU,+DAGtBG,MAAMnlB,EAASqkB,GAEfrE,KAAK2gB,YAAa,EAClB3gB,KAAK4gB,SAAW,EAChB5gB,KAAK6gB,WAAa,KAClB7gB,KAAK8gB,eAAiB,CAAC,EACvB9gB,KAAKoS,QAAU,KACfpS,KAAK+gB,iBAAmB,KACxB/gB,KAAKghB,YAAc,KAEnBhhB,KAAKihB,IAAM,KAEXjhB,KAAKkhB,gBAEAlhB,KAAKqF,QAAQtL,UAChBiG,KAAKmhB,WAET,CAGWld,qBACT,OAAOkc,EACT,CAEWjc,yBACT,OAAOuc,EACT,CAEWhkB,kBACT,MA1GW,SA2Gb,CAGA2kB,SACEphB,KAAK2gB,YAAa,CACpB,CAEAU,UACErhB,KAAK2gB,YAAa,CACpB,CAEAW,gBACEthB,KAAK2gB,YAAc3gB,KAAK2gB,UAC1B,CAEA5Z,SACO/G,KAAK2gB,aAIV3gB,KAAK8gB,eAAeS,OAASvhB,KAAK8gB,eAAeS,MAE7CvhB,KAAK2P,WACP3P,KAAKwhB,SAKPxhB,KAAKyhB,SACP,CAEAlc,UACE0H,aAAajN,KAAK4gB,UAClBrgB,GAAaC,IAAIR,KAAKoF,SAASjK,QAAQskB,IAAiBC,GAAkB1f,KAAK0hB,mBAE3E1hB,KAAKoF,SAASpL,aAAa,2BAC7BgG,KAAKoF,SAASvjB,aAAa,QAASme,KAAKoF,SAASpL,aAAa,2BAGjEgG,KAAK2hB,iBAELxc,MAAMI,SACR,CAEAsK,OACE,GAAoC,SAAhC7P,KAAKoF,SAAS5jB,MAAMwwB,QACtB,MAAM,IAAI7N,MAAM,uCAGlB,IAAMnE,KAAK4hB,mBAAoB5hB,KAAK2gB,WAClC,OAGF,MAAMhH,EAAYpZ,GAAakB,QAAQzB,KAAKoF,SAAUpF,KAAK0E,YAAYiJ,UAlJtD,SAqJXkU,GAFalmB,GAAeqE,KAAKoF,WAELpF,KAAKoF,SAAS7kB,cAAcwF,iBAAiBd,SAAS+a,KAAKoF,UAE7F,GAAIuU,EAAU9X,mBAAqBggB,EACjC,OAIF7hB,KAAK2hB,iBAEL,MAAMV,EAAMjhB,KAAK8hB,iBAEjB9hB,KAAKoF,SAASvjB,aAAa,mBAAoBo/B,EAAIjnB,aAAa,OAEhE,MAAM,UACJqmB,GACErgB,KAAKqF,QAaT,GAXKrF,KAAKoF,SAAS7kB,cAAcwF,gBAAgBd,SAAS+a,KAAKihB,OAC7DZ,EAAUhK,OAAO4K,GACjB1gB,GAAakB,QAAQzB,KAAKoF,SAAUpF,KAAK0E,YAAYiJ,UAtKpC,cAyKnB3N,KAAKoS,QAAUpS,KAAKyS,cAAcwO,GAClCA,EAAIzlB,UAAUtE,IAAIsoB,IAKd,iBAAkB15B,SAASC,gBAC7B,IAAK,MAAM/F,IAAW,GAAGZ,UAAU0G,SAAS6G,KAAKwa,UAC/C5G,GAAaY,GAAGnhB,EAAS,YAAa8b,IAc1CkE,KAAK2F,gBAVY,KACfpF,GAAakB,QAAQzB,KAAKoF,SAAUpF,KAAK0E,YAAYiJ,UAvLrC,WAyLQ,IAApB3N,KAAK6gB,YACP7gB,KAAKwhB,SAGPxhB,KAAK6gB,YAAa,CAAK,GAGK7gB,KAAKihB,IAAKjhB,KAAKgO,cAC/C,CAEA4B,OACE,GAAK5P,KAAK2P,aAIQpP,GAAakB,QAAQzB,KAAKoF,SAAUpF,KAAK0E,YAAYiJ,UA3MtD,SA6MH9L,iBAAd,CASA,GALY7B,KAAK8hB,iBAEbtmB,UAAUuH,OAAOyc,IAGjB,iBAAkB15B,SAASC,gBAC7B,IAAK,MAAM/F,IAAW,GAAGZ,UAAU0G,SAAS6G,KAAKwa,UAC/C5G,GAAaC,IAAIxgB,EAAS,YAAa8b,IAI3CkE,KAAK8gB,eAA4B,OAAI,EACrC9gB,KAAK8gB,eAAelB,KAAiB,EACrC5f,KAAK8gB,eAAenB,KAAiB,EACrC3f,KAAK6gB,WAAa,KAgBlB7gB,KAAK2F,gBAdY,KACX3F,KAAK+hB,yBAIJ/hB,KAAK6gB,YACR7gB,KAAK2hB,iBAGP3hB,KAAKoF,SAASxjB,gBAAgB,oBAE9B2e,GAAakB,QAAQzB,KAAKoF,SAAUpF,KAAK0E,YAAYiJ,UA3OpC,WA2O8D,GAGnD3N,KAAKihB,IAAKjhB,KAAKgO,cAhC7C,CAiCF,CAEAxiB,SACMwU,KAAKoS,SACPpS,KAAKoS,QAAQ5mB,QAEjB,CAGAo2B,iBACE,OAAO9gB,QAAQd,KAAKgiB,YACtB,CAEAF,iBAKE,OAJK9hB,KAAKihB,MACRjhB,KAAKihB,IAAMjhB,KAAKiiB,kBAAkBjiB,KAAKghB,aAAehhB,KAAKkiB,2BAGtDliB,KAAKihB,GACd,CAEAgB,kBAAkB5E,GAChB,MAAM4D,EAAMjhB,KAAKmiB,oBAAoB9E,GAASc,SAG9C,IAAK8C,EACH,OAAO,KAGTA,EAAIzlB,UAAUuH,OAAOwc,GAAmBC,IAExCyB,EAAIzlB,UAAUtE,IAAI,MAAM8I,KAAK0E,YAAYjI,aACzC,MAAM2lB,EA92HKC,KACb,GACEA,GAAUz/B,KAAK0/B,MAlBH,IAkBS1/B,KAAK2/B,gBACnBz8B,SAAS08B,eAAeH,IAEjC,OAAOA,CAAM,EAy2HGI,CAAOziB,KAAK0E,YAAYjI,MAAMnc,WAO5C,OANA2gC,EAAIp/B,aAAa,KAAMugC,GAEnBpiB,KAAKgO,eACPiT,EAAIzlB,UAAUtE,IAAIqoB,IAGb0B,CACT,CAEAyB,WAAWrF,GACTrd,KAAKghB,YAAc3D,EAEfrd,KAAK2P,aACP3P,KAAK2hB,iBAEL3hB,KAAK6P,OAET,CAEAsS,oBAAoB9E,GAYlB,OAXIrd,KAAK+gB,iBACP/gB,KAAK+gB,iBAAiB9C,cAAcZ,GAEpCrd,KAAK+gB,iBAAmB,IAAIlD,GAAgB,IAAK7d,KAAKqF,QAGpDgY,UACAC,WAAYtd,KAAK+d,yBAAyB/d,KAAKqF,QAAQib,eAIpDtgB,KAAK+gB,gBACd,CAEAmB,yBACE,MAAO,CACL,iBAA0BliB,KAAKgiB,YAEnC,CAEAA,YACE,OAAOhiB,KAAK+d,yBAAyB/d,KAAKqF,QAAQmb,QAAUxgB,KAAKoF,SAASpL,aAAa,yBACzF,CAGA2oB,6BAA6BvjB,GAC3B,OAAOY,KAAK0E,YAAY2B,oBAAoBjH,EAAMW,eAAgBC,KAAK4iB,qBACzE,CAEA5U,cACE,OAAOhO,KAAKqF,QAAQ+a,WAAapgB,KAAKihB,KAAOjhB,KAAKihB,IAAIzlB,UAAUvW,SAASs6B,GAC3E,CAEA5P,WACE,OAAO3P,KAAKihB,KAAOjhB,KAAKihB,IAAIzlB,UAAUvW,SAASu6B,GACjD,CAEA/M,cAAcwO,GACZ,MAAM9hC,EAA8C,mBAA3B6gB,KAAKqF,QAAQlmB,UAA2B6gB,KAAKqF,QAAQlmB,UAAUlB,KAAK+hB,KAAMihB,EAAKjhB,KAAKoF,UAAYpF,KAAKqF,QAAQlmB,UAChI0jC,EAAahD,GAAc1gC,EAAU8lB,eAC3C,OAAO,GAAoBjF,KAAKoF,SAAU6b,EAAKjhB,KAAK6S,iBAAiBgQ,GACvE,CAEA5P,aACE,MAAM,OACJxqB,GACEuX,KAAKqF,QAET,MAAsB,iBAAX5c,EACFA,EAAO9F,MAAM,KAAKY,KAAInF,GAASmf,OAAO+P,SAASlvB,EAAO,MAGzC,mBAAXqK,EACFyqB,GAAczqB,EAAOyqB,EAAYlT,KAAKoF,UAGxC3c,CACT,CAEAs1B,yBAAyBU,GACvB,MAAsB,mBAARA,EAAqBA,EAAIxgC,KAAK+hB,KAAKoF,UAAYqZ,CAC/D,CAEA5L,iBAAiBgQ,GACf,MAAM1P,EAAwB,CAC5Bh0B,UAAW0jC,EACXhsB,UAAW,CAAC,CACV9V,KAAM,OACNmB,QAAS,CACPuO,mBAAoBuP,KAAKqF,QAAQ5U,qBAElC,CACD1P,KAAM,SACNmB,QAAS,CACPuG,OAAQuX,KAAKiT,eAEd,CACDlyB,KAAM,kBACNmB,QAAS,CACPwM,SAAUsR,KAAKqF,QAAQ3W,WAExB,CACD3N,KAAM,QACNmB,QAAS,CACPlC,QAAS,IAAIggB,KAAK0E,YAAYjI,eAE/B,CACD1b,KAAM,kBACNC,SAAS,EACTC,MAAO,aACPC,GAAI4J,IAGFkV,KAAK8hB,iBAAiBjgC,aAAa,wBAAyBiJ,EAAK1J,MAAMjC,UAAU,KAIvF,MAAO,IAAKg0B,KAC+B,mBAA9BnT,KAAKqF,QAAQ4M,aAA8BjS,KAAKqF,QAAQ4M,aAAakB,GAAyBnT,KAAKqF,QAAQ4M,aAE1H,CAEAiP,gBACE,MAAM4B,EAAW9iB,KAAKqF,QAAQ5D,QAAQ9e,MAAM,KAE5C,IAAK,MAAM8e,KAAWqhB,EACpB,GAAgB,UAAZrhB,EACFlB,GAAaY,GAAGnB,KAAKoF,SAAUpF,KAAK0E,YAAYiJ,UA3YlC,SA2Y4D3N,KAAKqF,QAAQtL,UAAUqF,IAC/EY,KAAK2iB,6BAA6BvjB,GAE1C2H,QAAQ,SAEb,GAtZU,WAsZNtF,EAA4B,CACrC,MAAMshB,EAAUthB,IAAYke,GAAgB3f,KAAK0E,YAAYiJ,UA9Y5C,cA8Y0E3N,KAAK0E,YAAYiJ,UAhZ5F,WAiZVqV,EAAWvhB,IAAYke,GAAgB3f,KAAK0E,YAAYiJ,UA9Y7C,cA8Y2E3N,KAAK0E,YAAYiJ,UAhZ5F,YAiZjBpN,GAAaY,GAAGnB,KAAKoF,SAAU2d,EAAS/iB,KAAKqF,QAAQtL,UAAUqF,IAC7D,MAAMkU,EAAUtT,KAAK2iB,6BAA6BvjB,GAElDkU,EAAQwN,eAA8B,YAAf1hB,EAAMqB,KAAqBmf,GAAgBD,KAAiB,EAEnFrM,EAAQmO,QAAQ,IAElBlhB,GAAaY,GAAGnB,KAAKoF,SAAU4d,EAAUhjB,KAAKqF,QAAQtL,UAAUqF,IAC9D,MAAMkU,EAAUtT,KAAK2iB,6BAA6BvjB,GAElDkU,EAAQwN,eAA8B,aAAf1hB,EAAMqB,KAAsBmf,GAAgBD,IAAiBrM,EAAQlO,SAASngB,SAASma,EAAMU,eAEpHwT,EAAQkO,QAAQ,GAEpB,CAGFxhB,KAAK0hB,kBAAoB,KACnB1hB,KAAKoF,UACPpF,KAAK4P,MACP,EAGFrP,GAAaY,GAAGnB,KAAKoF,SAASjK,QAAQskB,IAAiBC,GAAkB1f,KAAK0hB,kBAChF,CAEAP,YACE,MAAMX,EAAQxgB,KAAKoF,SAASpL,aAAa,SAEpCwmB,IAIAxgB,KAAKoF,SAASpL,aAAa,eAAkBgG,KAAKoF,SAASwZ,YAAYxkB,QAC1E4F,KAAKoF,SAASvjB,aAAa,aAAc2+B,GAG3CxgB,KAAKoF,SAASvjB,aAAa,yBAA0B2+B,GAGrDxgB,KAAKoF,SAASxjB,gBAAgB,SAChC,CAEA6/B,SACMzhB,KAAK2P,YAAc3P,KAAK6gB,WAC1B7gB,KAAK6gB,YAAa,GAIpB7gB,KAAK6gB,YAAa,EAElB7gB,KAAKijB,aAAY,KACXjjB,KAAK6gB,YACP7gB,KAAK6P,MACP,GACC7P,KAAKqF,QAAQkb,MAAM1Q,MACxB,CAEA2R,SACMxhB,KAAK+hB,yBAIT/hB,KAAK6gB,YAAa,EAElB7gB,KAAKijB,aAAY,KACVjjB,KAAK6gB,YACR7gB,KAAK4P,MACP,GACC5P,KAAKqF,QAAQkb,MAAM3Q,MACxB,CAEAqT,YAAYrlB,EAASslB,GACnBjW,aAAajN,KAAK4gB,UAClB5gB,KAAK4gB,SAAW/iB,WAAWD,EAASslB,EACtC,CAEAnB,uBACE,OAAOtkC,OAAO0hB,OAAOa,KAAK8gB,gBAAgB5mB,UAAS,EACrD,CAEAkK,WAAWC,GACT,MAAM8e,EAAiB5f,GAAYG,kBAAkB1D,KAAKoF,UAE1D,IAAK,MAAMge,KAAiB3lC,OAAO4D,KAAK8hC,GAClC7D,GAAsBloB,IAAIgsB,WACrBD,EAAeC,GAY1B,OARA/e,EAAS,IAAK8e,KACU,iBAAX9e,GAAuBA,EAASA,EAAS,CAAC,GAEvDA,EAASrE,KAAKsE,gBAAgBD,GAC9BA,EAASrE,KAAKuE,kBAAkBF,GAEhCrE,KAAKwE,iBAAiBH,GAEfA,CACT,CAEAE,kBAAkBF,GAkBhB,OAjBAA,EAAOgc,WAAiC,IAArBhc,EAAOgc,UAAsBv6B,SAAS6G,KAAOkO,GAAWwJ,EAAOgc,WAEtD,iBAAjBhc,EAAOkc,QAChBlc,EAAOkc,MAAQ,CACb1Q,KAAMxL,EAAOkc,MACb3Q,KAAMvL,EAAOkc,QAIW,iBAAjBlc,EAAOmc,QAChBnc,EAAOmc,MAAQnc,EAAOmc,MAAMlgC,YAGA,iBAAnB+jB,EAAOgZ,UAChBhZ,EAAOgZ,QAAUhZ,EAAOgZ,QAAQ/8B,YAG3B+jB,CACT,CAEAue,qBACE,MAAMve,EAAS,CAAC,EAEhB,IAAK,MAAM9mB,KAAOyiB,KAAKqF,QACjBrF,KAAK0E,YAAYT,QAAQ1mB,KAASyiB,KAAKqF,QAAQ9nB,KACjD8mB,EAAO9mB,GAAOyiB,KAAKqF,QAAQ9nB,IAS/B,OALA8mB,EAAOtK,UAAW,EAClBsK,EAAO5C,QAAU,SAIV4C,CACT,CAEAsd,iBACM3hB,KAAKoS,UACPpS,KAAKoS,QAAQ3Y,UAEbuG,KAAKoS,QAAU,MAGbpS,KAAKihB,MACPjhB,KAAKihB,IAAIle,SACT/C,KAAKihB,IAAM,KAEf,CAGApb,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAO41B,GAAQra,oBAAoBrG,KAAMqE,GAE/C,GAAsB,iBAAXA,EAAX,CAIA,QAA4B,IAAjBvZ,EAAKuZ,GACd,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,IANL,CAOF,GACF,EAQFhI,GAAmBqkB,IAYnB,MAGM2C,GAAY,IAAK3C,GAAQzc,QAC7BoZ,QAAS,GACT50B,OAAQ,CAAC,EAAG,GACZtJ,UAAW,QACXs+B,SAAU,8IACVhc,QAAS,SAEL6hB,GAAgB,IAAK5C,GAAQxc,YACjCmZ,QAAS,kCAMX,MAAMkG,WAAgB7C,GAETzc,qBACT,OAAOof,EACT,CAEWnf,yBACT,OAAOof,EACT,CAEW7mB,kBACT,MA5BW,SA6Bb,CAGAmlB,iBACE,OAAO5hB,KAAKgiB,aAAehiB,KAAKwjB,aAClC,CAGAtB,yBACE,MAAO,CACL,kBAAkBliB,KAAKgiB,YACvB,gBAAoBhiB,KAAKwjB,cAE7B,CAEAA,cACE,OAAOxjB,KAAK+d,yBAAyB/d,KAAKqF,QAAQgY,QACpD,CAGAxX,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAOy4B,GAAQld,oBAAoBrG,KAAMqE,GAE/C,GAAsB,iBAAXA,EAAX,CAIA,QAA4B,IAAjBvZ,EAAKuZ,GACd,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,IANL,CAOF,GACF,EAQFhI,GAAmBknB,IAYnB,MAEME,GAAc,gBAEdC,GAAiB,WAAWD,KAC5BE,GAAc,QAAQF,KACtBG,GAAwB,OAAOH,cAE/BI,GAAsB,SAEtBC,GAAwB,SAExBC,GAAqB,YAGrBC,GAAsB,GAAGD,mBAA+CA,uBAGxEE,GAAY,CAChBx7B,OAAQ,KAERy7B,WAAY,eACZC,cAAc,EACdn3B,OAAQ,KACRo3B,UAAW,CAAC,GAAK,GAAK,IAElBC,GAAgB,CACpB57B,OAAQ,gBAERy7B,WAAY,SACZC,aAAc,UACdn3B,OAAQ,UACRo3B,UAAW,SAMb,MAAME,WAAkBpf,GACtBR,YAAY1kB,EAASqkB,GACnBc,MAAMnlB,EAASqkB,GAEfrE,KAAKukB,aAAe,IAAI5yB,IACxBqO,KAAKwkB,oBAAsB,IAAI7yB,IAC/BqO,KAAKykB,aAA6D,YAA9C/+B,iBAAiBsa,KAAKoF,UAAU3Y,UAA0B,KAAOuT,KAAKoF,SAC1FpF,KAAK0kB,cAAgB,KACrB1kB,KAAK2kB,UAAY,KACjB3kB,KAAK4kB,oBAAsB,CACzBC,gBAAiB,EACjBC,gBAAiB,GAEnB9kB,KAAK+kB,SACP,CAGW9gB,qBACT,OAAOggB,EACT,CAEW/f,yBACT,OAAOmgB,EACT,CAEW5nB,kBACT,MAhEW,WAiEb,CAGAsoB,UACE/kB,KAAKglB,mCAELhlB,KAAKilB,2BAEDjlB,KAAK2kB,UACP3kB,KAAK2kB,UAAUO,aAEfllB,KAAK2kB,UAAY3kB,KAAKmlB,kBAGxB,IAAK,MAAMC,KAAWplB,KAAKwkB,oBAAoBrlB,SAC7Ca,KAAK2kB,UAAUU,QAAQD,EAE3B,CAEA7f,UACEvF,KAAK2kB,UAAUO,aAEf/f,MAAMI,SACR,CAGAhB,kBAAkBF,GAUhB,OARAA,EAAOrX,OAAS6N,GAAWwJ,EAAOrX,SAAWlH,SAAS6G,KAEtD0X,EAAO6f,WAAa7f,EAAO5b,OAAS,GAAG4b,EAAO5b,oBAAsB4b,EAAO6f,WAE3C,iBAArB7f,EAAO+f,YAChB/f,EAAO+f,UAAY/f,EAAO+f,UAAUzhC,MAAM,KAAKY,KAAInF,GAASmf,OAAOC,WAAWpf,MAGzEimB,CACT,CAEA4gB,2BACOjlB,KAAKqF,QAAQ8e,eAKlB5jB,GAAaC,IAAIR,KAAKqF,QAAQrY,OAAQ22B,IACtCpjB,GAAaY,GAAGnB,KAAKqF,QAAQrY,OAAQ22B,GAAaG,IAAuB1kB,IACvE,MAAMkmB,EAAoBtlB,KAAKwkB,oBAAoB5mC,IAAIwhB,EAAMpS,OAAOtB,MAEpE,GAAI45B,EAAmB,CACrBlmB,EAAM+C,iBACN,MAAMtG,EAAOmE,KAAKykB,cAAgBpkC,OAC5BmE,EAAS8gC,EAAkBxgC,UAAYkb,KAAKoF,SAAStgB,UAE3D,GAAI+W,EAAK0pB,SAKP,YAJA1pB,EAAK0pB,SAAS,CACZnjC,IAAKoC,EACLghC,SAAU,WAMd3pB,EAAK3P,UAAY1H,CACnB,KAEJ,CAEA2gC,kBACE,MAAMjjC,EAAU,CACd2Z,KAAMmE,KAAKykB,aACXL,UAAWpkB,KAAKqF,QAAQ+e,UACxBF,WAAYlkB,KAAKqF,QAAQ6e,YAE3B,OAAO,IAAIuB,sBAAqBpjB,GAAWrC,KAAK0lB,kBAAkBrjB,IAAUngB,EAC9E,CAGAwjC,kBAAkBrjB,GAChB,MAAMsjB,EAAgB/H,GAAS5d,KAAKukB,aAAa3mC,IAAI,IAAIggC,EAAM5wB,OAAO44B,MAEhE3O,EAAW2G,IACf5d,KAAK4kB,oBAAoBC,gBAAkBjH,EAAM5wB,OAAOlI,UAExDkb,KAAK6lB,SAASF,EAAc/H,GAAO,EAG/BkH,GAAmB9kB,KAAKykB,cAAgB3+B,SAASC,iBAAiBmG,UAClE45B,EAAkBhB,GAAmB9kB,KAAK4kB,oBAAoBE,gBACpE9kB,KAAK4kB,oBAAoBE,gBAAkBA,EAE3C,IAAK,MAAMlH,KAASvb,EAAS,CAC3B,IAAKub,EAAMmI,eAAgB,CACzB/lB,KAAK0kB,cAAgB,KAErB1kB,KAAKgmB,kBAAkBL,EAAc/H,IAErC,QACF,CAEA,MAAMqI,EAA2BrI,EAAM5wB,OAAOlI,WAAakb,KAAK4kB,oBAAoBC,gBAEpF,GAAIiB,GAAmBG,GAGrB,GAFAhP,EAAS2G,IAEJkH,EACH,YAOCgB,GAAoBG,GACvBhP,EAAS2G,EAEb,CACF,CAEAoH,mCACEhlB,KAAKukB,aAAe,IAAI5yB,IACxBqO,KAAKwkB,oBAAsB,IAAI7yB,IAC/B,MAAMu0B,EAAcjf,GAAerU,KAAKkxB,GAAuB9jB,KAAKqF,QAAQrY,QAE5E,IAAK,MAAMm5B,KAAUD,EAAa,CAEhC,IAAKC,EAAOz6B,MAAQ2P,GAAW8qB,GAC7B,SAGF,MAAMb,EAAoBre,GAAeC,QAAQif,EAAOz6B,KAAMsU,KAAKoF,UAE/DtK,GAAUwqB,KACZtlB,KAAKukB,aAAa/xB,IAAI2zB,EAAOz6B,KAAMy6B,GAEnCnmB,KAAKwkB,oBAAoBhyB,IAAI2zB,EAAOz6B,KAAM45B,GAE9C,CACF,CAEAO,SAAS74B,GACHgT,KAAK0kB,gBAAkB13B,IAI3BgT,KAAKgmB,kBAAkBhmB,KAAKqF,QAAQrY,QAEpCgT,KAAK0kB,cAAgB13B,EACrBA,EAAOwO,UAAUtE,IAAI2sB,IAErB7jB,KAAKomB,iBAAiBp5B,GAEtBuT,GAAakB,QAAQzB,KAAKoF,SAAUse,GAAgB,CAClD5jB,cAAe9S,IAEnB,CAEAo5B,iBAAiBp5B,GAEf,GAAIA,EAAOwO,UAAUvW,SAzNQ,iBA0N3BgiB,GAAeC,QAhNc,mBAgNsBla,EAAOmO,QAjNtC,cAiNkEK,UAAUtE,IAAI2sB,SAItG,IAAK,MAAMwC,KAAapf,GAAeI,QAAQra,EA1NnB,qBA6N1B,IAAK,MAAMxJ,KAAQyjB,GAAeM,KAAK8e,EAAWrC,IAChDxgC,EAAKgY,UAAUtE,IAAI2sB,GAGzB,CAEAmC,kBAAkB9gC,GAChBA,EAAOsW,UAAUuH,OAAO8gB,IACxB,MAAMyC,EAAcrf,GAAerU,KAAK,GAAGkxB,MAAyBD,KAAuB3+B,GAE3F,IAAK,MAAM9E,KAAQkmC,EACjBlmC,EAAKob,UAAUuH,OAAO8gB,GAE1B,CAGAhe,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAOw5B,GAAUje,oBAAoBrG,KAAMqE,GAEjD,GAAsB,iBAAXA,EAAX,CAIA,QAAqB7K,IAAjB1O,EAAKuZ,IAAyBA,EAAOlK,WAAW,MAAmB,gBAAXkK,EAC1D,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,IANL,CAOF,GACF,EAQF9D,GAAaY,GAAG9gB,OAAQujC,IAAuB,KAC7C,IAAK,MAAM2C,KAAOtf,GAAerU,KAtQT,0BAuQtB0xB,GAAUje,oBAAoBkgB,EAChC,IAMFlqB,GAAmBioB,IAYnB,MAEMkC,GAAc,UACdC,GAAe,OAAOD,KACtBE,GAAiB,SAASF,KAC1BG,GAAe,OAAOH,KACtBI,GAAgB,QAAQJ,KACxBK,GAAuB,QAAQL,KAC/BM,GAAgB,UAAUN,KAC1BO,GAAsB,OAAOP,KAC7BQ,GAAiB,YACjBC,GAAkB,aAClBC,GAAe,UACfC,GAAiB,YACjBC,GAAoB,SACpBC,GAAoB,OACpBC,GAAoB,OAIpBC,GAA+B,yBAI/BC,GAAuB,2EAEvBC,GAAsB,YAHOF,uBAAiDA,mBAA6CA,OAG/EC,KAC5CE,GAA8B,IAAIN,8BAA6CA,+BAA8CA,4BAKnI,MAAMO,WAAYziB,GAChBR,YAAY1kB,GACVmlB,MAAMnlB,GACNggB,KAAKqS,QAAUrS,KAAKoF,SAASjK,QAdN,uCAgBlB6E,KAAKqS,UAMVrS,KAAK4nB,sBAAsB5nB,KAAKqS,QAASrS,KAAK6nB,gBAE9CtnB,GAAaY,GAAGnB,KAAKoF,SAAU0hB,IAAe1nB,GAASY,KAAK4M,SAASxN,KACvE,CAGW3C,kBACT,MAlDW,KAmDb,CAGAoT,OAEE,MAAMiY,EAAY9nB,KAAKoF,SAEvB,GAAIpF,KAAK+nB,cAAcD,GACrB,OAIF,MAAME,EAAShoB,KAAKioB,iBAEdC,EAAYF,EAASznB,GAAakB,QAAQumB,EAAQvB,GAAc,CACpE3mB,cAAegoB,IACZ,KACavnB,GAAakB,QAAQqmB,EAAWnB,GAAc,CAC9D7mB,cAAekoB,IAGHnmB,kBAAoBqmB,GAAaA,EAAUrmB,mBAIzD7B,KAAKmoB,YAAYH,EAAQF,GAEzB9nB,KAAKooB,UAAUN,EAAWE,GAC5B,CAGAI,UAAUpoC,EAASqoC,GACZroC,IAILA,EAAQwb,UAAUtE,IAAIkwB,IAEtBpnB,KAAKooB,UAAU9tB,GAAuBta,IAmBtCggB,KAAK2F,gBAhBY,KACsB,QAAjC3lB,EAAQga,aAAa,SAKzBha,EAAQ4B,gBAAgB,YACxB5B,EAAQ6B,aAAa,iBAAiB,GAEtCme,KAAKsoB,gBAAgBtoC,GAAS,GAE9BugB,GAAakB,QAAQzhB,EAAS4mC,GAAe,CAC3C9mB,cAAeuoB,KAVfroC,EAAQwb,UAAUtE,IAAIowB,GAWtB,GAG0BtnC,EAASA,EAAQwb,UAAUvW,SAASoiC,KACpE,CAEAc,YAAYnoC,EAASqoC,GACdroC,IAILA,EAAQwb,UAAUuH,OAAOqkB,IACzBpnC,EAAQ+6B,OAER/a,KAAKmoB,YAAY7tB,GAAuBta,IAmBxCggB,KAAK2F,gBAhBY,KACsB,QAAjC3lB,EAAQga,aAAa,SAKzBha,EAAQ6B,aAAa,iBAAiB,GACtC7B,EAAQ6B,aAAa,WAAY,MAEjCme,KAAKsoB,gBAAgBtoC,GAAS,GAE9BugB,GAAakB,QAAQzhB,EAAS0mC,GAAgB,CAC5C5mB,cAAeuoB,KAVfroC,EAAQwb,UAAUuH,OAAOukB,GAWzB,GAG0BtnC,EAASA,EAAQwb,UAAUvW,SAASoiC,KACpE,CAEAza,SAASxN,GACP,IAAK,CAAC4nB,GAAgBC,GAAiBC,GAAcC,IAAgBjtB,SAASkF,EAAM7hB,KAClF,OAGF6hB,EAAMyU,kBAENzU,EAAM+C,iBACN,MAAMoL,EAAS,CAAC0Z,GAAiBE,IAAgBjtB,SAASkF,EAAM7hB,KAC1DgrC,EAAoBzqB,GAAqBkC,KAAK6nB,eAAejhC,QAAO5G,IAAYqb,GAAWrb,KAAWof,EAAMpS,OAAQugB,GAAQ,GAE9Hgb,IACFA,EAAkB7V,MAAM,CACtB8V,eAAe,IAEjBb,GAAIthB,oBAAoBkiB,GAAmB1Y,OAE/C,CAEAgY,eAEE,OAAO5gB,GAAerU,KAAK60B,GAAqBznB,KAAKqS,QACvD,CAEA4V,iBACE,OAAOjoB,KAAK6nB,eAAej1B,MAAKzN,GAAS6a,KAAK+nB,cAAc5iC,MAAW,IACzE,CAEAyiC,sBAAsB1iC,EAAQiiB,GAC5BnH,KAAKyoB,yBAAyBvjC,EAAQ,OAAQ,WAE9C,IAAK,MAAMC,KAASgiB,EAClBnH,KAAK0oB,6BAA6BvjC,EAEtC,CAEAujC,6BAA6BvjC,GAC3BA,EAAQ6a,KAAK2oB,iBAAiBxjC,GAE9B,MAAMyjC,EAAW5oB,KAAK+nB,cAAc5iC,GAE9B0jC,EAAY7oB,KAAK8oB,iBAAiB3jC,GAExCA,EAAMtD,aAAa,gBAAiB+mC,GAEhCC,IAAc1jC,GAChB6a,KAAKyoB,yBAAyBI,EAAW,OAAQ,gBAG9CD,GACHzjC,EAAMtD,aAAa,WAAY,MAGjCme,KAAKyoB,yBAAyBtjC,EAAO,OAAQ,OAG7C6a,KAAK+oB,mCAAmC5jC,EAC1C,CAEA4jC,mCAAmC5jC,GACjC,MAAM6H,EAASsN,GAAuBnV,GAEjC6H,IAILgT,KAAKyoB,yBAAyBz7B,EAAQ,OAAQ,YAE1C7H,EAAMygC,IACR5lB,KAAKyoB,yBAAyBz7B,EAAQ,kBAAmB,IAAI7H,EAAMygC,MAEvE,CAEA0C,gBAAgBtoC,EAASgpC,GACvB,MAAMH,EAAY7oB,KAAK8oB,iBAAiB9oC,GAExC,IAAK6oC,EAAUrtB,UAAUvW,SAxMN,YAyMjB,OAGF,MAAM8hB,EAAS,CAAChN,EAAU2b,KACxB,MAAM11B,EAAUinB,GAAeC,QAAQnN,EAAU8uB,GAE7C7oC,GACFA,EAAQwb,UAAUuL,OAAO2O,EAAWsT,EACtC,EAGFjiB,EAnN6B,mBAmNIqgB,IACjCrgB,EAnN2B,iBAmNIugB,IAC/BuB,EAAUhnC,aAAa,gBAAiBmnC,EAC1C,CAEAP,yBAAyBzoC,EAASwC,EAAWpE,GACtC4B,EAAQ0b,aAAalZ,IACxBxC,EAAQ6B,aAAaW,EAAWpE,EAEpC,CAEA2pC,cAAczY,GACZ,OAAOA,EAAK9T,UAAUvW,SAASmiC,GACjC,CAGAuB,iBAAiBrZ,GACf,OAAOA,EAAKlI,QAAQqgB,IAAuBnY,EAAOrI,GAAeC,QAAQugB,GAAqBnY,EAChG,CAGAwZ,iBAAiBxZ,GACf,OAAOA,EAAKnU,QArOO,gCAqOoBmU,CACzC,CAGAzJ,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAO68B,GAAIthB,oBAAoBrG,MAErC,GAAsB,iBAAXqE,EAAX,CAIA,QAAqB7K,IAAjB1O,EAAKuZ,IAAyBA,EAAOlK,WAAW,MAAmB,gBAAXkK,EAC1D,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,IANL,CAOF,GACF,EAQF9D,GAAaY,GAAGrb,SAAU+gC,GAAsBW,IAAsB,SAAUpoB,GAC1E,CAAC,IAAK,QAAQlF,SAAS8F,KAAKoG,UAC9BhH,EAAM+C,iBAGJ9G,GAAW2E,OAIf2nB,GAAIthB,oBAAoBrG,MAAM6P,MAChC,IAKAtP,GAAaY,GAAG9gB,OAAQ0mC,IAAqB,KAC3C,IAAK,MAAM/mC,KAAWinB,GAAerU,KAAK80B,IACxCC,GAAIthB,oBAAoBrmB,EAC1B,IAMFqc,GAAmBsrB,IAYnB,MAEMniB,GAAY,YACZyjB,GAAkB,YAAYzjB,KAC9B0jB,GAAiB,WAAW1jB,KAC5B2jB,GAAgB,UAAU3jB,KAC1B4jB,GAAiB,WAAW5jB,KAC5B6jB,GAAa,OAAO7jB,KACpB8jB,GAAe,SAAS9jB,KACxB+jB,GAAa,OAAO/jB,KACpBgkB,GAAc,QAAQhkB,KAEtBikB,GAAkB,OAElBC,GAAkB,OAClBC,GAAqB,UACrBzlB,GAAc,CAClBkc,UAAW,UACXwJ,SAAU,UACVrJ,MAAO,UAEHtc,GAAU,CACdmc,WAAW,EACXwJ,UAAU,EACVrJ,MAAO,KAMT,MAAMsJ,WAAc3kB,GAClBR,YAAY1kB,EAASqkB,GACnBc,MAAMnlB,EAASqkB,GACfrE,KAAK4gB,SAAW,KAChB5gB,KAAK8pB,sBAAuB,EAC5B9pB,KAAK+pB,yBAA0B,EAE/B/pB,KAAKkhB,eACP,CAGWjd,qBACT,OAAOA,EACT,CAEWC,yBACT,OAAOA,EACT,CAEWzH,kBACT,MAlDS,OAmDX,CAGAoT,OACoBtP,GAAakB,QAAQzB,KAAKoF,SAAUmkB,IAExC1nB,mBAId7B,KAAKgqB,gBAEDhqB,KAAKqF,QAAQ+a,WACfpgB,KAAKoF,SAAS5J,UAAUtE,IArDN,QAgEpB8I,KAAKoF,SAAS5J,UAAUuH,OAAO0mB,IAG/B1tB,GAAOiE,KAAKoF,UAEZpF,KAAKoF,SAAS5J,UAAUtE,IAAIwyB,GAAiBC,IAE7C3pB,KAAK2F,gBAfY,KACf3F,KAAKoF,SAAS5J,UAAUuH,OAAO4mB,IAE/BppB,GAAakB,QAAQzB,KAAKoF,SAAUokB,IAEpCxpB,KAAKiqB,oBAAoB,GAUGjqB,KAAKoF,SAAUpF,KAAKqF,QAAQ+a,WAC5D,CAEAxQ,OACO5P,KAAKkqB,YAIQ3pB,GAAakB,QAAQzB,KAAKoF,SAAUikB,IAExCxnB,mBAad7B,KAAKoF,SAAS5J,UAAUtE,IAAIyyB,IAE5B3pB,KAAK2F,gBAXY,KACf3F,KAAKoF,SAAS5J,UAAUtE,IAAIuyB,IAG5BzpB,KAAKoF,SAAS5J,UAAUuH,OAAO4mB,GAAoBD,IAEnDnpB,GAAakB,QAAQzB,KAAKoF,SAAUkkB,GAAa,GAKrBtpB,KAAKoF,SAAUpF,KAAKqF,QAAQ+a,YAC5D,CAEA7a,UACEvF,KAAKgqB,gBAEDhqB,KAAKkqB,WACPlqB,KAAKoF,SAAS5J,UAAUuH,OAAO2mB,IAGjCvkB,MAAMI,SACR,CAEA2kB,UACE,OAAOlqB,KAAKoF,SAAS5J,UAAUvW,SAASykC,GAC1C,CAGAO,qBACOjqB,KAAKqF,QAAQukB,WAId5pB,KAAK8pB,sBAAwB9pB,KAAK+pB,0BAItC/pB,KAAK4gB,SAAW/iB,YAAW,KACzBmC,KAAK4P,MAAM,GACV5P,KAAKqF,QAAQkb,QAClB,CAEA4J,eAAe/qB,EAAOgrB,GACpB,OAAQhrB,EAAMqB,MACZ,IAAK,YACL,IAAK,WAEDT,KAAK8pB,qBAAuBM,EAC5B,MAGJ,IAAK,UACL,IAAK,WAEDpqB,KAAK+pB,wBAA0BK,EAKrC,GAAIA,EAGF,YAFApqB,KAAKgqB,gBAKP,MAAMxc,EAAcpO,EAAMU,cAEtBE,KAAKoF,WAAaoI,GAAexN,KAAKoF,SAASngB,SAASuoB,IAI5DxN,KAAKiqB,oBACP,CAEA/I,gBACE3gB,GAAaY,GAAGnB,KAAKoF,SAAU6jB,IAAiB7pB,GAASY,KAAKmqB,eAAe/qB,GAAO,KACpFmB,GAAaY,GAAGnB,KAAKoF,SAAU8jB,IAAgB9pB,GAASY,KAAKmqB,eAAe/qB,GAAO,KACnFmB,GAAaY,GAAGnB,KAAKoF,SAAU+jB,IAAe/pB,GAASY,KAAKmqB,eAAe/qB,GAAO,KAClFmB,GAAaY,GAAGnB,KAAKoF,SAAUgkB,IAAgBhqB,GAASY,KAAKmqB,eAAe/qB,GAAO,IACrF,CAEA4qB,gBACE/c,aAAajN,KAAK4gB,UAClB5gB,KAAK4gB,SAAW,IAClB,CAGA/a,uBAAuBxB,GACrB,OAAOrE,KAAK4G,MAAK,WACf,MAAM9b,EAAO++B,GAAMxjB,oBAAoBrG,KAAMqE,GAE7C,GAAsB,iBAAXA,EAAqB,CAC9B,QAA4B,IAAjBvZ,EAAKuZ,GACd,MAAM,IAAIW,UAAU,oBAAoBX,MAG1CvZ,EAAKuZ,GAAQrE,KACf,CACF,GACF,ECxjKK,IAAuBzD,GDgkK9ByJ,GAAqB6jB,IAKrBxtB,GAAmBwtB,ICrkKWttB,GCK9B,WAC2B,GAAG1J,MAAM5U,KAChC6H,SAASsa,iBAAiB,+BAET7c,KAAI,SAAU8mC,GAC/B,OAAO,IAAI3J,GAAQ2J,EAAkB,CAAE9J,MAAO,CAAE1Q,KAAM,IAAKD,KAAM,MACnE,GACF,EDX6B,WAAvB9pB,SAASgX,WAAyBP,KACjCzW,SAASyF,iBAAiB,mBAAoBgR","sources":["webpack://pydata_sphinx_theme/webpack/bootstrap","webpack://pydata_sphinx_theme/webpack/runtime/define property getters","webpack://pydata_sphinx_theme/webpack/runtime/hasOwnProperty shorthand","webpack://pydata_sphinx_theme/webpack/runtime/make namespace object","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/enums.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/math.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/within.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/createPopper.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/debounce.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/popper.js","webpack://pydata_sphinx_theme/./node_modules/@popperjs/core/lib/popper-lite.js","webpack://pydata_sphinx_theme/./node_modules/bootstrap/dist/js/bootstrap.esm.js","webpack://pydata_sphinx_theme/./src/pydata_sphinx_theme/assets/scripts/mixin.js","webpack://pydata_sphinx_theme/./src/pydata_sphinx_theme/assets/scripts/bootstrap.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","/*!\n * Bootstrap v5.2.3 (https://getbootstrap.com/)\n * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\nimport * as Popper from '@popperjs/core';\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\nconst MAX_UID = 1000000;\nconst MILLISECONDS_MULTIPLIER = 1000;\nconst TRANSITION_END = 'transitionend'; // Shout-out Angus Croll (https://goo.gl/pxwQGp)\n\nconst toType = object => {\n if (object === null || object === undefined) {\n return `${object}`;\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase();\n};\n/**\n * Public Util API\n */\n\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID);\n } while (document.getElementById(prefix));\n\n return prefix;\n};\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target');\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n\n if (!hrefAttribute || !hrefAttribute.includes('#') && !hrefAttribute.startsWith('.')) {\n return null;\n } // Just in case some CMS puts out a full URL with the anchor appended\n\n\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`;\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null;\n }\n\n return selector;\n};\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element);\n\n if (selector) {\n return document.querySelector(selector) ? selector : null;\n }\n\n return null;\n};\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element);\n return selector ? document.querySelector(selector) : null;\n};\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0;\n } // Get transition-duration of the element\n\n\n let {\n transitionDuration,\n transitionDelay\n } = window.getComputedStyle(element);\n const floatTransitionDuration = Number.parseFloat(transitionDuration);\n const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found\n\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0;\n } // If multiple durations are defined, take the first\n\n\n transitionDuration = transitionDuration.split(',')[0];\n transitionDelay = transitionDelay.split(',')[0];\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;\n};\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END));\n};\n\nconst isElement = object => {\n if (!object || typeof object !== 'object') {\n return false;\n }\n\n if (typeof object.jquery !== 'undefined') {\n object = object[0];\n }\n\n return typeof object.nodeType !== 'undefined';\n};\n\nconst getElement = object => {\n // it's a jQuery object or a node element\n if (isElement(object)) {\n return object.jquery ? object[0] : object;\n }\n\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(object);\n }\n\n return null;\n};\n\nconst isVisible = element => {\n if (!isElement(element) || element.getClientRects().length === 0) {\n return false;\n }\n\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'; // Handle `details` element as its content may falsie appear visible when it is closed\n\n const closedDetails = element.closest('details:not([open])');\n\n if (!closedDetails) {\n return elementIsVisible;\n }\n\n if (closedDetails !== element) {\n const summary = element.closest('summary');\n\n if (summary && summary.parentNode !== closedDetails) {\n return false;\n }\n\n if (summary === null) {\n return false;\n }\n }\n\n return elementIsVisible;\n};\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true;\n }\n\n if (element.classList.contains('disabled')) {\n return true;\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled;\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';\n};\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null;\n } // Can find the shadow root otherwise it'll return the document\n\n\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode();\n return root instanceof ShadowRoot ? root : null;\n }\n\n if (element instanceof ShadowRoot) {\n return element;\n } // when we don't find a shadow root\n\n\n if (!element.parentNode) {\n return null;\n }\n\n return findShadowRoot(element.parentNode);\n};\n\nconst noop = () => {};\n/**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\n\n\nconst reflow = element => {\n element.offsetHeight; // eslint-disable-line no-unused-expressions\n};\n\nconst getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery;\n }\n\n return null;\n};\n\nconst DOMContentLoadedCallbacks = [];\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback();\n }\n });\n }\n\n DOMContentLoadedCallbacks.push(callback);\n } else {\n callback();\n }\n};\n\nconst isRTL = () => document.documentElement.dir === 'rtl';\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery();\n /* istanbul ignore if */\n\n if ($) {\n const name = plugin.NAME;\n const JQUERY_NO_CONFLICT = $.fn[name];\n $.fn[name] = plugin.jQueryInterface;\n $.fn[name].Constructor = plugin;\n\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT;\n return plugin.jQueryInterface;\n };\n }\n });\n};\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback();\n }\n};\n\nconst executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback);\n return;\n }\n\n const durationPadding = 5;\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding;\n let called = false;\n\n const handler = ({\n target\n }) => {\n if (target !== transitionElement) {\n return;\n }\n\n called = true;\n transitionElement.removeEventListener(TRANSITION_END, handler);\n execute(callback);\n };\n\n transitionElement.addEventListener(TRANSITION_END, handler);\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement);\n }\n }, emulatedDuration);\n};\n/**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\n\n\nconst getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length;\n let index = list.indexOf(activeElement); // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0];\n }\n\n index += shouldGetNext ? 1 : -1;\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength;\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))];\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/;\nconst stripNameRegex = /\\..*/;\nconst stripUidRegex = /::\\d+$/;\nconst eventRegistry = {}; // Events storage\n\nlet uidEvent = 1;\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n};\nconst nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);\n/**\n * Private methods\n */\n\nfunction makeEventUid(element, uid) {\n return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;\n}\n\nfunction getElementEvents(element) {\n const uid = makeEventUid(element);\n element.uidEvent = uid;\n eventRegistry[uid] = eventRegistry[uid] || {};\n return eventRegistry[uid];\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n hydrateObj(event, {\n delegateTarget: element\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn);\n }\n\n return fn.apply(element, [event]);\n };\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector);\n\n for (let {\n target\n } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue;\n }\n\n hydrateObj(event, {\n delegateTarget: target\n });\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn);\n }\n\n return fn.apply(target, [event]);\n }\n }\n };\n}\n\nfunction findHandler(events, callable, delegationSelector = null) {\n return Object.values(events).find(event => event.callable === callable && event.delegationSelector === delegationSelector);\n}\n\nfunction normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const isDelegated = typeof handler === 'string'; // todo: tooltip passes `false` instead of selector, so we need to check\n\n const callable = isDelegated ? delegationFunction : handler || delegationFunction;\n let typeEvent = getTypeEvent(originalTypeEvent);\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent;\n }\n\n return [isDelegated, callable, typeEvent];\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n let [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction); // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {\n return fn.call(this, event);\n }\n };\n };\n\n callable = wrapFunction(callable);\n }\n\n const events = getElementEvents(element);\n const handlers = events[typeEvent] || (events[typeEvent] = {});\n const previousFunction = findHandler(handlers, callable, isDelegated ? handler : null);\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff;\n return;\n }\n\n const uid = makeEventUid(callable, originalTypeEvent.replace(namespaceRegex, ''));\n const fn = isDelegated ? bootstrapDelegationHandler(element, handler, callable) : bootstrapHandler(element, callable);\n fn.delegationSelector = isDelegated ? handler : null;\n fn.callable = callable;\n fn.oneOff = oneOff;\n fn.uidEvent = uid;\n handlers[uid] = fn;\n element.addEventListener(typeEvent, fn, isDelegated);\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector);\n\n if (!fn) {\n return;\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));\n delete events[typeEvent][fn.uidEvent];\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {};\n\n for (const handlerKey of Object.keys(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n}\n\nfunction getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '');\n return customEvents[event] || event;\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false);\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true);\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return;\n }\n\n const [isDelegated, callable, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction);\n const inNamespace = typeEvent !== originalTypeEvent;\n const events = getElementEvents(element);\n const storeElementEvent = events[typeEvent] || {};\n const isNamespace = originalTypeEvent.startsWith('.');\n\n if (typeof callable !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!Object.keys(storeElementEvent).length) {\n return;\n }\n\n removeHandler(element, events, typeEvent, callable, isDelegated ? handler : null);\n return;\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));\n }\n }\n\n for (const keyHandlers of Object.keys(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '');\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers];\n removeHandler(element, events, typeEvent, event.callable, event.delegationSelector);\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null;\n }\n\n const $ = getjQuery();\n const typeEvent = getTypeEvent(event);\n const inNamespace = event !== typeEvent;\n let jQueryEvent = null;\n let bubbles = true;\n let nativeDispatch = true;\n let defaultPrevented = false;\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args);\n $(element).trigger(jQueryEvent);\n bubbles = !jQueryEvent.isPropagationStopped();\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();\n defaultPrevented = jQueryEvent.isDefaultPrevented();\n }\n\n let evt = new Event(event, {\n bubbles,\n cancelable: true\n });\n evt = hydrateObj(evt, args);\n\n if (defaultPrevented) {\n evt.preventDefault();\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt);\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault();\n }\n\n return evt;\n }\n\n};\n\nfunction hydrateObj(obj, meta) {\n for (const [key, value] of Object.entries(meta || {})) {\n try {\n obj[key] = value;\n } catch (_unused) {\n Object.defineProperty(obj, key, {\n configurable: true,\n\n get() {\n return value;\n }\n\n });\n }\n }\n\n return obj;\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\nconst elementMap = new Map();\nconst Data = {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map());\n }\n\n const instanceMap = elementMap.get(element); // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);\n return;\n }\n\n instanceMap.set(key, instance);\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null;\n }\n\n return null;\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return;\n }\n\n const instanceMap = elementMap.get(element);\n instanceMap.delete(key); // free up element references if there are no instances left for an element\n\n if (instanceMap.size === 0) {\n elementMap.delete(element);\n }\n }\n\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\nfunction normalizeData(value) {\n if (value === 'true') {\n return true;\n }\n\n if (value === 'false') {\n return false;\n }\n\n if (value === Number(value).toString()) {\n return Number(value);\n }\n\n if (value === '' || value === 'null') {\n return null;\n }\n\n if (typeof value !== 'string') {\n return value;\n }\n\n try {\n return JSON.parse(decodeURIComponent(value));\n } catch (_unused) {\n return value;\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {};\n }\n\n const attributes = {};\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'));\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '');\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);\n attributes[pureKey] = normalizeData(element.dataset[key]);\n }\n\n return attributes;\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));\n }\n\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Class definition\n */\n\nclass Config {\n // Getters\n static get Default() {\n return {};\n }\n\n static get DefaultType() {\n return {};\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!');\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n return config;\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {}; // try to parse\n\n return { ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n };\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const property of Object.keys(configTypes)) {\n const expectedTypes = configTypes[property];\n const value = config[property];\n const valueType = isElement(value) ? 'element' : toType(value);\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`);\n }\n }\n }\n\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst VERSION = '5.2.3';\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super();\n element = getElement(element);\n\n if (!element) {\n return;\n }\n\n this._element = element;\n this._config = this._getConfig(config);\n Data.set(this._element, this.constructor.DATA_KEY, this);\n } // Public\n\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY);\n EventHandler.off(this._element, this.constructor.EVENT_KEY);\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null;\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated);\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n } // Static\n\n\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY);\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null);\n }\n\n static get VERSION() {\n return VERSION;\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`;\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`;\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`;\n }\n\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`;\n const name = component.NAME;\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n const target = getElementFromSelector(this) || this.closest(`.${name}`);\n const instance = component.getOrCreateInstance(target); // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n\n instance[method]();\n });\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$f = 'alert';\nconst DATA_KEY$a = 'bs.alert';\nconst EVENT_KEY$b = `.${DATA_KEY$a}`;\nconst EVENT_CLOSE = `close${EVENT_KEY$b}`;\nconst EVENT_CLOSED = `closed${EVENT_KEY$b}`;\nconst CLASS_NAME_FADE$5 = 'fade';\nconst CLASS_NAME_SHOW$8 = 'show';\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$f;\n } // Public\n\n\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE);\n\n if (closeEvent.defaultPrevented) {\n return;\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW$8);\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE$5);\n\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated);\n } // Private\n\n\n _destroyElement() {\n this._element.remove();\n\n EventHandler.trigger(this._element, EVENT_CLOSED);\n this.dispose();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n}\n/**\n * Data API implementation\n */\n\n\nenableDismissTrigger(Alert, 'close');\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$e = 'button';\nconst DATA_KEY$9 = 'bs.button';\nconst EVENT_KEY$a = `.${DATA_KEY$9}`;\nconst DATA_API_KEY$6 = '.data-api';\nconst CLASS_NAME_ACTIVE$3 = 'active';\nconst SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle=\"button\"]';\nconst EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$6}`;\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME$e;\n } // Public\n\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this);\n\n if (config === 'toggle') {\n data[config]();\n }\n });\n }\n\n}\n/**\n * Data API implementation\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {\n event.preventDefault();\n const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);\n const data = Button.getOrCreateInstance(button);\n data.toggle();\n});\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector));\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector);\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector));\n },\n\n parents(element, selector) {\n const parents = [];\n let ancestor = element.parentNode.closest(selector);\n\n while (ancestor) {\n parents.push(ancestor);\n ancestor = ancestor.parentNode.closest(selector);\n }\n\n return parents;\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling;\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous];\n }\n\n previous = previous.previousElementSibling;\n }\n\n return [];\n },\n\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling;\n\n while (next) {\n if (next.matches(selector)) {\n return [next];\n }\n\n next = next.nextElementSibling;\n }\n\n return [];\n },\n\n focusableChildren(element) {\n const focusables = ['a', 'button', 'input', 'textarea', 'select', 'details', '[tabindex]', '[contenteditable=\"true\"]'].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',');\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el));\n }\n\n};\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/swipe.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$d = 'swipe';\nconst EVENT_KEY$9 = '.bs.swipe';\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY$9}`;\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY$9}`;\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY$9}`;\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY$9}`;\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY$9}`;\nconst POINTER_TYPE_TOUCH = 'touch';\nconst POINTER_TYPE_PEN = 'pen';\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event';\nconst SWIPE_THRESHOLD = 40;\nconst Default$c = {\n endCallback: null,\n leftCallback: null,\n rightCallback: null\n};\nconst DefaultType$c = {\n endCallback: '(function|null)',\n leftCallback: '(function|null)',\n rightCallback: '(function|null)'\n};\n/**\n * Class definition\n */\n\nclass Swipe extends Config {\n constructor(element, config) {\n super();\n this._element = element;\n\n if (!element || !Swipe.isSupported()) {\n return;\n }\n\n this._config = this._getConfig(config);\n this._deltaX = 0;\n this._supportPointerEvents = Boolean(window.PointerEvent);\n\n this._initEvents();\n } // Getters\n\n\n static get Default() {\n return Default$c;\n }\n\n static get DefaultType() {\n return DefaultType$c;\n }\n\n static get NAME() {\n return NAME$d;\n } // Public\n\n\n dispose() {\n EventHandler.off(this._element, EVENT_KEY$9);\n } // Private\n\n\n _start(event) {\n if (!this._supportPointerEvents) {\n this._deltaX = event.touches[0].clientX;\n return;\n }\n\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX;\n }\n }\n\n _end(event) {\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX - this._deltaX;\n }\n\n this._handleSwipe();\n\n execute(this._config.endCallback);\n }\n\n _move(event) {\n this._deltaX = event.touches && event.touches.length > 1 ? 0 : event.touches[0].clientX - this._deltaX;\n }\n\n _handleSwipe() {\n const absDeltaX = Math.abs(this._deltaX);\n\n if (absDeltaX <= SWIPE_THRESHOLD) {\n return;\n }\n\n const direction = absDeltaX / this._deltaX;\n this._deltaX = 0;\n\n if (!direction) {\n return;\n }\n\n execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback);\n }\n\n _initEvents() {\n if (this._supportPointerEvents) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event));\n EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event));\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT);\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event));\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event));\n EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event));\n }\n }\n\n _eventIsPointerPenTouch(event) {\n return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH);\n } // Static\n\n\n static isSupported() {\n return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0;\n }\n\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$c = 'carousel';\nconst DATA_KEY$8 = 'bs.carousel';\nconst EVENT_KEY$8 = `.${DATA_KEY$8}`;\nconst DATA_API_KEY$5 = '.data-api';\nconst ARROW_LEFT_KEY$1 = 'ArrowLeft';\nconst ARROW_RIGHT_KEY$1 = 'ArrowRight';\nconst TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch\n\nconst ORDER_NEXT = 'next';\nconst ORDER_PREV = 'prev';\nconst DIRECTION_LEFT = 'left';\nconst DIRECTION_RIGHT = 'right';\nconst EVENT_SLIDE = `slide${EVENT_KEY$8}`;\nconst EVENT_SLID = `slid${EVENT_KEY$8}`;\nconst EVENT_KEYDOWN$1 = `keydown${EVENT_KEY$8}`;\nconst EVENT_MOUSEENTER$1 = `mouseenter${EVENT_KEY$8}`;\nconst EVENT_MOUSELEAVE$1 = `mouseleave${EVENT_KEY$8}`;\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY$8}`;\nconst EVENT_LOAD_DATA_API$3 = `load${EVENT_KEY$8}${DATA_API_KEY$5}`;\nconst EVENT_CLICK_DATA_API$5 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;\nconst CLASS_NAME_CAROUSEL = 'carousel';\nconst CLASS_NAME_ACTIVE$2 = 'active';\nconst CLASS_NAME_SLIDE = 'slide';\nconst CLASS_NAME_END = 'carousel-item-end';\nconst CLASS_NAME_START = 'carousel-item-start';\nconst CLASS_NAME_NEXT = 'carousel-item-next';\nconst CLASS_NAME_PREV = 'carousel-item-prev';\nconst SELECTOR_ACTIVE = '.active';\nconst SELECTOR_ITEM = '.carousel-item';\nconst SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM;\nconst SELECTOR_ITEM_IMG = '.carousel-item img';\nconst SELECTOR_INDICATORS = '.carousel-indicators';\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]';\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]';\nconst KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY$1]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY$1]: DIRECTION_LEFT\n};\nconst Default$b = {\n interval: 5000,\n keyboard: true,\n pause: 'hover',\n ride: false,\n touch: true,\n wrap: true\n};\nconst DefaultType$b = {\n interval: '(number|boolean)',\n // TODO:v6 remove boolean support\n keyboard: 'boolean',\n pause: '(string|boolean)',\n ride: '(boolean|string)',\n touch: 'boolean',\n wrap: 'boolean'\n};\n/**\n * Class definition\n */\n\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._interval = null;\n this._activeElement = null;\n this._isSliding = false;\n this.touchTimeout = null;\n this._swipeHelper = null;\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element);\n\n this._addEventListeners();\n\n if (this._config.ride === CLASS_NAME_CAROUSEL) {\n this.cycle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$b;\n }\n\n static get DefaultType() {\n return DefaultType$b;\n }\n\n static get NAME() {\n return NAME$c;\n } // Public\n\n\n next() {\n this._slide(ORDER_NEXT);\n }\n\n nextWhenVisible() {\n // FIXME TODO use `document.visibilityState`\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next();\n }\n }\n\n prev() {\n this._slide(ORDER_PREV);\n }\n\n pause() {\n if (this._isSliding) {\n triggerTransitionEnd(this._element);\n }\n\n this._clearInterval();\n }\n\n cycle() {\n this._clearInterval();\n\n this._updateInterval();\n\n this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval);\n }\n\n _maybeEnableCycle() {\n if (!this._config.ride) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.cycle());\n return;\n }\n\n this.cycle();\n }\n\n to(index) {\n const items = this._getItems();\n\n if (index > items.length - 1 || index < 0) {\n return;\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index));\n return;\n }\n\n const activeIndex = this._getItemIndex(this._getActive());\n\n if (activeIndex === index) {\n return;\n }\n\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV;\n\n this._slide(order, items[index]);\n }\n\n dispose() {\n if (this._swipeHelper) {\n this._swipeHelper.dispose();\n }\n\n super.dispose();\n } // Private\n\n\n _configAfterMerge(config) {\n config.defaultInterval = config.interval;\n return config;\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN$1, event => this._keydown(event));\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER$1, () => this.pause());\n EventHandler.on(this._element, EVENT_MOUSELEAVE$1, () => this._maybeEnableCycle());\n }\n\n if (this._config.touch && Swipe.isSupported()) {\n this._addTouchEventListeners();\n }\n }\n\n _addTouchEventListeners() {\n for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {\n EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault());\n }\n\n const endCallBack = () => {\n if (this._config.pause !== 'hover') {\n return;\n } // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n\n this.pause();\n\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout);\n }\n\n this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval);\n };\n\n const swipeConfig = {\n leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),\n rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),\n endCallback: endCallBack\n };\n this._swipeHelper = new Swipe(this._element, swipeConfig);\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return;\n }\n\n const direction = KEY_TO_DIRECTION[event.key];\n\n if (direction) {\n event.preventDefault();\n\n this._slide(this._directionToOrder(direction));\n }\n }\n\n _getItemIndex(element) {\n return this._getItems().indexOf(element);\n }\n\n _setActiveIndicatorElement(index) {\n if (!this._indicatorsElement) {\n return;\n }\n\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement);\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE$2);\n activeIndicator.removeAttribute('aria-current');\n const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to=\"${index}\"]`, this._indicatorsElement);\n\n if (newActiveIndicator) {\n newActiveIndicator.classList.add(CLASS_NAME_ACTIVE$2);\n newActiveIndicator.setAttribute('aria-current', 'true');\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || this._getActive();\n\n if (!element) {\n return;\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10);\n this._config.interval = elementInterval || this._config.defaultInterval;\n }\n\n _slide(order, element = null) {\n if (this._isSliding) {\n return;\n }\n\n const activeElement = this._getActive();\n\n const isNext = order === ORDER_NEXT;\n const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap);\n\n if (nextElement === activeElement) {\n return;\n }\n\n const nextElementIndex = this._getItemIndex(nextElement);\n\n const triggerEvent = eventName => {\n return EventHandler.trigger(this._element, eventName, {\n relatedTarget: nextElement,\n direction: this._orderToDirection(order),\n from: this._getItemIndex(activeElement),\n to: nextElementIndex\n });\n };\n\n const slideEvent = triggerEvent(EVENT_SLIDE);\n\n if (slideEvent.defaultPrevented) {\n return;\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n // todo: change tests that use empty divs to avoid this check\n return;\n }\n\n const isCycling = Boolean(this._interval);\n this.pause();\n this._isSliding = true;\n\n this._setActiveIndicatorElement(nextElementIndex);\n\n this._activeElement = nextElement;\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END;\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV;\n nextElement.classList.add(orderClassName);\n reflow(nextElement);\n activeElement.classList.add(directionalClassName);\n nextElement.classList.add(directionalClassName);\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName);\n nextElement.classList.add(CLASS_NAME_ACTIVE$2);\n activeElement.classList.remove(CLASS_NAME_ACTIVE$2, orderClassName, directionalClassName);\n this._isSliding = false;\n triggerEvent(EVENT_SLID);\n };\n\n this._queueCallback(completeCallBack, activeElement, this._isAnimated());\n\n if (isCycling) {\n this.cycle();\n }\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_SLIDE);\n }\n\n _getActive() {\n return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element);\n }\n\n _getItems() {\n return SelectorEngine.find(SELECTOR_ITEM, this._element);\n }\n\n _clearInterval() {\n if (this._interval) {\n clearInterval(this._interval);\n this._interval = null;\n }\n }\n\n _directionToOrder(direction) {\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT;\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV;\n }\n\n _orderToDirection(order) {\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT;\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT;\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Carousel.getOrCreateInstance(this, config);\n\n if (typeof config === 'number') {\n data.to(config);\n return;\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n}\n/**\n * Data API implementation\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$5, SELECTOR_DATA_SLIDE, function (event) {\n const target = getElementFromSelector(this);\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return;\n }\n\n event.preventDefault();\n const carousel = Carousel.getOrCreateInstance(target);\n const slideIndex = this.getAttribute('data-bs-slide-to');\n\n if (slideIndex) {\n carousel.to(slideIndex);\n\n carousel._maybeEnableCycle();\n\n return;\n }\n\n if (Manipulator.getDataAttribute(this, 'slide') === 'next') {\n carousel.next();\n\n carousel._maybeEnableCycle();\n\n return;\n }\n\n carousel.prev();\n\n carousel._maybeEnableCycle();\n});\nEventHandler.on(window, EVENT_LOAD_DATA_API$3, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE);\n\n for (const carousel of carousels) {\n Carousel.getOrCreateInstance(carousel);\n }\n});\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Carousel);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$b = 'collapse';\nconst DATA_KEY$7 = 'bs.collapse';\nconst EVENT_KEY$7 = `.${DATA_KEY$7}`;\nconst DATA_API_KEY$4 = '.data-api';\nconst EVENT_SHOW$6 = `show${EVENT_KEY$7}`;\nconst EVENT_SHOWN$6 = `shown${EVENT_KEY$7}`;\nconst EVENT_HIDE$6 = `hide${EVENT_KEY$7}`;\nconst EVENT_HIDDEN$6 = `hidden${EVENT_KEY$7}`;\nconst EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;\nconst CLASS_NAME_SHOW$7 = 'show';\nconst CLASS_NAME_COLLAPSE = 'collapse';\nconst CLASS_NAME_COLLAPSING = 'collapsing';\nconst CLASS_NAME_COLLAPSED = 'collapsed';\nconst CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`;\nconst CLASS_NAME_HORIZONTAL = 'collapse-horizontal';\nconst WIDTH = 'width';\nconst HEIGHT = 'height';\nconst SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing';\nconst SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle=\"collapse\"]';\nconst Default$a = {\n parent: null,\n toggle: true\n};\nconst DefaultType$a = {\n parent: '(null|element)',\n toggle: 'boolean'\n};\n/**\n * Class definition\n */\n\nclass Collapse extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isTransitioning = false;\n this._triggerArray = [];\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);\n\n for (const elem of toggleList) {\n const selector = getSelectorFromElement(elem);\n const filterElement = SelectorEngine.find(selector).filter(foundElement => foundElement === this._element);\n\n if (selector !== null && filterElement.length) {\n this._triggerArray.push(elem);\n }\n }\n\n this._initializeChildren();\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown());\n }\n\n if (this._config.toggle) {\n this.toggle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$a;\n }\n\n static get DefaultType() {\n return DefaultType$a;\n }\n\n static get NAME() {\n return NAME$b;\n } // Public\n\n\n toggle() {\n if (this._isShown()) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n show() {\n if (this._isTransitioning || this._isShown()) {\n return;\n }\n\n let activeChildren = []; // find active children\n\n if (this._config.parent) {\n activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES).filter(element => element !== this._element).map(element => Collapse.getOrCreateInstance(element, {\n toggle: false\n }));\n }\n\n if (activeChildren.length && activeChildren[0]._isTransitioning) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$6);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n for (const activeInstance of activeChildren) {\n activeInstance.hide();\n }\n\n const dimension = this._getDimension();\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.style[dimension] = 0;\n\n this._addAriaAndCollapsedClass(this._triggerArray, true);\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n this._element.style[dimension] = '';\n EventHandler.trigger(this._element, EVENT_SHOWN$6);\n };\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);\n const scrollSize = `scroll${capitalizedDimension}`;\n\n this._queueCallback(complete, this._element, true);\n\n this._element.style[dimension] = `${this._element[scrollSize]}px`;\n }\n\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return;\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$6);\n\n if (startEvent.defaultPrevented) {\n return;\n }\n\n const dimension = this._getDimension();\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_COLLAPSING);\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$7);\n\n for (const trigger of this._triggerArray) {\n const element = getElementFromSelector(trigger);\n\n if (element && !this._isShown(element)) {\n this._addAriaAndCollapsedClass([trigger], false);\n }\n }\n\n this._isTransitioning = true;\n\n const complete = () => {\n this._isTransitioning = false;\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING);\n\n this._element.classList.add(CLASS_NAME_COLLAPSE);\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$6);\n };\n\n this._element.style[dimension] = '';\n\n this._queueCallback(complete, this._element, true);\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW$7);\n } // Private\n\n\n _configAfterMerge(config) {\n config.toggle = Boolean(config.toggle); // Coerce string values\n\n config.parent = getElement(config.parent);\n return config;\n }\n\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT;\n }\n\n _initializeChildren() {\n if (!this._config.parent) {\n return;\n }\n\n const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE$4);\n\n for (const element of children) {\n const selected = getElementFromSelector(element);\n\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected));\n }\n }\n }\n\n _getFirstLevelChildren(selector) {\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent); // remove children if greater depth\n\n return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element));\n }\n\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return;\n }\n\n for (const element of triggerArray) {\n element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen);\n element.setAttribute('aria-expanded', isOpen);\n }\n } // Static\n\n\n static jQueryInterface(config) {\n const _config = {};\n\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false;\n }\n\n return this.each(function () {\n const data = Collapse.getOrCreateInstance(this, _config);\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n }\n });\n }\n\n}\n/**\n * Data API implementation\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {\n event.preventDefault();\n }\n\n const selector = getSelectorFromElement(this);\n const selectorElements = SelectorEngine.find(selector);\n\n for (const element of selectorElements) {\n Collapse.getOrCreateInstance(element, {\n toggle: false\n }).toggle();\n }\n});\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Collapse);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$a = 'dropdown';\nconst DATA_KEY$6 = 'bs.dropdown';\nconst EVENT_KEY$6 = `.${DATA_KEY$6}`;\nconst DATA_API_KEY$3 = '.data-api';\nconst ESCAPE_KEY$2 = 'Escape';\nconst TAB_KEY$1 = 'Tab';\nconst ARROW_UP_KEY$1 = 'ArrowUp';\nconst ARROW_DOWN_KEY$1 = 'ArrowDown';\nconst RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button\n\nconst EVENT_HIDE$5 = `hide${EVENT_KEY$6}`;\nconst EVENT_HIDDEN$5 = `hidden${EVENT_KEY$6}`;\nconst EVENT_SHOW$5 = `show${EVENT_KEY$6}`;\nconst EVENT_SHOWN$5 = `shown${EVENT_KEY$6}`;\nconst EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$6}${DATA_API_KEY$3}`;\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$6}${DATA_API_KEY$3}`;\nconst CLASS_NAME_SHOW$6 = 'show';\nconst CLASS_NAME_DROPUP = 'dropup';\nconst CLASS_NAME_DROPEND = 'dropend';\nconst CLASS_NAME_DROPSTART = 'dropstart';\nconst CLASS_NAME_DROPUP_CENTER = 'dropup-center';\nconst CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center';\nconst SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)';\nconst SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE$3}.${CLASS_NAME_SHOW$6}`;\nconst SELECTOR_MENU = '.dropdown-menu';\nconst SELECTOR_NAVBAR = '.navbar';\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav';\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';\nconst PLACEMENT_TOPCENTER = 'top';\nconst PLACEMENT_BOTTOMCENTER = 'bottom';\nconst Default$9 = {\n autoClose: true,\n boundary: 'clippingParents',\n display: 'dynamic',\n offset: [0, 2],\n popperConfig: null,\n reference: 'toggle'\n};\nconst DefaultType$9 = {\n autoClose: '(boolean|string)',\n boundary: '(string|element)',\n display: 'string',\n offset: '(array|string|function)',\n popperConfig: '(null|object|function)',\n reference: '(string|element|object)'\n};\n/**\n * Class definition\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._popper = null;\n this._parent = this._element.parentNode; // dropdown wrapper\n // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/\n\n this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0] || SelectorEngine.findOne(SELECTOR_MENU, this._parent);\n this._inNavbar = this._detectNavbar();\n } // Getters\n\n\n static get Default() {\n return Default$9;\n }\n\n static get DefaultType() {\n return DefaultType$9;\n }\n\n static get NAME() {\n return NAME$a;\n } // Public\n\n\n toggle() {\n return this._isShown() ? this.hide() : this.show();\n }\n\n show() {\n if (isDisabled(this._element) || this._isShown()) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$5, relatedTarget);\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._createPopper(); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n\n if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n\n this._element.focus();\n\n this._element.setAttribute('aria-expanded', true);\n\n this._menu.classList.add(CLASS_NAME_SHOW$6);\n\n this._element.classList.add(CLASS_NAME_SHOW$6);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$5, relatedTarget);\n }\n\n hide() {\n if (isDisabled(this._element) || !this._isShown()) {\n return;\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n };\n\n this._completeHide(relatedTarget);\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy();\n }\n\n super.dispose();\n }\n\n update() {\n this._inNavbar = this._detectNavbar();\n\n if (this._popper) {\n this._popper.update();\n }\n } // Private\n\n\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$5, relatedTarget);\n\n if (hideEvent.defaultPrevented) {\n return;\n } // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n\n if (this._popper) {\n this._popper.destroy();\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.classList.remove(CLASS_NAME_SHOW$6);\n\n this._element.setAttribute('aria-expanded', 'false');\n\n Manipulator.removeDataAttribute(this._menu, 'popper');\n EventHandler.trigger(this._element, EVENT_HIDDEN$5, relatedTarget);\n }\n\n _getConfig(config) {\n config = super._getConfig(config);\n\n if (typeof config.reference === 'object' && !isElement(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME$a.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`);\n }\n\n return config;\n }\n\n _createPopper() {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)');\n }\n\n let referenceElement = this._element;\n\n if (this._config.reference === 'parent') {\n referenceElement = this._parent;\n } else if (isElement(this._config.reference)) {\n referenceElement = getElement(this._config.reference);\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference;\n }\n\n const popperConfig = this._getPopperConfig();\n\n this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig);\n }\n\n _isShown() {\n return this._menu.classList.contains(CLASS_NAME_SHOW$6);\n }\n\n _getPlacement() {\n const parentDropdown = this._parent;\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {\n return PLACEMENT_TOPCENTER;\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {\n return PLACEMENT_BOTTOMCENTER;\n } // We need to trim the value because custom properties can also include spaces\n\n\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;\n }\n\n _detectNavbar() {\n return this._element.closest(SELECTOR_NAVBAR) !== null;\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }; // Disable Popper if we have a static display or Dropdown is in Navbar\n\n if (this._inNavbar || this._config.display === 'static') {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static'); // todo:v6 remove\n\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }];\n }\n\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _selectMenuItem({\n key,\n target\n }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element));\n\n if (!items.length) {\n return;\n } // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n\n\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY$1, !items.includes(target)).focus();\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Dropdown.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n static clearMenus(event) {\n if (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY$1) {\n return;\n }\n\n const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN);\n\n for (const toggle of openToggles) {\n const context = Dropdown.getInstance(toggle);\n\n if (!context || context._config.autoClose === false) {\n continue;\n }\n\n const composedPath = event.composedPath();\n const isMenuTarget = composedPath.includes(context._menu);\n\n if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {\n continue;\n } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n\n\n if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY$1 || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue;\n }\n\n const relatedTarget = {\n relatedTarget: context._element\n };\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event;\n }\n\n context._completeHide(relatedTarget);\n }\n }\n\n static dataApiKeydownHandler(event) {\n // If not an UP | DOWN | ESCAPE key => not a dropdown command\n // If input/textarea && if key is other than ESCAPE => not a dropdown command\n const isInput = /input|textarea/i.test(event.target.tagName);\n const isEscapeEvent = event.key === ESCAPE_KEY$2;\n const isUpOrDownEvent = [ARROW_UP_KEY$1, ARROW_DOWN_KEY$1].includes(event.key);\n\n if (!isUpOrDownEvent && !isEscapeEvent) {\n return;\n }\n\n if (isInput && !isEscapeEvent) {\n return;\n }\n\n event.preventDefault(); // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/\n\n const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);\n const instance = Dropdown.getOrCreateInstance(getToggleButton);\n\n if (isUpOrDownEvent) {\n event.stopPropagation();\n instance.show();\n\n instance._selectMenuItem(event);\n\n return;\n }\n\n if (instance._isShown()) {\n // else is escape and we check if it is shown\n event.stopPropagation();\n instance.hide();\n getToggleButton.focus();\n }\n }\n\n}\n/**\n * Data API implementation\n */\n\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);\nEventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);\nEventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {\n event.preventDefault();\n Dropdown.getOrCreateInstance(this).toggle();\n});\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Dropdown);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';\nconst SELECTOR_STICKY_CONTENT = '.sticky-top';\nconst PROPERTY_PADDING = 'padding-right';\nconst PROPERTY_MARGIN = 'margin-right';\n/**\n * Class definition\n */\n\nclass ScrollBarHelper {\n constructor() {\n this._element = document.body;\n } // Public\n\n\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n }\n\n hide() {\n const width = this.getWidth();\n\n this._disableOverFlow(); // give padding to element to balance the hidden scrollbar width\n\n\n this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n\n\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width);\n\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width);\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow');\n\n this._resetElementAttributes(this._element, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING);\n\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN);\n }\n\n isOverflowing() {\n return this.getWidth() > 0;\n } // Private\n\n\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow');\n\n this._element.style.overflow = 'hidden';\n }\n\n _setElementAttributes(selector, styleProperty, callback) {\n const scrollbarWidth = this.getWidth();\n\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return;\n }\n\n this._saveInitialAttribute(element, styleProperty);\n\n const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty);\n element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _saveInitialAttribute(element, styleProperty) {\n const actualValue = element.style.getPropertyValue(styleProperty);\n\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProperty, actualValue);\n }\n }\n\n _resetElementAttributes(selector, styleProperty) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProperty); // We only want to remove the property if the value is `null`; the value can also be zero\n\n if (value === null) {\n element.style.removeProperty(styleProperty);\n return;\n }\n\n Manipulator.removeDataAttribute(element, styleProperty);\n element.style.setProperty(styleProperty, value);\n };\n\n this._applyManipulationCallback(selector, manipulationCallBack);\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (isElement(selector)) {\n callBack(selector);\n return;\n }\n\n for (const sel of SelectorEngine.find(selector, this._element)) {\n callBack(sel);\n }\n }\n\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$9 = 'backdrop';\nconst CLASS_NAME_FADE$4 = 'fade';\nconst CLASS_NAME_SHOW$5 = 'show';\nconst EVENT_MOUSEDOWN = `mousedown.bs.${NAME$9}`;\nconst Default$8 = {\n className: 'modal-backdrop',\n clickCallback: null,\n isAnimated: false,\n isVisible: true,\n // if false, we use the backdrop helper without adding any element to the dom\n rootElement: 'body' // give the choice to place backdrop under different elements\n\n};\nconst DefaultType$8 = {\n className: 'string',\n clickCallback: '(function|null)',\n isAnimated: 'boolean',\n isVisible: 'boolean',\n rootElement: '(element|string)'\n};\n/**\n * Class definition\n */\n\nclass Backdrop extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isAppended = false;\n this._element = null;\n } // Getters\n\n\n static get Default() {\n return Default$8;\n }\n\n static get DefaultType() {\n return DefaultType$8;\n }\n\n static get NAME() {\n return NAME$9;\n } // Public\n\n\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._append();\n\n const element = this._getElement();\n\n if (this._config.isAnimated) {\n reflow(element);\n }\n\n element.classList.add(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n execute(callback);\n });\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback);\n return;\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW$5);\n\n this._emulateAnimation(() => {\n this.dispose();\n execute(callback);\n });\n }\n\n dispose() {\n if (!this._isAppended) {\n return;\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN);\n\n this._element.remove();\n\n this._isAppended = false;\n } // Private\n\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div');\n backdrop.className = this._config.className;\n\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE$4);\n }\n\n this._element = backdrop;\n }\n\n return this._element;\n }\n\n _configAfterMerge(config) {\n // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n config.rootElement = getElement(config.rootElement);\n return config;\n }\n\n _append() {\n if (this._isAppended) {\n return;\n }\n\n const element = this._getElement();\n\n this._config.rootElement.append(element);\n\n EventHandler.on(element, EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback);\n });\n this._isAppended = true;\n }\n\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated);\n }\n\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$8 = 'focustrap';\nconst DATA_KEY$5 = 'bs.focustrap';\nconst EVENT_KEY$5 = `.${DATA_KEY$5}`;\nconst EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$5}`;\nconst EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY$5}`;\nconst TAB_KEY = 'Tab';\nconst TAB_NAV_FORWARD = 'forward';\nconst TAB_NAV_BACKWARD = 'backward';\nconst Default$7 = {\n autofocus: true,\n trapElement: null // The element to trap focus inside of\n\n};\nconst DefaultType$7 = {\n autofocus: 'boolean',\n trapElement: 'element'\n};\n/**\n * Class definition\n */\n\nclass FocusTrap extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n this._isActive = false;\n this._lastTabNavDirection = null;\n } // Getters\n\n\n static get Default() {\n return Default$7;\n }\n\n static get DefaultType() {\n return DefaultType$7;\n }\n\n static get NAME() {\n return NAME$8;\n } // Public\n\n\n activate() {\n if (this._isActive) {\n return;\n }\n\n if (this._config.autofocus) {\n this._config.trapElement.focus();\n }\n\n EventHandler.off(document, EVENT_KEY$5); // guard against infinite focus loop\n\n EventHandler.on(document, EVENT_FOCUSIN$2, event => this._handleFocusin(event));\n EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event));\n this._isActive = true;\n }\n\n deactivate() {\n if (!this._isActive) {\n return;\n }\n\n this._isActive = false;\n EventHandler.off(document, EVENT_KEY$5);\n } // Private\n\n\n _handleFocusin(event) {\n const {\n trapElement\n } = this._config;\n\n if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n return;\n }\n\n const elements = SelectorEngine.focusableChildren(trapElement);\n\n if (elements.length === 0) {\n trapElement.focus();\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus();\n } else {\n elements[0].focus();\n }\n }\n\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return;\n }\n\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD;\n }\n\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$7 = 'modal';\nconst DATA_KEY$4 = 'bs.modal';\nconst EVENT_KEY$4 = `.${DATA_KEY$4}`;\nconst DATA_API_KEY$2 = '.data-api';\nconst ESCAPE_KEY$1 = 'Escape';\nconst EVENT_HIDE$4 = `hide${EVENT_KEY$4}`;\nconst EVENT_HIDE_PREVENTED$1 = `hidePrevented${EVENT_KEY$4}`;\nconst EVENT_HIDDEN$4 = `hidden${EVENT_KEY$4}`;\nconst EVENT_SHOW$4 = `show${EVENT_KEY$4}`;\nconst EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;\nconst EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;\nconst EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;\nconst EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;\nconst CLASS_NAME_OPEN = 'modal-open';\nconst CLASS_NAME_FADE$3 = 'fade';\nconst CLASS_NAME_SHOW$4 = 'show';\nconst CLASS_NAME_STATIC = 'modal-static';\nconst OPEN_SELECTOR$1 = '.modal.show';\nconst SELECTOR_DIALOG = '.modal-dialog';\nconst SELECTOR_MODAL_BODY = '.modal-body';\nconst SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle=\"modal\"]';\nconst Default$6 = {\n backdrop: true,\n focus: true,\n keyboard: true\n};\nconst DefaultType$6 = {\n backdrop: '(boolean|string)',\n focus: 'boolean',\n keyboard: 'boolean'\n};\n/**\n * Class definition\n */\n\nclass Modal extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n this._isShown = false;\n this._isTransitioning = false;\n this._scrollBar = new ScrollBarHelper();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$6;\n }\n\n static get DefaultType() {\n return DefaultType$6;\n }\n\n static get NAME() {\n return NAME$7;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n this._isTransitioning = true;\n\n this._scrollBar.hide();\n\n document.body.classList.add(CLASS_NAME_OPEN);\n\n this._adjustDialog();\n\n this._backdrop.show(() => this._showElement(relatedTarget));\n }\n\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = false;\n this._isTransitioning = true;\n\n this._focustrap.deactivate();\n\n this._element.classList.remove(CLASS_NAME_SHOW$4);\n\n this._queueCallback(() => this._hideModal(), this._element, this._isAnimated());\n }\n\n dispose() {\n for (const htmlElement of [window, this._dialog]) {\n EventHandler.off(htmlElement, EVENT_KEY$4);\n }\n\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n }\n\n handleUpdate() {\n this._adjustDialog();\n } // Private\n\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop),\n // 'static' option will be translated to true, and booleans will keep their value,\n isAnimated: this._isAnimated()\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _showElement(relatedTarget) {\n // try to append dynamic modal\n if (!document.body.contains(this._element)) {\n document.body.append(this._element);\n }\n\n this._element.style.display = 'block';\n\n this._element.removeAttribute('aria-hidden');\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.scrollTop = 0;\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);\n\n if (modalBody) {\n modalBody.scrollTop = 0;\n }\n\n reflow(this._element);\n\n this._element.classList.add(CLASS_NAME_SHOW$4);\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate();\n }\n\n this._isTransitioning = false;\n EventHandler.trigger(this._element, EVENT_SHOWN$4, {\n relatedTarget\n });\n };\n\n this._queueCallback(transitionComplete, this._dialog, this._isAnimated());\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {\n if (event.key !== ESCAPE_KEY$1) {\n return;\n }\n\n if (this._config.keyboard) {\n event.preventDefault();\n this.hide();\n return;\n }\n\n this._triggerBackdropTransition();\n });\n EventHandler.on(window, EVENT_RESIZE$1, () => {\n if (this._isShown && !this._isTransitioning) {\n this._adjustDialog();\n }\n });\n EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {\n // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks\n EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {\n if (this._element !== event.target || this._element !== event2.target) {\n return;\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition();\n\n return;\n }\n\n if (this._config.backdrop) {\n this.hide();\n }\n });\n });\n }\n\n _hideModal() {\n this._element.style.display = 'none';\n\n this._element.setAttribute('aria-hidden', true);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n this._isTransitioning = false;\n\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN);\n\n this._resetAdjustments();\n\n this._scrollBar.reset();\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$4);\n });\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE$3);\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED$1);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n const initialOverflowY = this._element.style.overflowY; // return if the following background transition hasn't yet completed\n\n if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n return;\n }\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden';\n }\n\n this._element.classList.add(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.classList.remove(CLASS_NAME_STATIC);\n\n this._queueCallback(() => {\n this._element.style.overflowY = initialOverflowY;\n }, this._dialog);\n }, this._dialog);\n\n this._element.focus();\n }\n /**\n * The following methods are used to handle overflowing modals\n */\n\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;\n\n const scrollbarWidth = this._scrollBar.getWidth();\n\n const isBodyOverflowing = scrollbarWidth > 0;\n\n if (isBodyOverflowing && !isModalOverflowing) {\n const property = isRTL() ? 'paddingLeft' : 'paddingRight';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n\n if (!isBodyOverflowing && isModalOverflowing) {\n const property = isRTL() ? 'paddingRight' : 'paddingLeft';\n this._element.style[property] = `${scrollbarWidth}px`;\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = '';\n this._element.style.paddingRight = '';\n } // Static\n\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](relatedTarget);\n });\n }\n\n}\n/**\n * Data API implementation\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n EventHandler.one(target, EVENT_SHOW$4, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$4, () => {\n if (isVisible(this)) {\n this.focus();\n }\n });\n }); // avoid conflict when clicking modal toggler while another one is open\n\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR$1);\n\n if (alreadyOpen) {\n Modal.getInstance(alreadyOpen).hide();\n }\n\n const data = Modal.getOrCreateInstance(target);\n data.toggle(this);\n});\nenableDismissTrigger(Modal);\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Modal);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$6 = 'offcanvas';\nconst DATA_KEY$3 = 'bs.offcanvas';\nconst EVENT_KEY$3 = `.${DATA_KEY$3}`;\nconst DATA_API_KEY$1 = '.data-api';\nconst EVENT_LOAD_DATA_API$2 = `load${EVENT_KEY$3}${DATA_API_KEY$1}`;\nconst ESCAPE_KEY = 'Escape';\nconst CLASS_NAME_SHOW$3 = 'show';\nconst CLASS_NAME_SHOWING$1 = 'showing';\nconst CLASS_NAME_HIDING = 'hiding';\nconst CLASS_NAME_BACKDROP = 'offcanvas-backdrop';\nconst OPEN_SELECTOR = '.offcanvas.show';\nconst EVENT_SHOW$3 = `show${EVENT_KEY$3}`;\nconst EVENT_SHOWN$3 = `shown${EVENT_KEY$3}`;\nconst EVENT_HIDE$3 = `hide${EVENT_KEY$3}`;\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$3}`;\nconst EVENT_HIDDEN$3 = `hidden${EVENT_KEY$3}`;\nconst EVENT_RESIZE = `resize${EVENT_KEY$3}`;\nconst EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$3}${DATA_API_KEY$1}`;\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$3}`;\nconst SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle=\"offcanvas\"]';\nconst Default$5 = {\n backdrop: true,\n keyboard: true,\n scroll: false\n};\nconst DefaultType$5 = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n scroll: 'boolean'\n};\n/**\n * Class definition\n */\n\nclass Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element, config);\n this._isShown = false;\n this._backdrop = this._initializeBackDrop();\n this._focustrap = this._initializeFocusTrap();\n\n this._addEventListeners();\n } // Getters\n\n\n static get Default() {\n return Default$5;\n }\n\n static get DefaultType() {\n return DefaultType$5;\n }\n\n static get NAME() {\n return NAME$6;\n } // Public\n\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget);\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {\n relatedTarget\n });\n\n if (showEvent.defaultPrevented) {\n return;\n }\n\n this._isShown = true;\n\n this._backdrop.show();\n\n if (!this._config.scroll) {\n new ScrollBarHelper().hide();\n }\n\n this._element.setAttribute('aria-modal', true);\n\n this._element.setAttribute('role', 'dialog');\n\n this._element.classList.add(CLASS_NAME_SHOWING$1);\n\n const completeCallBack = () => {\n if (!this._config.scroll || this._config.backdrop) {\n this._focustrap.activate();\n }\n\n this._element.classList.add(CLASS_NAME_SHOW$3);\n\n this._element.classList.remove(CLASS_NAME_SHOWING$1);\n\n EventHandler.trigger(this._element, EVENT_SHOWN$3, {\n relatedTarget\n });\n };\n\n this._queueCallback(completeCallBack, this._element, true);\n }\n\n hide() {\n if (!this._isShown) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n this._focustrap.deactivate();\n\n this._element.blur();\n\n this._isShown = false;\n\n this._element.classList.add(CLASS_NAME_HIDING);\n\n this._backdrop.hide();\n\n const completeCallback = () => {\n this._element.classList.remove(CLASS_NAME_SHOW$3, CLASS_NAME_HIDING);\n\n this._element.removeAttribute('aria-modal');\n\n this._element.removeAttribute('role');\n\n if (!this._config.scroll) {\n new ScrollBarHelper().reset();\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN$3);\n };\n\n this._queueCallback(completeCallback, this._element, true);\n }\n\n dispose() {\n this._backdrop.dispose();\n\n this._focustrap.deactivate();\n\n super.dispose();\n } // Private\n\n\n _initializeBackDrop() {\n const clickCallback = () => {\n if (this._config.backdrop === 'static') {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n }; // 'static' option will be translated to true, and booleans will keep their value\n\n\n const isVisible = Boolean(this._config.backdrop);\n return new Backdrop({\n className: CLASS_NAME_BACKDROP,\n isVisible,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: isVisible ? clickCallback : null\n });\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n });\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return;\n }\n\n if (!this._config.keyboard) {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);\n return;\n }\n\n this.hide();\n });\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config](this);\n });\n }\n\n}\n/**\n * Data API implementation\n */\n\n\nEventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {\n const target = getElementFromSelector(this);\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault();\n }\n\n if (isDisabled(this)) {\n return;\n }\n\n EventHandler.one(target, EVENT_HIDDEN$3, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus();\n }\n }); // avoid conflict when clicking a toggler of an offcanvas, while another is open\n\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);\n\n if (alreadyOpen && alreadyOpen !== target) {\n Offcanvas.getInstance(alreadyOpen).hide();\n }\n\n const data = Offcanvas.getOrCreateInstance(target);\n data.toggle(this);\n});\nEventHandler.on(window, EVENT_LOAD_DATA_API$2, () => {\n for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {\n Offcanvas.getOrCreateInstance(selector).show();\n }\n});\nEventHandler.on(window, EVENT_RESIZE, () => {\n for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n if (getComputedStyle(element).position !== 'fixed') {\n Offcanvas.getOrCreateInstance(element).hide();\n }\n }\n});\nenableDismissTrigger(Offcanvas);\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Offcanvas);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\nconst uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i;\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\n\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i;\n\nconst allowedAttribute = (attribute, allowedAttributeList) => {\n const attributeName = attribute.nodeName.toLowerCase();\n\n if (allowedAttributeList.includes(attributeName)) {\n if (uriAttributes.has(attributeName)) {\n return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));\n }\n\n return true;\n } // Check if a regular expression validates the attribute.\n\n\n return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));\n};\n\nconst DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n};\nfunction sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {\n if (!unsafeHtml.length) {\n return unsafeHtml;\n }\n\n if (sanitizeFunction && typeof sanitizeFunction === 'function') {\n return sanitizeFunction(unsafeHtml);\n }\n\n const domParser = new window.DOMParser();\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'));\n\n for (const element of elements) {\n const elementName = element.nodeName.toLowerCase();\n\n if (!Object.keys(allowList).includes(elementName)) {\n element.remove();\n continue;\n }\n\n const attributeList = [].concat(...element.attributes);\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || []);\n\n for (const attribute of attributeList) {\n if (!allowedAttribute(attribute, allowedAttributes)) {\n element.removeAttribute(attribute.nodeName);\n }\n }\n }\n\n return createdDocument.body.innerHTML;\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): util/template-factory.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$5 = 'TemplateFactory';\nconst Default$4 = {\n allowList: DefaultAllowlist,\n content: {},\n // { selector : text , selector2 : text2 , }\n extraClass: '',\n html: false,\n sanitize: true,\n sanitizeFn: null,\n template: '
'\n};\nconst DefaultType$4 = {\n allowList: 'object',\n content: 'object',\n extraClass: '(string|function)',\n html: 'boolean',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n template: 'string'\n};\nconst DefaultContentType = {\n entry: '(string|element|function|null)',\n selector: '(string|element)'\n};\n/**\n * Class definition\n */\n\nclass TemplateFactory extends Config {\n constructor(config) {\n super();\n this._config = this._getConfig(config);\n } // Getters\n\n\n static get Default() {\n return Default$4;\n }\n\n static get DefaultType() {\n return DefaultType$4;\n }\n\n static get NAME() {\n return NAME$5;\n } // Public\n\n\n getContent() {\n return Object.values(this._config.content).map(config => this._resolvePossibleFunction(config)).filter(Boolean);\n }\n\n hasContent() {\n return this.getContent().length > 0;\n }\n\n changeContent(content) {\n this._checkContent(content);\n\n this._config.content = { ...this._config.content,\n ...content\n };\n return this;\n }\n\n toHtml() {\n const templateWrapper = document.createElement('div');\n templateWrapper.innerHTML = this._maybeSanitize(this._config.template);\n\n for (const [selector, text] of Object.entries(this._config.content)) {\n this._setContent(templateWrapper, text, selector);\n }\n\n const template = templateWrapper.children[0];\n\n const extraClass = this._resolvePossibleFunction(this._config.extraClass);\n\n if (extraClass) {\n template.classList.add(...extraClass.split(' '));\n }\n\n return template;\n } // Private\n\n\n _typeCheckConfig(config) {\n super._typeCheckConfig(config);\n\n this._checkContent(config.content);\n }\n\n _checkContent(arg) {\n for (const [selector, content] of Object.entries(arg)) {\n super._typeCheckConfig({\n selector,\n entry: content\n }, DefaultContentType);\n }\n }\n\n _setContent(template, content, selector) {\n const templateElement = SelectorEngine.findOne(selector, template);\n\n if (!templateElement) {\n return;\n }\n\n content = this._resolvePossibleFunction(content);\n\n if (!content) {\n templateElement.remove();\n return;\n }\n\n if (isElement(content)) {\n this._putElementInTemplate(getElement(content), templateElement);\n\n return;\n }\n\n if (this._config.html) {\n templateElement.innerHTML = this._maybeSanitize(content);\n return;\n }\n\n templateElement.textContent = content;\n }\n\n _maybeSanitize(arg) {\n return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg(this) : arg;\n }\n\n _putElementInTemplate(element, templateElement) {\n if (this._config.html) {\n templateElement.innerHTML = '';\n templateElement.append(element);\n return;\n }\n\n templateElement.textContent = element.textContent;\n }\n\n}\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$4 = 'tooltip';\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);\nconst CLASS_NAME_FADE$2 = 'fade';\nconst CLASS_NAME_MODAL = 'modal';\nconst CLASS_NAME_SHOW$2 = 'show';\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner';\nconst SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`;\nconst EVENT_MODAL_HIDE = 'hide.bs.modal';\nconst TRIGGER_HOVER = 'hover';\nconst TRIGGER_FOCUS = 'focus';\nconst TRIGGER_CLICK = 'click';\nconst TRIGGER_MANUAL = 'manual';\nconst EVENT_HIDE$2 = 'hide';\nconst EVENT_HIDDEN$2 = 'hidden';\nconst EVENT_SHOW$2 = 'show';\nconst EVENT_SHOWN$2 = 'shown';\nconst EVENT_INSERTED = 'inserted';\nconst EVENT_CLICK$1 = 'click';\nconst EVENT_FOCUSIN$1 = 'focusin';\nconst EVENT_FOCUSOUT$1 = 'focusout';\nconst EVENT_MOUSEENTER = 'mouseenter';\nconst EVENT_MOUSELEAVE = 'mouseleave';\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n};\nconst Default$3 = {\n allowList: DefaultAllowlist,\n animation: true,\n boundary: 'clippingParents',\n container: false,\n customClass: '',\n delay: 0,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n html: false,\n offset: [0, 0],\n placement: 'top',\n popperConfig: null,\n sanitize: true,\n sanitizeFn: null,\n selector: false,\n template: '
' + '
' + '
' + '
',\n title: '',\n trigger: 'hover focus'\n};\nconst DefaultType$3 = {\n allowList: 'object',\n animation: 'boolean',\n boundary: '(string|element)',\n container: '(string|element|boolean)',\n customClass: '(string|function)',\n delay: '(number|object)',\n fallbackPlacements: 'array',\n html: 'boolean',\n offset: '(array|string|function)',\n placement: '(string|function)',\n popperConfig: '(null|object|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n selector: '(string|boolean)',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string'\n};\n/**\n * Class definition\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)');\n }\n\n super(element, config); // Private\n\n this._isEnabled = true;\n this._timeout = 0;\n this._isHovered = null;\n this._activeTrigger = {};\n this._popper = null;\n this._templateFactory = null;\n this._newContent = null; // Protected\n\n this.tip = null;\n\n this._setListeners();\n\n if (!this._config.selector) {\n this._fixTitle();\n }\n } // Getters\n\n\n static get Default() {\n return Default$3;\n }\n\n static get DefaultType() {\n return DefaultType$3;\n }\n\n static get NAME() {\n return NAME$4;\n } // Public\n\n\n enable() {\n this._isEnabled = true;\n }\n\n disable() {\n this._isEnabled = false;\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled;\n }\n\n toggle() {\n if (!this._isEnabled) {\n return;\n }\n\n this._activeTrigger.click = !this._activeTrigger.click;\n\n if (this._isShown()) {\n this._leave();\n\n return;\n }\n\n this._enter();\n }\n\n dispose() {\n clearTimeout(this._timeout);\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n\n if (this._element.getAttribute('data-bs-original-title')) {\n this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'));\n }\n\n this._disposePopper();\n\n super.dispose();\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements');\n }\n\n if (!(this._isWithContent() && this._isEnabled)) {\n return;\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW$2));\n const shadowRoot = findShadowRoot(this._element);\n\n const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element);\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return;\n } // todo v6 remove this OR make it optional\n\n\n this._disposePopper();\n\n const tip = this._getTipElement();\n\n this._element.setAttribute('aria-describedby', tip.getAttribute('id'));\n\n const {\n container\n } = this._config;\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip);\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED));\n }\n\n this._popper = this._createPopper(tip);\n tip.classList.add(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop);\n }\n }\n\n const complete = () => {\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));\n\n if (this._isHovered === false) {\n this._leave();\n }\n\n this._isHovered = false;\n };\n\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n\n hide() {\n if (!this._isShown()) {\n return;\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE$2));\n\n if (hideEvent.defaultPrevented) {\n return;\n }\n\n const tip = this._getTipElement();\n\n tip.classList.remove(CLASS_NAME_SHOW$2); // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop);\n }\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false;\n this._activeTrigger[TRIGGER_FOCUS] = false;\n this._activeTrigger[TRIGGER_HOVER] = false;\n this._isHovered = null; // it is a trick to support manual triggering\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n if (!this._isHovered) {\n this._disposePopper();\n }\n\n this._element.removeAttribute('aria-describedby');\n\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN$2));\n };\n\n this._queueCallback(complete, this.tip, this._isAnimated());\n }\n\n update() {\n if (this._popper) {\n this._popper.update();\n }\n } // Protected\n\n\n _isWithContent() {\n return Boolean(this._getTitle());\n }\n\n _getTipElement() {\n if (!this.tip) {\n this.tip = this._createTipElement(this._newContent || this._getContentForTemplate());\n }\n\n return this.tip;\n }\n\n _createTipElement(content) {\n const tip = this._getTemplateFactory(content).toHtml(); // todo: remove this check on v6\n\n\n if (!tip) {\n return null;\n }\n\n tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2); // todo: on v6 the following can be achieved with CSS only\n\n tip.classList.add(`bs-${this.constructor.NAME}-auto`);\n const tipId = getUID(this.constructor.NAME).toString();\n tip.setAttribute('id', tipId);\n\n if (this._isAnimated()) {\n tip.classList.add(CLASS_NAME_FADE$2);\n }\n\n return tip;\n }\n\n setContent(content) {\n this._newContent = content;\n\n if (this._isShown()) {\n this._disposePopper();\n\n this.show();\n }\n }\n\n _getTemplateFactory(content) {\n if (this._templateFactory) {\n this._templateFactory.changeContent(content);\n } else {\n this._templateFactory = new TemplateFactory({ ...this._config,\n // the `content` var has to be after `this._config`\n // to override config.content in case of popover\n content,\n extraClass: this._resolvePossibleFunction(this._config.customClass)\n });\n }\n\n return this._templateFactory;\n }\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n };\n }\n\n _getTitle() {\n return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title');\n } // Private\n\n\n _initializeOnDelegatedTarget(event) {\n return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig());\n }\n\n _isAnimated() {\n return this._config.animation || this.tip && this.tip.classList.contains(CLASS_NAME_FADE$2);\n }\n\n _isShown() {\n return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW$2);\n }\n\n _createPopper(tip) {\n const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;\n const attachment = AttachmentMap[placement.toUpperCase()];\n return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment));\n }\n\n _getOffset() {\n const {\n offset\n } = this._config;\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10));\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element);\n }\n\n return offset;\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg.call(this._element) : arg;\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [{\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n }, {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }, {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n }, {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n }, {\n name: 'preSetPlacement',\n enabled: true,\n phase: 'beforeMain',\n fn: data => {\n // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n this._getTipElement().setAttribute('data-popper-placement', data.state.placement);\n }\n }]\n };\n return { ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n };\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ');\n\n for (const trigger of triggers) {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK$1), this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context.toggle();\n });\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN$1);\n const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT$1);\n EventHandler.on(this._element, eventIn, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;\n\n context._enter();\n });\n EventHandler.on(this._element, eventOut, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event);\n\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);\n\n context._leave();\n });\n }\n }\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide();\n }\n };\n\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler);\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title');\n\n if (!title) {\n return;\n }\n\n if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {\n this._element.setAttribute('aria-label', title);\n }\n\n this._element.setAttribute('data-bs-original-title', title); // DO NOT USE IT. Is only for backwards compatibility\n\n\n this._element.removeAttribute('title');\n }\n\n _enter() {\n if (this._isShown() || this._isHovered) {\n this._isHovered = true;\n return;\n }\n\n this._isHovered = true;\n\n this._setTimeout(() => {\n if (this._isHovered) {\n this.show();\n }\n }, this._config.delay.show);\n }\n\n _leave() {\n if (this._isWithActiveTrigger()) {\n return;\n }\n\n this._isHovered = false;\n\n this._setTimeout(() => {\n if (!this._isHovered) {\n this.hide();\n }\n }, this._config.delay.hide);\n }\n\n _setTimeout(handler, timeout) {\n clearTimeout(this._timeout);\n this._timeout = setTimeout(handler, timeout);\n }\n\n _isWithActiveTrigger() {\n return Object.values(this._activeTrigger).includes(true);\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element);\n\n for (const dataAttribute of Object.keys(dataAttributes)) {\n if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n delete dataAttributes[dataAttribute];\n }\n }\n\n config = { ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n };\n config = this._mergeConfigObj(config);\n config = this._configAfterMerge(config);\n\n this._typeCheckConfig(config);\n\n return config;\n }\n\n _configAfterMerge(config) {\n config.container = config.container === false ? document.body : getElement(config.container);\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n };\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString();\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString();\n }\n\n return config;\n }\n\n _getDelegateConfig() {\n const config = {};\n\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key];\n }\n }\n\n config.selector = false;\n config.trigger = 'manual'; // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n\n return config;\n }\n\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy();\n\n this._popper = null;\n }\n\n if (this.tip) {\n this.tip.remove();\n this.tip = null;\n }\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n}\n/**\n * jQuery\n */\n\n\ndefineJQueryPlugin(Tooltip);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$3 = 'popover';\nconst SELECTOR_TITLE = '.popover-header';\nconst SELECTOR_CONTENT = '.popover-body';\nconst Default$2 = { ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '
' + '
' + '

' + '
' + '
',\n trigger: 'click'\n};\nconst DefaultType$2 = { ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n};\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default$2;\n }\n\n static get DefaultType() {\n return DefaultType$2;\n }\n\n static get NAME() {\n return NAME$3;\n } // Overrides\n\n\n _isWithContent() {\n return this._getTitle() || this._getContent();\n } // Private\n\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n };\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content);\n } // Static\n\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config);\n\n if (typeof config !== 'string') {\n return;\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`);\n }\n\n data[config]();\n });\n }\n\n}\n/**\n * jQuery\n */\n\n\ndefineJQueryPlugin(Popover);\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.3): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n/**\n * Constants\n */\n\nconst NAME$2 = 'scrollspy';\nconst DATA_KEY$2 = 'bs.scrollspy';\nconst EVENT_KEY$2 = `.${DATA_KEY$2}`;\nconst DATA_API_KEY = '.data-api';\nconst EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;\nconst EVENT_CLICK = `click${EVENT_KEY$2}`;\nconst EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$2}${DATA_API_KEY}`;\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';\nconst CLASS_NAME_ACTIVE$1 = 'active';\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]';\nconst SELECTOR_TARGET_LINKS = '[href]';\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';\nconst SELECTOR_NAV_LINKS = '.nav-link';\nconst SELECTOR_NAV_ITEMS = '.nav-item';\nconst SELECTOR_LIST_ITEMS = '.list-group-item';\nconst SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`;\nconst SELECTOR_DROPDOWN = '.dropdown';\nconst SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';\nconst Default$1 = {\n offset: null,\n // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: '0px 0px -25%',\n smoothScroll: false,\n target: null,\n threshold: [0.1, 0.5, 1]\n};\nconst DefaultType$1 = {\n offset: '(number|null)',\n // TODO v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: 'string',\n smoothScroll: 'boolean',\n target: 'element',\n threshold: 'array'\n};\n/**\n * Class definition\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element, config); // this._element is the observablesContainer and config.target the menu links wrapper\n\n this._targetLinks = new Map();\n this._observableSections = new Map();\n this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element;\n this._activeTarget = null;\n this._observer = null;\n this._previousScrollData = {\n visibleEntryTop: 0,\n parentScrollTop: 0\n };\n this.refresh(); // initialize\n } // Getters\n\n\n static get Default() {\n return Default$1;\n }\n\n static get DefaultType() {\n return DefaultType$1;\n }\n\n static get NAME() {\n return NAME$2;\n } // Public\n\n\n refresh() {\n this._initializeTargetsAndObservables();\n\n this._maybeEnableSmoothScroll();\n\n if (this._observer) {\n this._observer.disconnect();\n } else {\n this._observer = this._getNewObserver();\n }\n\n for (const section of this._observableSections.values()) {\n this._observer.observe(section);\n }\n }\n\n dispose() {\n this._observer.disconnect();\n\n super.dispose();\n } // Private\n\n\n _configAfterMerge(config) {\n // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n config.target = getElement(config.target) || document.body; // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n\n config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;\n\n if (typeof config.threshold === 'string') {\n config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));\n }\n\n return config;\n }\n\n _maybeEnableSmoothScroll() {\n if (!this._config.smoothScroll) {\n return;\n } // unregister any previous listeners\n\n\n EventHandler.off(this._config.target, EVENT_CLICK);\n EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n const observableSection = this._observableSections.get(event.target.hash);\n\n if (observableSection) {\n event.preventDefault();\n const root = this._rootElement || window;\n const height = observableSection.offsetTop - this._element.offsetTop;\n\n if (root.scrollTo) {\n root.scrollTo({\n top: height,\n behavior: 'smooth'\n });\n return;\n } // Chrome 60 doesn't support `scrollTo`\n\n\n root.scrollTop = height;\n }\n });\n }\n\n _getNewObserver() {\n const options = {\n root: this._rootElement,\n threshold: this._config.threshold,\n rootMargin: this._config.rootMargin\n };\n return new IntersectionObserver(entries => this._observerCallback(entries), options);\n } // The logic of selection\n\n\n _observerCallback(entries) {\n const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`);\n\n const activate = entry => {\n this._previousScrollData.visibleEntryTop = entry.target.offsetTop;\n\n this._process(targetElement(entry));\n };\n\n const parentScrollTop = (this._rootElement || document.documentElement).scrollTop;\n const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop;\n this._previousScrollData.parentScrollTop = parentScrollTop;\n\n for (const entry of entries) {\n if (!entry.isIntersecting) {\n this._activeTarget = null;\n\n this._clearActiveClass(targetElement(entry));\n\n continue;\n }\n\n const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop; // if we are scrolling down, pick the bigger offsetTop\n\n if (userScrollsDown && entryIsLowerThanPrevious) {\n activate(entry); // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n\n if (!parentScrollTop) {\n return;\n }\n\n continue;\n } // if we are scrolling up, pick the smallest offsetTop\n\n\n if (!userScrollsDown && !entryIsLowerThanPrevious) {\n activate(entry);\n }\n }\n }\n\n _initializeTargetsAndObservables() {\n this._targetLinks = new Map();\n this._observableSections = new Map();\n const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target);\n\n for (const anchor of targetLinks) {\n // ensure that the anchor has an id and is not disabled\n if (!anchor.hash || isDisabled(anchor)) {\n continue;\n }\n\n const observableSection = SelectorEngine.findOne(anchor.hash, this._element); // ensure that the observableSection exists & is visible\n\n if (isVisible(observableSection)) {\n this._targetLinks.set(anchor.hash, anchor);\n\n this._observableSections.set(anchor.hash, observableSection);\n }\n }\n }\n\n _process(target) {\n if (this._activeTarget === target) {\n return;\n }\n\n this._clearActiveClass(this._config.target);\n\n this._activeTarget = target;\n target.classList.add(CLASS_NAME_ACTIVE$1);\n\n this._activateParents(target);\n\n EventHandler.trigger(this._element, EVENT_ACTIVATE, {\n relatedTarget: target\n });\n }\n\n _activateParents(target) {\n // Activate dropdown parents\n if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, target.closest(SELECTOR_DROPDOWN)).classList.add(CLASS_NAME_ACTIVE$1);\n return;\n }\n\n for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n // Set triggered links parents as active\n // With both
    and