-
Notifications
You must be signed in to change notification settings - Fork 43
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
Invalid command while defining a material. (battery_cell_tui) #686
Comments
Another similar failure, solver.execute_tui("/define/materials/change-create air water yes constant 1000 no no yes constant 0.001 no no no yes ")
Adjusting the following settings: Density Viscosity invalid command [yes] |
The issue here is *cx-yes-no-prompt?* is set to false in Fluent during remote call execution. We need to provide an |
Following definition of
Will add this method in new solver/meshing sessions (#611) |
@mkundu1 Thank you. I confirm the fix. |
@mkundu1 I am still seeing some "invalid" commands with the solver.dict['execute_tui'] = lambda x: session.scheme_eval.scheme_eval( f'(tui-menu-execute {json.dumps(x)} "")' ) To reproduce: Please run attached script. |
adj_cylinder_tui_s1.pyansys.py.txt Above is the updated script which will work after the linked PR is merged. |
@mkundu1 Thank you. |
🔍 Before submitting the issue
🐞 Description of the bug
PyFluent is returning an invalid command error while executing. Same line is working in the Fluent.
solver.execute_tui("/define/materials/change-create aluminum e_material yes constant 2092 yes constant 678 yes constant 18.2 yes defined-per-uds 0 constant 1190000 1 constant 983000 -1 no ")
📝 Steps to reproduce
Fluent R23.1 version Build Time: Jul 28 2022 14:05:05 EDT Build Id: 108 (Windows 10)
To reproduce run (attached mesh and python files):
import ansys.fluent.core as pyfluent
import json
launch_parameters = {'precision': 'double', 'processor_count': 4, 'version': '3d', 'meshing_mode': False}
session = pyfluent.launch_fluent(**launch_parameters)
solver = session.solver.root
solver.dict['execute_tui'] = lambda x: session.scheme_eval.scheme_eval(
f'(ti-menu-load-string {json.dumps(x)} #t)'
)
solver.file.read(file_type = "case", file_name = "unit_battery.msh")
solver.mesh.check()
solver.execute_tui("/define/models/addon-module 8 ")
solver.setup.general.solver.time = "unsteady-1st-order"
solver.setup.models.energy = {"enabled" : True}
solver.execute_tui("/define/models/battery-model/enable-battery-model? yes ")
solver.execute_tui("/define/models/battery-model/model-parameters yes yes yes 14.6 no 0 0 0 1 0 3 4.3 ")
solver.execute_tui("/define/models/battery-model/electric-field-model/conductive-regions 2 () 3 4 () no ")
solver.execute_tui("/define/models
files.zip
/battery-model/electric-field-model/current-tap 9 () ")
solver.execute_tui("/define/models/battery-model/electric-field-model/voltage-tap 8 () ")
solver.execute_tui("(models-changed) ")
solver.execute_tui("/define/materials/change-create aluminum e_material yes constant 2092 yes constant 678 yes constant 18.2 yes defined-per-uds 0 constant 1190000 1 constant 983000 -1 no ")
💻 Which operating system are you using?
Windows
🐍 Which Python version are you using?
3.10
📦 Installed packages
The text was updated successfully, but these errors were encountered: