Skip to content

Fluid simulation results API #402

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

Merged
merged 177 commits into from
Jul 17, 2023
Merged

Fluid simulation results API #402

merged 177 commits into from
Jul 17, 2023

Conversation

PProfizi
Copy link
Contributor

@PProfizi PProfizi commented May 24, 2023

To do in further PRs:

  • Expose a MeshInfo
  • Use the MeshInfo to complete Zones
  • Use the Simulation.zones property to prevent requests on both FaceZone and CellZone, document it
  • Add further examples

@PProfizi PProfizi added the enhancement New feature or request label May 24, 2023
@PProfizi PProfizi self-assigned this May 24, 2023
@PProfizi PProfizi added this to the v0.5.0 milestone May 24, 2023
@codecov
Copy link

codecov bot commented May 24, 2023

Codecov Report

Merging #402 (695e631) into master (6b66a70) will decrease coverage by 1.41%.
The diff coverage is 92.17%.

@@            Coverage Diff             @@
##           master     #402      +/-   ##
==========================================
- Coverage   83.03%   81.63%   -1.41%     
==========================================
  Files          35       39       +4     
  Lines        3531     4122     +591     
==========================================
+ Hits         2932     3365     +433     
- Misses        599      757     +158     



class Phase:
"""Physical state of a given species in a fluid simulation."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you take these kind a descriptions from fluent documentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cbellot000 I do not think so, no

]
return self._model.metadata.result_info.available_results

@property
Copy link
Contributor

Choose a reason for hiding this comment

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

@PProfizi could you pease point me to the usage of the mesh info ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cbellot000 the MeshInfo is not yet available

class Zones:
"""List of fluid zones."""

def __init__(self):
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have a way to access zones by name?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@cbellot000 once the MeshInfo is available, sure, but not now

@@ -194,18 +195,22 @@ jobs:
if: startsWith(github.head_ref, 'master') || github.event.action == 'ready_for_review' || !github.event.pull_request.draft
uses: ./.github/workflows/examples.yml
with:
ANSYS_VERSION: '241'
ANSYS_VERSION: "241"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you use the environment variable?

Suggested change
ANSYS_VERSION: "241"
ANSYS_VERSION: ${{env.ANSYS_VERSION}}

Comment on lines 72 to 83
# # To directly extract the temperature data for only one phase,
# # pass the 'temperature' method a 'phases' argument.
# # This argument must be given a list of phase unique identifiers, which appear
# # in the dataframe in the phase label column between parentheses,
# # or as listed
# # under the 'Available qualifier labels' section of the metadata on the result
# # water_temperature = simulation.temperature(phases=["Copper"])
# water_temperature = simulation.enthalpy(
# phases=[2]
# )
# print(water_temperature)
# # The dataframe obtained now only stores data for the water phase.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it expected to have this entire section commented out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@MaxJPRey that was to due to a bug server-side which has been resolved in the meantime.
I'll uncomment it.

@PProfizi PProfizi merged commit 3d55fd5 into master Jul 17, 2023
@PProfizi PProfizi deleted the feat/fluid_simulation_api branch July 17, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants