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

feat: Display solution variables data #402

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mkundu1
Copy link
Collaborator

@mkundu1 mkundu1 commented Jun 22, 2024

import ansys.fluent.core as pyfluent
from ansys.fluent.visualization.pyvista.solution_variables import display_solution_variables_data
solver = pyfluent.launch_fluent()
solver.file.read_case_data(file_name=r"d:/work/elbow.cas.h5")
display_solution_variables_data(session=solver, variables=["SV_P", "SV_T"], zones=["inlet1"])

image

display_solution_variables_data(session=solver, variables=["SV_P", "SV_T"], zones=["inlet2"], format = lambda i, x, y: f"{i}: {x:.2f}, {y:.2f}")

image

@mkundu1 mkundu1 linked an issue Jun 22, 2024 that may be closed by this pull request
@prmukherj
Copy link
Collaborator

prmukherj commented Jun 24, 2024

Shall we make this consistent with other PyViz features like Graphics and Plots??

>>> display_solution_variables_data(session=solver, variables=["SV_P", "SV_T"], zones=["inlet1"])

Something like:

>>> svar_disp = SolutionVariables(session=solver)
>>> svar_disp.variables = ["SV_P", "SV_T"]
>>> svar_disp.zones = ["inlet1]
>>> svar_disp.display()

format can also be an additional attribute.

Even zones can be named surface_names (or can take surface ids optionally)?

@seanpearsonuk
Copy link
Collaborator

Shall we make this consistent with other PyViz features like Graphics and Plots??

>>> display_solution_variables_data(session=solver, variables=["SV_P", "SV_T"], zones=["inlet1"])

Something like:

>>> svar_disp = SolutionVariables(session=solver)
>>> svar_disp.variables = ["SV_P", "SV_T"]
>>> svar_disp.zones = ["inlet1]
>>> svar_disp.display()

format can also be an additional attribute.

Even zones can be named surface_names (or can take surface ids optionally)?

Worth considering.

@mkundu1
Copy link
Collaborator Author

mkundu1 commented Jul 3, 2024

Shall we make this consistent with other PyViz features like Graphics and Plots??

>>> display_solution_variables_data(session=solver, variables=["SV_P", "SV_T"], zones=["inlet1"])

Something like:

>>> svar_disp = SolutionVariables(session=solver)
>>> svar_disp.variables = ["SV_P", "SV_T"]
>>> svar_disp.zones = ["inlet1]
>>> svar_disp.display()

format can also be an additional attribute.

Even zones can be named surface_names (or can take surface ids optionally)?

@prmukherj I could not get the display working in the above approach. We can sometimes look into the change in the pyfluent and pyfluent-visualization branches feat/display-svars-object-based.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visualize solution variable data
4 participants