Skip to content

Commit

Permalink
Implement and test flprj argument for FluidSimulation (#487)
Browse files Browse the repository at this point in the history
* Implement and test flprj argument for FluidSimulation

* Test result extraction for flprj
  • Loading branch information
PProfizi authored Sep 11, 2023
1 parent 9af0c05 commit d1003a2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ansys/dpf/post/fluid_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def __init__(
else:
ds = dpf.DataSources()
if flprj:
raise NotImplementedError("flprj input not accepted yet")
ds.set_result_file_path(flprj, "flprj")
if cas:
if not isinstance(cas, list):
cas = [cas]
Expand Down
8 changes: 8 additions & 0 deletions tests/test_fluid_simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,14 @@ def test_simulation_str(self, fluent_simulation):
assert fluent_simulation is not None
assert str(fluent_simulation)

def test_simulation_flprj(self):
simulation = post.FluidSimulation(
flprj=examples.download_fluent_axial_comp()["flprj"]
)
assert len(simulation.time_freq_support.time_frequencies) == 3
result = simulation.static_pressure(all_sets=True)
assert len(result.columns.set_ids) == 3

@pytest.mark.parametrize(
"result_name",
[
Expand Down

0 comments on commit d1003a2

Please sign in to comment.