ansys / pyfluent

Pythonic interface to Ansys Fluent
https://fluent.docs.pyansys.com
MIT License
257 stars 41 forks source link

Examples documentation out of date and expected output doesn't match output in reality #2142

Closed answillgm closed 11 months ago

answillgm commented 11 months ago

Description of the modifications

There are several lines where the output suggests replacing the used command in the examples doc with a different method, this implies that either the commands used in the doc are out of date and should be updated to reflect the current recommended API usage, or that the output on the doc needs to be updated as those following the tutorials may think they have made a mistake.

Additionally, this warning message appears pyfluent\src\ansys\fluent\core\solver\settings_241\read_profile.py:17: SyntaxWarning: invalid escape sequence '*' which doesn't appear to affect the outcome, but if benign should probably be added to the output for the doc, and if an issue needs to be investigated

An Example in Fault Tolerant Meshing:

Python commands used:

solver = meshing.switch_to_solver()

solver.tui.mesh.check()

Expected output from doc:


Done.
Preparing...

deleting exterior entities...done.
unused zone boundary-node-216 removed
unused zone boundary-node-218 removed

*********************************************
Info: Your license enables 4-way parallel execution.
For faster simulations, please start the application with the appropriate parallel options.
*********************************************

Transferring mesh
        creating threads... done
        transferring nodes... done
        transferring cells... done
        transferring faces... done
        post mesh transfer operations... done
done

Building...
     mesh
        auto partitioning mesh by Metis (fast),
        distributing mesh
                parts..,
                faces..,
                nodes..,
                cells..,
        bandwidth reduction using Reverse Cuthill-McKee: 101178/1577 = 64.1585
     materials,
     interface,
     domains,
     zones,
        outlet-1
        inlet-3
        inlet-2
        inlet-1
        interior--fluid-region-1
        main.1
        flow-pipe
        outpipe3.1
        object2.1
        object1.1
        fluid-region-1
     surfaces,
     parallel,
Done.
Mesh is now scaled to meters.

 Domain Extents:
   x-coordinate: min (m) = 2.154117e-01, max (m) = 5.349968e-01
   y-coordinate: min (m) = -3.600576e-01, max (m) = -1.293207e-01
   z-coordinate: min (m) = -3.627032e-01, max (m) = 8.410238e-02
 Volume statistics:
   minimum volume (m3): 1.752988e-10
   maximum volume (m3): 3.237063e-07
     total volume (m3): 5.478690e-03
 Face area statistics:
   minimum face area (m2): 3.946046e-07
   maximum face area (m2): 1.027569e-04
 Checking mesh.....................................
Done.

Actual output:

Done.
Preparing...

deleting exterior entities...done.
unused zone boundary-node-216 removed
unused zone boundary-node-218 removed

*********************************************
Info: Your license enables 4-way parallel execution.
For faster simulations, please start the application with the appropriate parallel options.
*********************************************

Multicore SMT processors detected. Processor affinity set!

Transferring mesh
        creating threads... done
        transferring nodes... done
        transferring cells... done
        transferring faces... done
        post mesh transfer operations... done
done

Building...
     mesh
        auto partitioning mesh by Metis (fast),
        distributing mesh
                parts..,
                faces..,
                nodes..,
                cells..,
        bandwidth reduction using Reverse Cuthill-McKee: 100035/1504 = 66.5126
     materials,
     interface,
     domains,
     zones,
        outlet-1
        inlet-3
        inlet-2
        inlet-1
        interior--fluid-region-1
        main.1
        flow-pipe
        outpipe3.1
        object2.1
        object1.1
        fluid-region-1
     surfaces,
     parallel,
Done.
Mesh is now scaled to meters.

D:\pyfluent\src\ansys\fluent\core\solver\settings_241\read_profile.py:17: SyntaxWarning: invalid escape sequence '\*'
  """
D:\pyfluent\src\ansys\fluent\core\solver\settings_241\twopisum.py:22: SyntaxWarning: invalid escape sequence '\*'
  """
>
 Domain Extents:
   x-coordinate: min (m) = 2.154117e-01, max (m) = 5.355873e-01
   y-coordinate: min (m) = -3.600511e-01, max (m) = -1.293207e-01
   z-coordinate: min (m) = -3.626823e-01, max (m) = 8.410238e-02
 Volume statistics:
   minimum volume (m3): 4.637095e-11
   maximum volume (m3): 3.544944e-07
     total volume (m3): 5.479364e-03
 Face area statistics:
   minimum face area (m2): 1.578150e-07
   maximum face area (m2): 1.024704e-04
 Checking mesh.....................................
Done.
The following solver settings object method could also be used to execute the above command:
<solver_session>.mesh.check()

Useful links and references

https://fluent.docs.pyansys.com/version/stable/examples/00-fluent/exhaust_system.html#sphx-glr-examples-00-fluent-exhaust-system-py

mkundu1 commented 11 months ago

The tutorial documentation is generated using the release version of Fluent which is 2023 R2. We shall revisit this when we update the tutorial documentation for Fluent 2024 R1 after it is released.

raph-luc commented 11 months ago

I believe the recommended command output like

The following solver settings object method could also be used to execute the above command:
<solver_session>.mesh.check() 

should show up in the live examples webpage in the output boxes (once they are applicable), so it should be relatively straightforward for us to upgrade these obsolete commands once Fluent 2024 R1 is released and we transition the documentation to use it.

The src\ansys\fluent\core\solver\settings_241\read_profile.py:17: SyntaxWarning: invalid escape sequence '\*' is something that we need to fix in codegen, it also happens for Fluent v232

raph-luc commented 11 months ago

Closing this tracker as this isn't really a documentation issue (the documentation part isn't an issue, as described above by Mainak), and opening a more specific tracker: https://github.com/ansys/pyfluent/issues/2168