### Generate and execute a FlightStream script Source: https://github.com/altairengineering/pyflightscript/blob/master/sphinx/index.md This example demonstrates the workflow of initializing the script state, defining solver commands, and executing the generated script. ```python import pyFlightscript as pyfs # 1. Define the path to your FlightStream executable fsexe_path = r'C:\path\to\your\FlightStream.exe' # 2. (Optional) Clear any previous script state from memory pyfs.script.hard_reset() # 3. Use pyFlightscript functions to build your script commands pyfs.open_fsm(fsm_filepath="path/to/your/model.fsm") pyfs.solver.initialize_solver(solver_model="INCOMPRESSIBLE", surfaces=-1) pyfs.exec_solver.start_solver() pyfs.close_flightstream() # 4. Write and execute the script pyfs.write_to_file() # write the script to script_out.txt pyfs.execute_fsm_script(fsexe_path=fsexe_path, hidden=True) # optional, can also run from GUI ``` -------------------------------- ### Install pyFlightscript via Git Source: https://github.com/altairengineering/pyflightscript/blob/master/README.md Commands to clone the repository and install dependencies or the package directly. ```bash git clone https://github.com/altairengineering/pyFlightscript.git ``` ```bash pip install -r requirements.txt ``` ```bash pip install . ``` ```bash pip install git+https://github.com/altairengineering/pyFlightscript.git ``` -------------------------------- ### Install pyFlightscript via pip Source: https://github.com/altairengineering/pyflightscript/blob/master/sphinx/index.md Use this command to install the library directly from the GitHub repository. ```bash pip install git+https://github.com/altairengineering/pyFlightscript.git ``` -------------------------------- ### Generate documentation on Windows Source: https://github.com/altairengineering/pyflightscript/blob/master/sphinx/README.md Execute the batch file to build documentation on Windows systems. ```batch generate_docs.bat ``` -------------------------------- ### Execute Convergence Study Source: https://github.com/altairengineering/pyflightscript/blob/master/examples/MeshConvergence/README.md Run the main script to perform simulations based on the configuration file. ```bash python RunConvergenceStudy.py ``` -------------------------------- ### Generate documentation on non-Windows systems Source: https://github.com/altairengineering/pyflightscript/blob/master/sphinx/README.md Commands to clean, generate, and build documentation on Unix-like systems. ```bash remove \_build directory run 'sphinx-apidoc -o . ../pyFlightscript/' rename pyFlighscript.rst to index.rst run 'make.bat html' ``` -------------------------------- ### Generate Documentation Source: https://github.com/altairengineering/pyflightscript/blob/master/README.md Commands to generate documentation using Sphinx on Windows and other systems. ```bash generate_docs.bat ``` ```bash remove \_build directory run 'sphinx-apidoc -o . ../pyFlightscript/' rename pyFlighscript.rst to index.rst run 'make.bat html' ``` -------------------------------- ### Define Mesh Convergence Configuration Source: https://github.com/altairengineering/pyflightscript/blob/master/examples/MeshConvergence/README.md Configure mesh density parameters and angle of attack ranges in the config.json file. ```json { "refFrame": "1", "runU": true, // Enable U-direction mesh convergence "uStart": 80, // Starting U mesh density "uInterval": 20, // U mesh increment "uInts": 9, // Number of U intervals (final = uStart + uInterval * uInts) "runV": false, // Enable V-direction mesh convergence "vStart": 80, // Starting V mesh density "vInterval": 30, // V mesh increment "vInts": 9, // Number of V intervals "aoaStart": 2, // Starting angle of attack (degrees) "aoaStop": 10, // Ending angle of attack (degrees) "aoaDelta": 2 // AoA increment (degrees) } ``` -------------------------------- ### Generate Convergence Plots Source: https://github.com/altairengineering/pyflightscript/blob/master/examples/MeshConvergence/README.md Execute the post-processing script to compile results and generate visualization plots. ```bash python PostProcessConvergence.py ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.