Repository navigation
Unable to read 2D Fan zone average condition #4836
Replies: 1 comment
|
The fan boundary exposes these components under the fan = solver.settings.setup.boundary_conditions.fan["<fan-zone-name>"]
pjs = fan.pressure_jump_specification
print(pjs.get_state())
for name in ("dir_x", "dir_y", "dir_z"):
setting = getattr(pjs, name)
print(name, setting.get_state(), "active:", setting.is_active())For reversing the fan, the PyFluent v0.37 reference also documents a Boolean reverse = getattr(pjs, "reverse_fan_direction", None)
if reverse is None:
print("reverse_fan_direction is not exposed by this session")
elif not reverse.is_active() or reverse.is_read_only():
print("reverse_fan_direction is inactive or read-only")
else:
reverse.set_state(not reverse.get_state())The v0.37 API page is generated for settings schema 252, while your report says Fluent 2025 R1 (251), so the availability check matters. The pressure-jump reference lists the Boolean and direction components; the setting reference defines it as the reverse-fan-direction control. If the field is absent, please share the exact exception and The fan settings reference places |
Uh oh!
There was an error while loading. Please reload this page.
I am unable to acces the x, y and z direction entries under the zone average condition in a 2D Fan boundary.
My intention is to read the value, compare with user defined value and reverse the flow direction if required.
Although, pyfluent documentation referes dir_x, dir_y and dir_z as attributes under the pressure_jump_specification class, it is not mentioned in the dict when access it in pyFluent console.
Please suggest if there is any mistake being done from my end.
I am using pyfluent 0.37.1 and Ansys 2025R1
All reactions