Having trouble setting up a 3D fan zone in the Cell Zone Conditions by pyfluent #2021
Unanswered
1Northward1
asked this question in
Q&A
Replies: 1 comment
-
@1Northward1 If you have a set of working TUI commands you can journal them to Python in Fluent and then use the generated script in PyFluent. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discussed in #1652
Originally posted by 1Northward1 May 30, 2023
Dear pyfluent support team,
I am having trouble setting up a 3D fan zone in the Cell Zone Conditions using pyfluent. Specifically, I am unable to specify the fan inlet zone.
I have tried using the following commands to set up the inlet of the fan zone:
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fanzone' : True}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_zone_list': 'fan_inlet'}
However, I receive the following error message:
Error: wta(1st) to symbol->string
Error Object: 0
I have also tried the following commands, which also give me an error:
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'inlet_fan_zone': 'fan_inlet'}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_zone_list': ['fan_inlet']}
I would appreciate any guidance on how to properly specify the fan inlet zone in the Cell Zone Conditions through pyfluent.
I have included the full pyfluent code for your reference.
#--------------------------------------------------Read Case---------------------------------------------------#
pwd = os.getcwd()
meshFile= os.path.join(pwd,r"FM_output.msh")
solver = pyfluent.launch_fluent(version="3d",precision="double",
processor_count=8,show_gui=True,cleanup_on_exit=False, mode="solver")
solver.file.read(file_type="case", file_name=meshFile)
angvel = 7800
pre_jump = 3000
#--------------------------------------------------Materials---------------------------------------------------#
solver.setup.materials.fluid['air'] = {'density': {'option': 'ideal-gas'},
'viscosity': {'option': 'sutherland',
'sutherland': {'option': 'three-coefficient-method',
'reference_viscosity': 1.7894e-05,
'reference_temperature': 288.15,
'effective_temperature': 110.56}}}
#-------------------------------------------Cell Zone Conditions----------------------------------------------#
solver.tui.define.boundary_conditions.modify_zones.zone_name("fan-inlet-suc-outlet-fan-zone-main-zone", "fan_inlet")
solver.tui.define.boundary_conditions.modify_zones.zone_name("fan-outlet-jet-inlet-fan-zone-main-zone", "fan_outlet")
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fanzone' : True}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'material': 'air'}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_zone_list': ['fan_inlet']}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_hub_rad' : 0.0203}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_tip_rad' : 0.0323}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_thickness' : 0.124}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_inflection_point' : 0.83}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_x_origin' : 0.315495}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_y_origin' : 0.012141}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_z_origin' : 0.0}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'limit_flow_fan': False}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'tan_source_term': True}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'rad_source_term': True}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'axial_source_term': True}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_rot_dir' : 'positive'}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_opert_angvel': angvel}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_axial_source_method': 'constant pressure'}
solver.setup.cell_zone_conditions.fluid['fan-zone'] = {'fan_pre_jump': pre_jump}
Thank you for your assistance.
Sincerely,

Mars
Beta Was this translation helpful? Give feedback.
All reactions