Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/.vale.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ WordTemplate = \b(?:%s)\b
Packages = Google

# Define the Ansys vocabulary
Vocab = ANSYS, rp, config
Vocab = ANSYS

[*.{md,rst}]

Expand Down
33 changes: 20 additions & 13 deletions doc/source/api/solver/fielddata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
Field data
==========

You can use field data objects to access Fluent surface, scalar, vector, and pathlines data.
You can use field data objects to access Fluent surface, scalar, vector, and
pathlines data.

Accessing field data objects
----------------------------

In order to access field data, launch the fluent solver, and make field
data available (for example, by reading case and data files):
In order to access field data, launch the fluent solver, and make field data
available (for example, by reading case and data files):

.. code-block:: python

Expand Down Expand Up @@ -190,12 +191,13 @@ The surface ID is the same one that is passed in the request.

Field name
----------
A request returns multiple fields. The number of fields depends on the request type.
A request returns multiple fields. The number of fields depends on the request
type.

Surface request
~~~~~~~~~~~~~~~
The response to a surface request contains any of the following fields, depending on the
request arguments:
The response to a surface request contains any of the following fields,
depending on the request arguments:

- ``faces``, which contain face connectivity
- ``vertices``, which contain node coordinates
Expand All @@ -205,14 +207,15 @@ request arguments:

Scalar field request
~~~~~~~~~~~~~~~~~~~~
The response to a scalar field request contains a single field with the same name as the
scalar field name passed in the request.
The response to a scalar field request contains a single field with the same
name as the scalar field name passed in the request.

Vector field request
~~~~~~~~~~~~~~~~~~~~
The response to a vector field request contains two fields:

- ``vector field``, with the same name as the vector field name that is passed in the request
- ``vector field``, with the same name as the vector field name that is passed
in the request
- ``vector-scale``, a float value indicating the vector scale.

Pathlines field request
Expand All @@ -222,14 +225,18 @@ The response to a pathlines field request contains the following fields:
- ``pathlines-count``, which contains pathlines count.
- ``lines``, which contain pathlines connectivity.
- ``vertices``, which contain node coordinates.
- ``field name``, which contains pathlines field. field name is the same name as the scalar field name passed in the request.
- ``field name``, which contains pathlines field. field name is the same name as
the scalar field name passed in the request.
- ``particle-time``, which contains particle time, if requested.
- ``additional field name``, which contains additional field, if requested. additional field name is the same name as the additional field name passed in the request.
- ``additional field name``, which contains additional field, if requested.
additional field name is the same name as the additional field name passed in
the request.

Allowed values
--------------
Additionally there is an allowed_values provided on field name,
surface name and ids to guide the users.
Additionally there is an ``allowed_values`` method provided on all of
``field_name``, ``surface_name`` and ``surface_ids`` which tells you what object
names are accessible.

Some sample use cases are demonstrated below:

Expand Down
4 changes: 2 additions & 2 deletions doc/source/api/solver/reduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ Compute the force acting on the locations specified (should be walls) as a vecto

>>> reduction.force(locations)

Pressure Force
Pressure force
~~~~~~~~~~~~~~
Compute the pressure force acting on the locations specified (should be walls) as a vector.

.. code-block:: python

>>> reduction.pressure_force(locations)

Viscous Force
Viscous force
~~~~~~~~~~~~~
Compute the viscous force acting on the locations specified (should be walls) as a vector.

Expand Down
160 changes: 89 additions & 71 deletions doc/source/getting_started/faqs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,18 @@ separately. For more information, see :ref:`faqs_install`, which appears later o
PyFluent has no GUI (graphical user interface). You interact with PyFluent through the Python
environment of your choice.

How does PyFluent compare to UDFs?
----------------------------------
PyFluent is conceptually aligned with Fluent TUI console commands (and journaling) rather than with
UDFs (user-defined functions). In other words, PyFluent is used for automation rather than
modifying the solver behavior.
How does PyFluent compare to Fluent user defined functions?
-----------------------------------------------------------
PyFluent is conceptually aligned with Fluent TUI console commands and
journaling rather than with user defined functions (UDFs). In other words,
PyFluent is primarily used for automation rather than modifying the solver
behavior.

UDFs continue to be written in C and remain important elements of
Fluent simulations.
UDFs continue to be written in C and remain important elements of Fluent
simulations.

While you cannot write UDFs in Python, you can execute PyFluent commands to compile and load UDFs,
similar to how you use TUI commands.
While you cannot write UDFs in Python, you can execute PyFluent commands to
compile and load UDFs, similar to how you use TUI commands.

Who should use PyFluent?
------------------------
Expand Down Expand Up @@ -78,23 +79,23 @@ What can you do with PyFluent?
You can use PyFluent to do tasks such as these:

- Integrate Fluent as a solver seamlessly in your in-house design tools.
- Customize postprocessing, perhaps by using Python's vast external
library to extend postprocessing capabilities or by automatically generating
a PowerPoint presentation to show simulation results.
- Customize postprocessing, perhaps by using Python's vast external library to
extend postprocessing capabilities or by automatically generating a PowerPoint
presentation to show simulation results.
- Use a web app to access jobs running on a cluster, monitor convergence, and
generate graphs.
- Leverage ML and AI, especially for models that are solved quickly but can be
improved as additional knowledge is acquired and applied.
- Use Python APIs to couple different Ansys products.
- Leverage Python machine learning and artificial intelligence modules,
especially for models that are solved quickly but can be improved as
additional knowledge is acquired and applied.
- Use Python to couple different Ansys products together.

.. _faqs_install:

How do you install PyFluent?
----------------------------
While :ref:`installation` provides basic information for quickly
installing and launching the ``ansys-fluent-core`` package, these
steps explain how to install all PyFluent packages in a Python *virtual
environment*:
While :ref:`installation` provides basic information for quickly installing and
launching the ``ansys-fluent-core`` package, these steps explain how to install
all PyFluent packages in a Python *virtual environment*:

#. Install Python if it is not already installed.

Expand All @@ -112,46 +113,56 @@ environment*:

#. In a command window, use this code to set up and activate a local Python
virtual environment::

python -m venv pyenv # Set up a local virtual environment
pyenv\Scripts\activate # Activate the virtual environment on Windows
source pyenv/bin/activate.csh # Activate the virtual environment on Linux (csh)
. pyenv/bin/activate # Activate the virtual environment on Linux (bash)

.. code:: bash

.. vale off
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgepiloto I had to deactivate vale for this code block because it was complaining about not knowing the words 'venv' and 'csh'. Do you have any idea why I would have needed to deactivate it for a code block? I would assume Vale is ignoring code blocks.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the issue might be on the indentation of the code-snippet... it should be two spaces in. Hopefully that should solve the issue

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

   .. code:: bash

      python -m venv venv   # Set up a local virtual environment
      venv\Scripts\activate   # Activate the virtual environment on Windows
      source venv/bin/activate.csh   # Activate the virtual environment on Linux (csh)
      . venv/bin/activate   # Activate the virtual environment on Linux (bash)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it's weird in any case...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I got late to this ping. Glad to see everything got fixed.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks guys, let me try that.


python -m venv venv # Set up a local virtual environment
venv\Scripts\activate # Activate the virtual environment on Windows
source venv/bin/activate.csh # Activate the virtual environment on Linux (csh)
. venv/bin/activate # Activate the virtual environment on Linux (bash)

.. vale on

#. In the same command window, use ``pip``, the package installer for Python, to
install the PyFluent packages::

python -m pip install ansys-fluent-core # Access Fluent’s core capabilities (mesh, solve, postprocess)
python -m pip install ansys-fluent-parametric # Access Fluent’s parametric capabilities (optional)
python -m pip install ansys-fluent-visualization # Access Fluents postprocessing capabilities, which work with PyVista and Matplotlib (optional)
.. code:: bash

python -m pip install ansys-fluent-core # Use Fluent’s core capabilities (mesh, solve, postprocess)
python -m pip install ansys-fluent-parametric # Use Fluent’s parametric capabilities (optional)
python -m pip install ansys-fluent-visualization # Use Fluent's postprocessing capabilities with pyvista and matplotlib (optional)


Which version of Python should you use?
---------------------------------------
PyFluent supports Python 3.7 through Python 3.10 on Windows and Linux. Python 3.7 is shipped
with Ansys 2022 R2 and later. For example, in a 2022 R2 installation, the executable file for
installing Python 3.7 is likely in
PyFluent supports Python 3.7 through Python 3.10 on Windows and Linux. Python
3.7 is shipped with Ansys 2022 R2 and later. For example, in a 2022 R2 Windows
installation, the executable file Python 3.7 is typically located at:
``C:\Program Files\ANSYS Inc\v222\commonfiles\CPython\3_7\winx64\Release\python.exe``.

Alternatively, you can download any compatible version of Python directly from the
`Downloads page <https://www.python.org/downloads/>`_ of the Python web site.
Alternatively, you can download any compatible version of Python directly from
the `Downloads page <https://www.python.org/downloads/>`_ of the Python web
site.

In either case, run the Python executable file as an administrator, selecting the
**Add Python 3.9 to PATH** checkbox on the first wizard page before proceeding with
the installation. On the last wizard page, which indicates that Python is installed
successfully, follow the instructions for disabling the path length limit if you have
long file paths.
In either case, run the Python executable file as an administrator, selecting
the **Add Python 3.9 to PATH** checkbox on the first wizard page before
proceeding with the installation. On the last wizard page, which indicates that
Python is installed successfully, follow the instructions for disabling the path
length limit if you have long file paths.

Where do you find source code and documentation?
------------------------------------------------
All PyAnsys public libraries are available from the `PyAnsys GitHub account <https://github.com/pyansys>`_.
The **Repositories** page displays the number of repositories, which are searchable by name.
For example, to find all PyFluent libraries, type ``pyfluent`` in the search option.
All PyAnsys public libraries are available from the `PyAnsys GitHub account
<https://github.com/pyansys>`_. The **Repositories** page displays the number of
repositories, which are searchable by name. For example, to find all PyFluent
libraries, type ``pyfluent`` in the search option.

The ``README.md`` file for the PyAnsys Github account lists the public PyAnsys libraries.
The links in this list are to the documentation for the respective libraries. In addition to
general usage information, the documentation for a library includes many practical examples.
The ``README.md`` file for the PyAnsys GitHub account lists the public PyAnsys
libraries. The links in this list are to the documentation for the respective
libraries. In addition to general usage information, the documentation for a
library includes many practical examples.

How do you launch Fluent using PyFluent?
----------------------------------------
Expand All @@ -163,47 +174,52 @@ To launch Fluent with PyFluent commands, use this code:
session=pyfluent.launch_fluent()


This example shows you how to launch a double precision Fluent session with two
processars and the Fluent GUI:
This example shows you how to launch a double precision Fluent session using two
processors and activate the Fluent user interface:

.. code:: python

session=pyfluent.launch_fluent(precision="double", processor_count=2, show_gui=True)


For additional launch examples, see :ref:`ref_user_guide_launch`. For descriptions of all parameters,
see the :func:`launch_fluent() <ansys.fluent.core.launcher.launcher.launch_fluent>` method.
For additional launch examples, see :ref:`ref_user_guide_launch`. For
descriptions of all parameters, see the :func:`launch_fluent()
<ansys.fluent.core.launcher.launcher.launch_fluent>` method.

.. _faqs_fluentloc:

How does PyFluent infer the location to launch Fluent?
------------------------------------------------------
PyFluent infers the Fluent location based on the following information, in increasing order of precedence:
PyFluent infers the Fluent location based on the following information, in
increasing order of precedence:


#. ``AWP_ROOT<ver>`` environment variable, which is configured on Windows system
when Fluent is installed, where ``<ver>`` is the Fluent release number such as
``231`` for release 2023 R1. PyFluent automatically uses this environment
when Fluent is installed, where ``<ver>`` is the Fluent release number such
as ``231`` for release 2023 R1. PyFluent automatically uses this environment
variable to locate the latest Fluent installation. On Linux systems configure
``AWP_ROOT<ver>`` to point to the absolute path of an Ansys installation such as
``/apps/ansys_inc/v231``.
``AWP_ROOT<ver>`` to point to the absolute path of an Ansys installation such
as ``/apps/ansys_inc/v231``.

#. Value of ``product_version`` parameter passed to :func:`launch_fluent() <ansys.fluent.core.launch_fluent>`.
#. Value of ``product_version`` parameter passed to :func:`launch_fluent()
<ansys.fluent.core.launch_fluent>`.

#. ``PYFLUENT_FLUENT_ROOT`` environment variable, set this to ``<install location>/<ver>/fluent`` directory.
#. ``PYFLUENT_FLUENT_ROOT`` environment variable, set this to ``<install
location>/<ver>/fluent`` directory.


How do you learn how to use PyFluent?
-------------------------------------
Depending on how you prefer to learn, you can use any or all of these methods
to learn how to use PyFluent:

- Review the examples in the documentation, working first through those provided in
the :ref:_ref_example_gallery in this guide and then through those provided in the
**Examples** sections in the `PyFluent-Parametric <https://fluentparametric.docs.pyansys.com/>`_ and
`Pyfluent-Visusalization <https://fluentvisualization.docs.pyansys.com/>`_
guides.
- Record a journal of your actions in Fluent and review the corresponding Python script.
Depending on how you prefer to learn, you can use any or all of these methods to
learn how to use PyFluent:

- Review the examples in the documentation, working first through those provided
in the :ref:_ref_example_gallery in this guide and then through those provided
in the **Examples** sections in the `PyFluent-Parametric
<https://parametric.fluent.docs.pyansys.com/>`_ and `PyFluent-Visusalization
<https://visualization.fluent.docs.pyansys.com/>`_ guides.
- Record a journal of your actions in Fluent and review the corresponding Python
script.

.. note::
In Fluent 2022 R2, you can record a journal of your actions in Fluent
Expand Down Expand Up @@ -236,15 +252,17 @@ to learn how to use PyFluent:

How do you get help for PyFluent?
---------------------------------
Because PyFluent libraries are open source, support for issues, bugs, and feature
requests are available in their respective GitHub repositories.
Because PyFluent libraries are open source, support for issues, bugs, and
feature requests are available in their respective GitHub repositories.

- To log an issue for PyFluent, use the `PyFluent Issues page <https://github.com/pyansys/pyfluent/issues>`_.
- To start a discussion, use the `PyFluent Discussions page <https://github.com/pyansys/pyfluent/discussions>`_.

For discussions about developer tools, engineering simulation, and physics for Ansys software,
visit the `Ansys Developer portal <https://developer.ansys.com/>`_. The
`Ansys Discuss <https://discuss.ansys.com/>`_ page is where users, partners, students, and
Ansys subject matter experts connect, share ideas, discuss the latest technologies, and ask
questions to quickly obtain help and guidance. On this page, you can filter discussions by
category or apply the **Fluent** tag to view only Fluent-related discussions.
For discussions about developer tools, engineering simulation, and physics for
Ansys software, visit the `Ansys Developer portal
<https://developer.ansys.com/>`_. The `Ansys Discuss
<https://discuss.ansys.com/>`_ page is where users, partners, students, and
Ansys subject matter experts connect, share ideas, discuss the latest
technologies, and ask questions to quickly obtain help and guidance. On this
page, you can filter discussions by category or apply the **Fluent** tag to view
only Fluent-related discussions.
8 changes: 4 additions & 4 deletions doc/source/getting_started/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ environment variable:

Additional PyFluent packages
----------------------------
In addition to the ``ansys-fluent-core`` package, you can install and use the ``pyfluent-parameteric``
and ``pyfluent-visualization`` packages:
In addition to the ``ansys-fluent-core`` package, you can install and use the
``pyfluent-parameteric`` and ``pyfluent-visualization`` packages:

- The `pyfluent-parametric <https://fluentparametric.docs.pyansys.com/>`_ package provides
- The `PyFluent-Parametric <https://parametric.fluent.docs.pyansys.com/>`_ package provides
access to Fluent's parametric workflows.
- The `pyfluent-visualization <https://fluentvisualization.docs.pyansys.com/>`_ package
- The `PyFluent-Visualization <https://visualization.fluent.docs.pyansys.com/>`_ package
provides postprocessing and visualization capabilities that use `pyvista <https://docs.pyvista.org/>`_
and `matplotlib <https://matplotlib.org/>`_ packages.
Loading