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
1 change: 1 addition & 0 deletions doc/changelog.d/5374.documentation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Docs updated & minor fixes
4 changes: 2 additions & 2 deletions doc/source/user_guide/beta_feature_access.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Example usage:
.. code-block:: python

>>> import ansys.fluent.core as pyfluent
>>> meshing_session = pyfluent.launch_fluent(mode="meshing")
>>> meshing_session = pyfluent.Meshing.from_install()

>>> # Feature is available before enabling beta features, but unusable and raises 'BetaFeaturesNotEnabled'
>>> assert hasattr(meshing_session, "topology_based")
Expand Down Expand Up @@ -53,7 +53,7 @@ Example usage:

.. code-block:: python

>>> solver_session = pyfluent.launch_fluent()
>>> solver_session = pyfluent.Solver.from_install()

>>> # Method available before enabling beta features, but unusable and raises 'BetaFeaturesNotEnabled'
>>> assert hasattr(solver_session, "switch_to_meshing")
Expand Down
8 changes: 4 additions & 4 deletions doc/source/user_guide/convert_journal.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ This process supports the conversion of multiple TUI journals by passing a list
.. code-block:: python

>>> # Write the converted Python commands from journal.jou to journal.py
>>> solver_session = pyfluent.launch_fluent(journal_file_names="journal.jou", topy=True)
>>> solver_session = pyfluent.Solver.from_install(journal_file_names="journal.jou", topy=True)
>>> solver_session.exit()
>>>
>>> # Write the converted Python commands from journal.jou to journal_1.py
>>> solver_session = pyfluent.launch_fluent(journal_file_names="journal.jou", topy="journal_1.py")
>>> solver_session = pyfluent.Solver.from_install(journal_file_names="journal.jou", topy="journal_1.py")
>>> solver_session.exit()
>>>
>>> # Write the converted Python commands from journal_1.jou and then from journal_2.jou to a single file journal_1_journal_2.py
>>> solver_session = pyfluent.launch_fluent(journal_file_names=["journal_1.jou", "journal_2.jou"], topy=True)
>>> solver_session = pyfluent.Solver.from_install(journal_file_names=["journal_1.jou", "journal_2.jou"], topy=True)
>>> solver_session.exit()
>>>
>>> # Write the converted Python commands from journal_1.jou and then from journal_2.jou to journal_1_2.py
>>> solver_session = pyfluent.launch_fluent(journal_file_names=["journal_1.jou", "journal_2.jou"], topy="journal_1_2.py")
>>> solver_session = pyfluent.Solver.from_install(journal_file_names=["journal_1.jou", "journal_2.jou"], topy="journal_1_2.py")
>>> solver_session.exit()


Expand Down
4 changes: 2 additions & 2 deletions doc/source/user_guide/fields/field_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ You can do this either by loading both case and data files or by reading a case

>>> import ansys.fluent.core as pyfluent
>>> from ansys.fluent.core.examples import download_file
>>> solver_session = pyfluent.launch_fluent()
>>> solver_session = pyfluent.Solver.from_install()
>>> case_path = download_file(file_name="exhaust_system.cas.h5", directory="pyfluent/exhaust_system")
>>> data_path = download_file(file_name="exhaust_system.dat.h5", directory="pyfluent/exhaust_system")
>>> solver_session.settings.file.read_case_data(file_name=case_path)
Expand Down Expand Up @@ -315,7 +315,7 @@ using the field data streaming mechanism:
>>> )

>>> # Launch Fluent in Meshing mode
>>> meshing_session = pyfluent.launch_fluent(mode=pyfluent.FluentMode.MESHING)
>>> meshing_session = pyfluent.Meshing.from_install()

>>> # Dictionary to store mesh data
>>> mesh_data = {}
Expand Down
4 changes: 2 additions & 2 deletions doc/source/user_guide/fields/reduction.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ with two separate examples case files as follows:
>>> from ansys.fluent.core.solver.function import reduction
>>> from ansys.fluent.core.examples import download_file

>>> solver1 = pyfluent.launch_fluent()
>>> solver1 = pyfluent.Solver.from_install()
>>> case_path = download_file(file_name="exhaust_system.cas.h5", directory="pyfluent/exhaust_system")
>>> data_path = download_file(file_name="exhaust_system.dat.h5", directory="pyfluent/exhaust_system")
>>> solver1.settings.file.read_case_data(file_name=case_path)

>>> solver2 = pyfluent.launch_fluent()
>>> solver2 = pyfluent.Solver.from_install()
>>> case_path = download_file("elbow1.cas.h5", "pyfluent/file_session")
>>> data_path = download_file("elbow1.dat.h5", "pyfluent/file_session")
>>> solver2.settings.file.read_case_data(file_name=case_path)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/fields/solution_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Launch the fluent solver, and make solution variable objects available
>>> from ansys.units import VariableCatalog
>>> import_file_name = examples.download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow")
>>> examples.download_file("mixing_elbow.dat.h5", "pyfluent/mixing_elbow")
>>> solver_session = pyfluent.launch_fluent()
>>> solver_session = pyfluent.Solver.from_install()
>>> solver_session.settings.file.read_case_data(file_name=import_file_name)


Expand Down
6 changes: 3 additions & 3 deletions doc/source/user_guide/file_transfer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Depending on how Fluent is launched, different file transfer strategies are avai

>>> case_file = examples.download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow")

>>> session = pyfluent.launch_fluent()
>>> session = pyfluent.Solver.from_install()
>>> session.settings.file.read_case(file_name=case_file)
>>> session.settings.file.write_case(file_name="write_mixing_elbow.cas.h5")

Expand All @@ -55,7 +55,7 @@ Depending on how Fluent is launched, different file transfer strategies are avai

>>> file_transfer_service = ContainerFileTransferStrategy()
>>> container_dict = {"mount_source": file_transfer_service.mount_source}
>>> session = pyfluent.launch_fluent(file_transfer_service=file_transfer_service, container_dict=container_dict)
>>> session = pyfluent.Solver.from_container(file_transfer_service=file_transfer_service, container_dict=container_dict)
>>> session.settings.file.read_case(file_name=case_file)
>>> session.settings.file.write_case(file_name="write_mixing_elbow.cas.h5")

Expand All @@ -80,7 +80,7 @@ Depending on how Fluent is launched, different file transfer strategies are avai

>>> mesh_file = examples.download_file("mixing_elbow.msh.h5", "pyfluent/mixing_elbow")

>>> session = pyfluent.launch_fluent(mode=pyfluent.FluentMode.MESHING, file_transfer_service=StandaloneFileTransferStrategy())
>>> session = pyfluent.Meshing.from_install(file_transfer_service=StandaloneFileTransferStrategy())
>>> session.upload(file_name=mesh_file, remote_file_name="elbow.msh.h5")
>>> session.meshing.File.ReadMesh(FileName="elbow.msh.h5")
>>> session.meshing.File.WriteMesh(FileName="write_elbow.msh.h5")
Expand Down
4 changes: 2 additions & 2 deletions doc/source/user_guide/make_container_image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Run Docker container using PyFluent
import ansys.fluent.core as pyfluent
os.environ["ANSYSLMD_LICENSE_FILE"] = "<license file or server>"
custom_config = {'fluent_image': 'ansys_inc:latest', 'mount_source': f"{os.getcwd()}", 'auto_remove': False}
solver_session = pyfluent.launch_fluent(container_dict=custom_config, user_docker_compose=True)
solver_session = pyfluent.Solver.from_container(container_dict=custom_config, use_docker_compose=True)


Run Podman container using the command line
Expand Down Expand Up @@ -177,5 +177,5 @@ Run Podman container using PyFluent
import ansys.fluent.core as pyfluent
os.environ["ANSYSLMD_LICENSE_FILE"] = "<license file or server>"
custom_config = {'fluent_image': 'ansys_inc:latest', 'mount_source': f"{os.getcwd()}", 'auto_remove': False}
solver_session = pyfluent.launch_fluent(container_dict=custom_config, use_podman_compose=True)
solver_session = pyfluent.Solver.from_container(container_dict=custom_config, use_podman_compose=True)

22 changes: 11 additions & 11 deletions doc/source/user_guide/meshing/new_meshing_workflows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ Import geometry
from ansys.fluent.core import examples

import_file_name = examples.download_file('mixing_elbow.pmdb', 'pyfluent/mixing_elbow')
meshing_session = pyfluent.launch_fluent(
mode=pyfluent.FluentMode.MESHING, precision=pyfluent.Precision.DOUBLE, processor_count=2
meshing_session = pyfluent.Meshing.from_install(
precision=pyfluent.Precision.DOUBLE, processor_count=2
)
watertight = pyfluent.WatertightMeshing(session=meshing_session)
import_geometry = watertight.import_geometry
Expand Down Expand Up @@ -129,7 +129,7 @@ Import CAD and part management
import_file_name = examples.download_file(
"exhaust_system.fmd", "pyfluent/exhaust_system"
)
meshing_session = pyfluent.launch_fluent(precision=pyfluent.Precision.DOUBLE, processor_count=2, mode=pyfluent.FluentMode.MESHING)
meshing_session = pyfluent.Meshing.from_install(precision=pyfluent.Precision.DOUBLE, processor_count=2)

fault_tolerant = FaultTolerantMeshing(session=meshing_session)
fault_tolerant.parts.input_file_changed(
Expand Down Expand Up @@ -380,8 +380,8 @@ Import geometry
from ansys.fluent.core import examples, TwoDimensionalMeshing

import_file_name = examples.download_file('NACA0012.fmd', 'pyfluent/airfoils')
meshing_session = pyfluent.launch_fluent(
mode=pyfluent.FluentMode.MESHING, precision=pyfluent.Precision.DOUBLE, processor_count=2
meshing_session = pyfluent.Meshing.from_install(
precision=pyfluent.Precision.DOUBLE, processor_count=2
)
two_dim_mesh = TwoDimensionalMeshing(session=meshing_session)

Expand Down Expand Up @@ -518,8 +518,8 @@ Create workflow
from ansys.fluent.core import examples, CreateMeshingWorkflow

import_file_name = examples.download_file('mixing_elbow.pmdb', 'pyfluent/mixing_elbow')
meshing_session = pyfluent.launch_fluent(
mode=pyfluent.FluentMode.MESHING, precision=pyfluent.Precision.DOUBLE, processor_count=2
meshing_session = pyfluent.Meshing.from_install(
precision=pyfluent.Precision.DOUBLE, processor_count=2
)
custom_workflow = CreateMeshingWorkflow(session=meshing_session)

Expand Down Expand Up @@ -563,8 +563,8 @@ Load workflow
saved_workflow_path = examples.download_file(
"sample_watertight_workflow.wft", "pyfluent/meshing_workflows"
)
meshing_session = pyfluent.launch_fluent(
mode=pyfluent.FluentMode.MESHING, precision=pyfluent.Precision.DOUBLE, processor_count=2
meshing_session = pyfluent.Meshing.from_install(
precision=pyfluent.Precision.DOUBLE, processor_count=2
)
loaded_workflow = LoadMeshingWorkflow(session=meshing_session, file_path=saved_workflow_path)

Expand All @@ -577,8 +577,8 @@ You can insert tasks into a workflow using the workflow object.

import ansys.fluent.core as pyfluent

meshing_session = pyfluent.launch_fluent(
mode=pyfluent.FluentMode.MESHING, precision=pyfluent.Precision.DOUBLE, processor_count=2
meshing_session = pyfluent.Meshing.from_install(
precision=pyfluent.Precision.DOUBLE, processor_count=2
)
watertight = meshing_session.watertight()
watertight.import_geometry.insertable_tasks()
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/monitors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ callback mechanism to perform a simple tabulation of monitored values per iterat
>>> from ansys.fluent.core import examples
>>> import pandas as pd
>>> from tabulate import tabulate
>>> solver_session = pyfluent.launch_fluent(start_transcript=False)
>>> solver_session = pyfluent.Solver.from_install(start_transcript=False)
>>> import_case = examples.download_file(
>>> file_name="exhaust_system.cas.h5", directory="pyfluent/exhaust_system"
>>> )
Expand Down
4 changes: 2 additions & 2 deletions doc/source/user_guide/physical_variables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ Here’s how to use ``VariableCatalog`` to read and reduce field data using unit

.. code-block:: python

from ansys.fluent.core import launch_fluent, examples
from ansys.fluent.core import Solver, examples
from ansys.units.variable_descriptor import VariableCatalog

solver_session = launch_fluent()
solver_session = Solver.from_install()
case_path = examples.download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow")
solver_session.settings.file.read(file_type="case", file_name=case_path)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Boundary conditions
>>> import ansys.fluent.core as pyfluent
>>> from ansys.fluent.core import examples
>>> file_name = examples.download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow")
>>> solver_session = pyfluent.launch_fluent()
>>> solver_session = pyfluent.Solver.from_install()
>>> solver_session.settings.file.read_case(file_name=file_name)
>>> cold_inlet = pyfluent.VelocityInlet(settings_source=solver_session, name="cold-inlet")
>>> cold_inlet = pyfluent.solver.VelocityInlet(settings_source=solver_session, name="cold-inlet")
>>> cold_inlet.momentum.velocity.set_state(0.4)
>>> inlet_turbulence = cold_inlet.turbulence
>>> turbulence_specification = inlet_turbulence.turbulence_specification
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Setting up and querying the model
>>> import ansys.fluent.core as pyfluent
>>> from ansys.fluent.core import examples
>>> file_name = examples.download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow")
>>> solver_session = pyfluent.launch_fluent()
>>> solver_session = pyfluent.Solver.from_install()
>>> solver_session.settings.file.read_case(file_name=file_name)
>>> energy = pyfluent.solver.Energy(settings_source=solver_session)
>>> energy.enabled.get_state()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ need to have loaded a case or mesh file; e.g.:
>>> import ansys.fluent.core as pyfluent
>>> from ansys.fluent.core import examples
>>> file_name = examples.download_file("mixing_elbow.cas.h5", "pyfluent/mixing_elbow")
>>> solver_session = pyfluent.launch_fluent()
>>> solver_session = pyfluent.Solver.from_install()
>>> solver_session.settings.file.read_case(file_name=file_name)


Expand Down
12 changes: 5 additions & 7 deletions doc/source/user_guide/transfer_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,16 @@ meshing session and transfer it to a solver session.
>>> "mixing_elbow.msh.h5",
>>> "pyfluent/mixing_elbow"
>>> )
>>> pure_meshing_session = pyfluent.launch_fluent(
>>> mode=pyfluent.FluentMode.PURE_MESHING
>>> )
>>> pure_meshing_session = pyfluent.PureMeshing.from_install()
>>> pure_meshing_session.tui.file.read_mesh(
>>> import_file_name
>>> mesh_file_name
>>> )

>>> solver_session = pyfluent.launch_fluent()
>>> solver_session = pyfluent.Solver.from_install()

>>> transfer_case(
>>> source_instance=meshing,
>>> solvers=[solver],
>>> source_instance=pure_meshing_session,
Comment thread
mayankansys marked this conversation as resolved.
>>> solvers=[solver_session],
>>> file_type="mesh",
>>> file_name_stem='',
>>> num_files_to_try=1,
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Import the ``ui`` function and pass in a settings object:
import ansys.fluent.core as pyfluent
from ansys.fluent.core.ui import ui

solver = pyfluent.launch_fluent()
solver = pyfluent.Solver.from_install()

# Launch the UI for the full settings tree
ui(solver.settings)
Expand Down
2 changes: 1 addition & 1 deletion doc/source/user_guide/user_guide_contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ A simple example
.. code:: python

>>> import ansys.fluent.core as pyfluent
>>> meshing_session = pyfluent.launch_fluent(mode=pyfluent.FluentMode.MESHING, product_version=pyfluent.FluentVersion.v251)
>>> meshing_session = pyfluent.Meshing.from_install(product_version=pyfluent.FluentVersion.v251)
>>> watertight = meshing_session.watertight()
>>> watertight.import_geometry.file_name = pyfluent.examples.download_file("mixing_elbow.pmdb","pyfluent/mixing_elbow")
>>> watertight.import_geometry()
Expand Down
Loading