Skip to content

Commit

Permalink
Bump version 0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
iboyd-ansys committed Apr 3, 2023
1 parent 0d5e4cb commit 1d08dbe
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 28 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions doc/source/examples/00-systemcoupling/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ interrogation of the data model, and running the System Coupling solver to perfo

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example is a version of the *Oscillating Plate* case that is often used as a tutorial for ...">
<div class="sphx-glr-thumbcontainer" tooltip="This example is a version of the Oscillating Plate case that is often used as a tutorial for Sy...">

.. only:: html

.. image:: /examples/00-systemcoupling/images/thumb/sphx_glr_oscillating_plate_thumb.png
:alt: Oscillating plate
:alt:

:ref:`sphx_glr_examples_00-systemcoupling_oscillating_plate.py`

Expand All @@ -39,7 +39,7 @@ interrogation of the data model, and running the System Coupling solver to perfo
.. only:: html

.. image:: /examples/00-systemcoupling/images/thumb/sphx_glr_parametric_sweep_vel_thumb.png
:alt: Parametric sweep
:alt:

:ref:`sphx_glr_examples_00-systemcoupling_parametric_sweep_vel.py`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
},
"outputs": [],
"source": [
"def set_inlet_velocity(working_dir, inlet_velocity):\n with pyfluent.launch_fluent(precision=\"double\", processor_count=2) as session:\n case_file = os.path.join(working_dir, \"Fluent\", \"case.cas.h5\")\n session.file.read(file_type=\"case\", file_name=case_file)\n session.setup.boundary_conditions.velocity_inlet[\n \"wall_inlet\"\n ].vmag.value = inlet_velocity\n session.tui.file.write_case(case_file)\n\n print(f\"Inlet velocity is set to {inlet_velocity}\")"
"def set_inlet_velocity(working_dir, inlet_velocity):\n with pyfluent.launch_fluent(precision=\"double\", processor_count=2) as session:\n case_file = os.path.join(working_dir, \"Fluent\", \"case.cas.h5\")\n session.file.read(file_type=\"case\", file_name=case_file)\n session.setup.boundary_conditions.velocity_inlet[\n \"wall_inlet\"\n ].vmag.value = inlet_velocity\n session.tui.file.write_case(case_file, \"yes\")\n\n print(f\"Inlet velocity is set to {inlet_velocity}\")"
]
},
{
Expand Down Expand Up @@ -105,7 +105,7 @@
},
"outputs": [],
"source": [
"def extract_max_displacement(working_dir):\n print(\"Extracting max displacement value\")\n model = pydpf.Model(os.path.join(working_dir, \"Mapdl\", \"file.rst\"))\n displacements = model.results.displacement()\n fields = displacements.outputs.fields_container()\n value = max([v[0] for v in fields[0].data])\n print(\"Max displacement value = \" + str(value))\n return value"
"def extract_max_displacement(working_dir):\n print(\"Extracting max displacement value\")\n model = pydpf.Model(os.path.join(working_dir, \"Mapdl\", \"file.rst\"))\n displacements = model.results.displacement()\n fields = displacements.outputs.fields_container()\n value = max([v[0] for v in fields[0].data])\n print(f\"Max displacement value = {value}\")\n return value"
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions doc/source/examples/00-systemcoupling/parametric_sweep_vel.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def set_inlet_velocity(working_dir, inlet_velocity):
session.setup.boundary_conditions.velocity_inlet[
"wall_inlet"
].vmag.value = inlet_velocity
session.tui.file.write_case(case_file)
session.tui.file.write_case(case_file, "yes")

print(f"Inlet velocity is set to {inlet_velocity}")

Expand Down Expand Up @@ -171,7 +171,7 @@ def extract_max_displacement(working_dir):
displacements = model.results.displacement()
fields = displacements.outputs.fields_container()
value = max([v[0] for v in fields[0].data])
print("Max displacement value = " + str(value))
print(f"Max displacement value = {value}")
return value

# %%
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6bffdebfc8d1a7ea05e77e7d5d51f6d8
7aead5b45c831406bad93837de8c63f7
27 changes: 18 additions & 9 deletions doc/source/examples/00-systemcoupling/parametric_sweep_vel.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
.. note::
:class: sphx-glr-download-link-note

Click :ref:`here <sphx_glr_download_examples_00-systemcoupling_parametric_sweep_vel.py>`
:ref:`Go to the end <sphx_glr_download_examples_00-systemcoupling_parametric_sweep_vel.py>`
to download the full example code

.. rst-class:: sphx-glr-example-title
Expand Down Expand Up @@ -158,7 +158,7 @@ the ``solve_coupled_analysis`` command in a sequence of analyses.
session.setup.boundary_conditions.velocity_inlet[
"wall_inlet"
].vmag.value = inlet_velocity
session.tui.file.write_case(case_file)
session.tui.file.write_case(case_file, "yes")
print(f"Inlet velocity is set to {inlet_velocity}")
Expand Down Expand Up @@ -244,7 +244,7 @@ maximum displacement value in the solution.
displacements = model.results.displacement()
fields = displacements.outputs.fields_container()
value = max([v[0] for v in fields[0].data])
print("Max displacement value = " + str(value))
print(f"Max displacement value = {value}")
return value
Expand Down Expand Up @@ -400,44 +400,51 @@ Finally, call the ``plot()`` function to generate a plot from the arrays.
symmetry2
symmetry1
Done.
Writing to MILIDBOYD1:"C:\Users\idboyd\AppData\Local\ansys_systemcoupling_core\ansys_systemcoupling_core\examples\Fluent\case.cas.h5" in NODE0 mode and compression level 1 ...
58065 cells, 1 zone ...
187138 faces, 8 zones ...
71280 nodes, 1 zone ...
Done.
Done.
Inlet velocity is set to 5.0
Setting up the coupled analysis.
Solving the coupled analysis. This may take a while....
...done.
Extracting max displacement value
Max displacement value = 0.7212533247210161
Max displacement value = 0.052365485950746894
Inlet velocity is set to 10.0
Setting up the coupled analysis.
Solving the coupled analysis. This may take a while....
...done.
Extracting max displacement value
Max displacement value = 0.7212533247210161
Max displacement value = 0.19232826989790763
Inlet velocity is set to 15.0
Setting up the coupled analysis.
Solving the coupled analysis. This may take a while....
...done.
Extracting max displacement value
Max displacement value = 0.7212533248804374
Max displacement value = 0.37276751732600016
Inlet velocity is set to 20.0
Setting up the coupled analysis.
Solving the coupled analysis. This may take a while....
...done.
Extracting max displacement value
Max displacement value = 0.7212533252263177
Max displacement value = 0.5624418883785633
Inlet velocity is set to 25.0
Setting up the coupled analysis.
Solving the coupled analysis. This may take a while....
...done.
Extracting max displacement value
Max displacement value = 0.7212533244801425
Max displacement value = 0.7212533237739663
.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 13 minutes 51.498 seconds)
**Total running time of the script:** ( 14 minutes 59.902 seconds)


.. _sphx_glr_download_examples_00-systemcoupling_parametric_sweep_vel.py:
Expand All @@ -447,6 +454,8 @@ Finally, call the ``plot()`` function to generate a plot from the arrays.
.. container:: sphx-glr-footer sphx-glr-footer-example




.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download Python source code: parametric_sweep_vel.py <parametric_sweep_vel.py>`
Expand Down
Binary file not shown.
7 changes: 4 additions & 3 deletions doc/source/examples/00-systemcoupling/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@

.. _sphx_glr_examples_00-systemcoupling_sg_execution_times:


Computation times
=================
**16:14.309** total execution time for **examples_00-systemcoupling** files:
**14:59.902** total execution time for **examples_00-systemcoupling** files:

+--------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_00-systemcoupling_parametric_sweep_vel.py` (``parametric_sweep_vel.py``) | 13:51.498 | 0.0 MB |
| :ref:`sphx_glr_examples_00-systemcoupling_parametric_sweep_vel.py` (``parametric_sweep_vel.py``) | 14:59.902 | 0.0 MB |
+--------------------------------------------------------------------------------------------------+-----------+--------+
| :ref:`sphx_glr_examples_00-systemcoupling_oscillating_plate.py` (``oscillating_plate.py``) | 02:22.811 | 0.0 MB |
| :ref:`sphx_glr_examples_00-systemcoupling_oscillating_plate.py` (``oscillating_plate.py``) | 00:00.000 | 0.0 MB |
+--------------------------------------------------------------------------------------------------+-----------+--------+
7 changes: 4 additions & 3 deletions doc/source/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ interrogation of the data model, and running the System Coupling solver to perfo

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="This example is a version of the *Oscillating Plate* case that is often used as a tutorial for ...">
<div class="sphx-glr-thumbcontainer" tooltip="This example is a version of the Oscillating Plate case that is often used as a tutorial for Sy...">

.. only:: html

.. image:: /examples/00-systemcoupling/images/thumb/sphx_glr_oscillating_plate_thumb.png
:alt: Oscillating plate
:alt:

:ref:`sphx_glr_examples_00-systemcoupling_oscillating_plate.py`

Expand All @@ -60,7 +60,7 @@ interrogation of the data model, and running the System Coupling solver to perfo
.. only:: html

.. image:: /examples/00-systemcoupling/images/thumb/sphx_glr_parametric_sweep_vel_thumb.png
:alt: Parametric sweep
:alt:

:ref:`sphx_glr_examples_00-systemcoupling_parametric_sweep_vel.py`

Expand All @@ -79,6 +79,7 @@ interrogation of the data model, and running the System Coupling solver to perfo
:hidden:
:includehidden:


/examples/00-systemcoupling/index.rst


Expand Down
4 changes: 2 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ System Coupling is software for solving multiphysics problems by connecting inde
solvers and coordinating the exchange of the solution data. This enables accurate capturing of the
complex interactions between physical models, typically simulated in separate solvers.

System Coupling connects to several existing Ansys physics solvers, including Ansys CFX,
System Coupling connects to several existing Ansys physics solvers, including Ansys Fluent, Ansys CFX,
Ansys Forte, Ansys MAPDL, and Ansys Electronics Desktop. Examples of problems that can be solved
by System Coupling include Fluid-Structure Interaction (FSI), Conjugate Heat Transfer (CHT), and Joule
Heating.
Expand Down Expand Up @@ -61,7 +61,7 @@ local copy of System Coupling.
.. TODO Add the appropriate link when available.
For more information about System Coupling,
visit the Ansys System Coupling page on the Ansys website.
visit the `Ansys System Coupling page <https://www.ansys.com/products/system-coupling>`_ on the Ansys website.

Project index
==============
Expand Down
4 changes: 2 additions & 2 deletions examples/00-systemcoupling/parametric_sweep_vel.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def set_inlet_velocity(working_dir, inlet_velocity):
session.setup.boundary_conditions.velocity_inlet[
"wall_inlet"
].vmag.value = inlet_velocity
session.tui.file.write_case(case_file)
session.tui.file.write_case(case_file, "yes")

print(f"Inlet velocity is set to {inlet_velocity}")

Expand Down Expand Up @@ -171,7 +171,7 @@ def extract_max_displacement(working_dir):
displacements = model.results.displacement()
fields = displacements.outputs.fields_container()
value = max([v[0] for v in fields[0].data])
print("Max displacement value = " + str(value))
print(f"Max displacement value = {value}")
return value

# %%
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
[project]
# Check https://flit.readthedocs.io/en/latest/pyproject_toml.html for all available sections
name = "ansys-systemcoupling-core"
version = "0.1.2"
version = "0.1.3"
description = "A Python wrapper for Ansys System Coupling."
readme = "README.rst"
requires-python = ">=3.7"
Expand Down

0 comments on commit 1d08dbe

Please sign in to comment.