Downloads#

Download example datasets from https://github.com/pyansys/example-data

ansys.dpf.core.examples.downloads.delete_downloads()#

Delete all downloaded examples to free space or update the files

ansys.dpf.core.examples.downloads.download_transient_result() str#

Download an example transient result file and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.transient_result
>>> path
'C:/Users/user/AppData/local/temp/transient.rst'
ansys.dpf.core.examples.downloads.download_all_kinds_of_complexity() str#

Download an example static result and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.download_all_kinds_of_complexity
>>> path
'C:/Users/user/AppData/local/temp/allKindOfComplexity.rst'
ansys.dpf.core.examples.downloads.download_all_kinds_of_complexity_modal() str#

Download an example result file from a static modal analysis and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.download_all_kinds_of_complexity_modal()
>>> path
'C:/Users/user/AppData/local/temp/modal_allKindOfComplexity.rst'
ansys.dpf.core.examples.downloads.download_pontoon() str#

Download an example result file from a static modal analsys and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.download_pontoon()
>>> path
'C:/Users/user/AppData/local/temp/pontoon.rst'
ansys.dpf.core.examples.downloads.download_multi_harmonic_result() str#

Download an example multi-harmonic result file and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.download_multi_harmonic_result()
>>> path
'C:/Users/user/AppData/local/temp/file_harmonic_5rpms.rst'
ansys.dpf.core.examples.downloads.download_multi_stage_cyclic_result() str#

Download an example multi stage result file and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.download_multi_stage_cyclic_result()
>>> path
'C:/Users/user/AppData/local/temp/multistage.rst'
ansys.dpf.core.examples.downloads.download_sub_file() str#

Download an example .sub result file containing matrices and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.download_sub_file()
>>> path
'C:\Users\user\AppData\Local\ansys-dpf-core\ansys-dpf-core\examples\sub\cp56.sub'
ansys.dpf.core.examples.downloads.download_msup_files_to_dict() dict#

Download all the files necessary for a msup expansion and return the download paths into a dictionary extension->path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

dict[str – Path to the example files.

Return type

str]

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> paths = examples.download_msup_files_to_dict()
>>> paths
{'rfrq': 'C:\Users\user\AppData\Local\ansys-dpf-core\ansys-dpf-core\examples\msup\file.rfrq',
 'mode': 'C:\Users\user\AppData\Local\ansys-dpf-core\ansys-dpf-core\examples\msup\file.mode',
 'rst': 'C:\Users\user\AppData\Local\ansys-dpf-core\ansys-dpf-core\examples\msup\file.rst'} # noqa: E501
ansys.dpf.core.examples.downloads.download_distributed_files() dict#

Download distributed rst files and return the download paths into a dictionary domain id->path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

dict[int – Path to the example files.

Return type

str]

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> paths = examples.download_distributed_files()
>>> paths
{0: 'C:\Users\user\AppData\Local\ansys-dpf-core\ansys-dpf-core\examples\distributed\file0.rst',
 1: 'C:\Users\user\AppData\Local\ansys-dpf-core\ansys-dpf-core\examples\distributed\file1.rst'} # noqa: E501
ansys.dpf.core.examples.downloads.download_fluent_files() dict#

Download the cas and dat file of a fluent analysis and return the download paths into a dictionary extension->path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

dict[str – Path to the example files.

Return type

str]

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> paths = examples.download_fluent_files()
>>> paths
{'cas': 'C:\Users\user\AppData\Local\ansys-dpf-core\ansys-dpf-core\examples\fluent\FFF.cas.h5',
 'dat': 'C:\Users\user\AppData\Local\ansys-dpf-core\ansys-dpf-core\examples\fluent\FFF.dat.h5'} # noqa: E501
ansys.dpf.core.examples.downloads.download_extrapolation_3d_result() dict#

Download example static results of reference and integrated points for extrapolation of 3d-element and return return the dictionary of 2 download paths.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

containing path to the example file of ref and path to the example file of integrated points.

Return type

dict

Examples

Download 2 example result files and return the dictionary containing 2 files

>>> from ansys.dpf.core import examples
>>> dict = examples.download_extrapolation_ref_result
>>> dict
{
    'file_ref': 'C:/Users/user/AppData/local/temp/file_ref.rst',
    'file_integrated': 'C:/Users/user/AppData/local/temp/file.rst'
}
ansys.dpf.core.examples.downloads.download_extrapolation_2d_result() dict#

Download example static results of reference and integrated points for extrapolation of 2d-element and return the dictionary of 2 download paths.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Contains path to the example file of ref and path to the example file of integrated points.

Return type

dict

Examples

Download 2 example result files and return the dictionary containing 2 files

>>> from ansys.dpf.core import examples
>>> dict = examples.download_extrapolation_ref_result
>>> dict
{
    'file_ref': 'C:/Users/user/AppData/local/temp/extrapolate_2d_ref.rst',
    'file_integrated': 'C:/Users/user/AppData/local/temp/extrapolate_2d.rst'
}
ansys.dpf.core.examples.downloads.download_hemisphere() str#

Download an example result file from a static analysis and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.download_hemisphere()
>>> path
'C:/Users/user/AppData/local/temp/hemisphere.rst'
ansys.dpf.core.examples.downloads.download_example_asme_result() str#

Download an example result file from a static analysis and return the download path. Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice. :returns: Path to the example file. :rtype: str

Examples

Download an example result file and return the path of the file >>> from ansys.dpf.core import examples >>> path = examples.download_example_asme_result() >>> path ‘C:/Users/user/AppData/local/temp/asme_example.rst’

ansys.dpf.core.examples.downloads.download_crankshaft() str#

Download the result file of an example of a crankshaft under load simulation and return the download path.

Examples files are downloaded to a persistent cache to avoid re-downloading the same file twice.

Returns

Path to the example file.

Return type

str

Examples

Download an example result file and return the path of the file

>>> from ansys.dpf.core import examples
>>> path = examples.crankshaft
>>> path
'C:/Users/user/AppData/local/temp/crankshaft.rst'