March 19, 2021 at 11:37 amramiromenaSubscriberDear Ansys Learning Forum Team,nI managed to create two independent Python scripts (one for SpaceClaim to generate the geometry and another to setup a Steady state thermal case).nThanks to your post , I was able to join and execute both scripts from Workbench by following the provided instructions as a mainScript.nHowever, I would like to have more flexibility on my mainScript. My question is:nQ: Maybe there is a way to add the initial scripts as python functions or similar? ( so that I will pass an argument before execute them?)nI am asking because I will need to control the script in the following way:n(A) to control the simulation setup (as meshingn( to run multiple analyses with the same setup (defined on the thermal script) but with an APDL that takes an external file as an input, which will act as a predefined load.nFor case ( as a work-around option, I was thinking to add the system of External Data each time and defining there the file, but I would prefer the function style (in order to minimize the numbers of systems in the mainScript).nThank you in advance.nRamiron https://forum.ansys.com/discussion/19206/run-mechanical-macro-from-workbench?n
March 24, 2021 at 3:57 pmAniketAnsys EmployeeFor A: You can write a text file based on your arguments and then later read this file for sendcommand nFor B: Would't it be easier to automate APDL directly instead of opening workbench?n-AniketnHow to access Ansys help linksnGuidelines for Posting on Ansys Learning Forumn
March 25, 2021 at 3:57 pmramiromenaSubscribernThank you for your reply.nAt the moment, I will explore your suggestion for option A, as I have previous experience working with python scripts.nRegarding option B, I am interested on using Workbench because I need to run a parametric analysis that first solve the problem in Mechanical and then, it uses the result as an input for Fluent. I solved already the problem manually, so now I am trying to write a script to automatize the process.nRegards,nRamiron
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- Solver Pivot Warning in Beam Element Model
- Colors and Mesh Display
- whether have the difference between using contact and target bodies
- What is the difference between bonded contact region and fixed joint
- How to calculate the residual stress on a coating by Vickers indentation?
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- User manual
© 2023 Copyright ANSYS, Inc. All rights reserved.