RuntimeError when setting porous_zone direction_1_vector — Object not active #4341
-
I'm experiencing a persistent error when using the PyFluent API to programmatically set properties on a porous zone. Specifically, whenever I try to set direction_1_vector or related properties of a porous zone, I encounter the following error:
I have set Here is a minimal example that reproduces the error: cell_zone = solver.setup.cell_zone_conditions.fluid["source_1"]
cell_zone.porous_zone.porous = True
porous = solver.setup.cell_zone_conditions.fluid["source_1"].porous_zone
porous.dir_spec_cond = "Cartesian"
porous.direction_1_vector = (0.0, 0.0, 1.0) # Raises error here When inspecting porous_zone properties with {'porous': True,
'dir_spec_cond': 'Cartesian',
'rel_vel_resistance': True,
'viscous_resistance': [{'option': 'value', 'value': 211100000},
{'option': 'value', 'value': 211100000},
{'option': 'value', 'value': 211100000}],
'alt_inertial_form': False,
'inertial_resistance': [{'option': 'value', 'value': 0},
{'option': 'value', 'value': 0},
{'option': 'value', 'value': 0}],
'power_law_c0': 0,
'power_law_c1': 0,
'porosity': {'option': 'value', 'value': 1},
'relative_viscosity': {'option': 'constant', 'value': 1.0},
'equib_thermal': True,
'solid_material': 'aluminum'} Environment details: PyFluent version: 0.34.0 Fluent version: 2024 R2 academic version Does anyone have insight into: Any help or pointers would be appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The issue might be case specific? Could you please try to replicate this behaviour with the classic mixing_elbow example. I am getting expected behaviour: ![]() |
Beta Was this translation helpful? Give feedback.
-
I got it working using the following code: porous.dir_spec_cond = "Conical"
porous.dir_spec_cond()
porous.dir_spec_cond = "Cartesian"
porous.dir_spec_cond()
porous.direction_1_vector = (0.0, 0.0, 1.0)
porous.direction_2_vector = (1.0, 0.0, 0.0) To activate the function properly, just insert a dummy line |
Beta Was this translation helpful? Give feedback.
The issue might be case specific? Could you please try to replicate this behaviour with the classic mixing_elbow example.
I am getting expected behaviour: