Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fix doc getting started #642

Merged
merged 6 commits into from
Nov 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 5 additions & 0 deletions docs/source/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@

.bd-content .sd-card .sd-card-body, .bd-content .sd-card .sd-card-footer {
background-color: transparent;
}

.sd-card-text{
font-family: var(--pst-font-family-base);
font-size: var(--pst-font-size-base);
}
130 changes: 124 additions & 6 deletions docs/source/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,134 @@
Getting started
===============

DPF-Core is a Python gRPC client communicating with the ``Ans.Dpf.Grpc``
server. To use the native DPF server, you must have a local installation of
Ansys 2021 R1 or later. For more information on getting a licensed copy of Ansys,
visit the `Ansys website <https://www.ansys.com/>`_.
The Data Processing Framework (DPF) provides numerical simulation users and 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.).
PProfizi marked this conversation as resolved.
Show resolved Hide resolved
This **workflow-based** framework allows to perform complex preprocessing and postprocessing
operations of large amounts of simulation data.
PProfizi marked this conversation as resolved.
Show resolved Hide resolved

PyDPF-Core is a python client API communicating with **DPF Server** either remotely using gRPC
cbellot000 marked this conversation as resolved.
Show resolved Hide resolved
or directly in the same process.
cbellot000 marked this conversation as resolved.
Show resolved Hide resolved


Installing PyDPF-Core Client
----------------------------
PProfizi marked this conversation as resolved.
Show resolved Hide resolved

In a Python environment, run the following command:
PProfizi marked this conversation as resolved.
Show resolved Hide resolved

.. code::

pip install ansys-dpf-core

For more installation options, refer to :ref:`installation`.


Installing DPF Server
---------------------

#. DPF Server is packaged within **Ansys Unified Installer** starting with Ansys 2021 R1.
To use it, install Ansys following the installer instructions. For any trouble, refer to the
:ref:`Environment variable section <ref_compatibility>`.
For more information on getting a licensed copy of Ansys,
visit the `Ansys website <https://www.ansys.com/>`_.
PProfizi marked this conversation as resolved.
Show resolved Hide resolved

#. DPF Server is available as a **standalone** package available on the Ansys Customer Portal.
cbellot000 marked this conversation as resolved.
Show resolved Hide resolved
Protected by Ansys license mechanism (see
:ref:`Ansys licensing section <ref_getting_started_with_dpf_server>`), once having access to an
Ansys license, install DPF Server with:
PProfizi marked this conversation as resolved.
Show resolved Hide resolved

.. card::

#. Download the ansys_dpf_server_win_v2023.2.pre0.zip or ansys_dpf_server_lin_v2023.2.pre0.zip
file as appropriate.
#. Unzip the package and go to the root folder of the unzipped package
(ansys_dpf_server_win_v2023.2.pre0 or ansys_dpf_server_lin_v2023.2.pre0).
#. In a Python environment, run the following command:
rafacanton marked this conversation as resolved.
Show resolved Hide resolved

.. code::

pip install -e .

#. DPF Server is protected using license terms specified in the DPFUserLicensingAgreement.txt
file that can be found on the Ansys Customer Portal. To accept the DPF User Licensing
Agreement terms, the following environment flag must be set:

.. code::

ANSYS_DPF_ACCEPT_LA=Y



For other ways of using the Server (without pip install, user **Docker Containers**...), see
:ref:`ref_getting_started_with_dpf_server`.
PProfizi marked this conversation as resolved.
Show resolved Hide resolved


Use PyDPF-Core
--------------

In the same Python environment, run the following command:
PProfizi marked this conversation as resolved.
Show resolved Hide resolved

.. code:: python

>>> from ansys.dpf import core as dpf
>>> from ansys.dpf.core import examples
>>> model = dpf.Model(examples.download_crankshaft())
>>> print(model)


.. card::

.. code:: none

DPF Model
------------------------------
Static analysis
Unit system: MKS: m, kg, N, s, V, A, degC
Physics Type: Mechanical
Available results:
- displacement: Nodal Displacement
- velocity: Nodal Velocity
- acceleration: Nodal Acceleration
- reaction_force: Nodal Force
- stress: ElementalNodal Stress
- elemental_volume: Elemental Volume
- stiffness_matrix_energy: Elemental Energy-stiffness matrix
- artificial_hourglass_energy: Elemental Hourglass Energy
- thermal_dissipation_energy: Elemental thermal dissipation energy
- kinetic_energy: Elemental Kinetic Energy
- co_energy: Elemental co-energy
- incremental_energy: Elemental incremental energy
- elastic_strain: ElementalNodal Strain
- structural_temperature: ElementalNodal Temperature
------------------------------
DPF Meshed Region:
69762 nodes
39315 elements
Unit: m
With solid (3D) elements
------------------------------
DPF Time/Freq Support:
Number of sets: 3
Cumulative Time (s) LoadStep Substep
1 1.000000 1 1
2 2.000000 1 2
3 3.000000 1 3



.. code:: python

>>> over_time_disp = model.results.displacement().eval()
>>> over_time_disp[0].plot()


.. figure:: ../images/plotting/crankshaft_disp.png


.. toctree::
:maxdepth: 3
:hidden:

compatibility
install
dependencies
docker
PProfizi marked this conversation as resolved.
Show resolved Hide resolved

Binary file added docs/source/images/plotting/crankshaft_disp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.