-
-
October 26, 2018 at 7:25 pm
aacius1
SubscriberHello,
I am working to connect Matlab 2016b with Ansys Workbench. I have downloaded the -aas toolbox and installed it into matlab. I have successfully captured the fluent coupling and the Mechanical APDL coupling. There are instructions with the toolbox to couple with workbench but I cannot seem to get it to work. I have attached the aas instruction sheet.
Following the instruction on page 4 of the attached PDF, I went into to command prompt and went to run the "runwb2" .bat file with the extensions the instructions suggest as an example. Not sure how to determine if the example write out is appropriate or not.
Specifically I need to create a aaS_Wbld.txt file that will allow the link to happen. Everything I can find states that the file needs to be made but not how to get it.
I have already reviewed the popular ansys blog How to Make Matlab apps. It is not helpful in determining how to actually get the aas keys made, it just states to go make them.
Any help on this would be greatly appreciated.
-
October 26, 2018 at 8:16 pm
Karthik R
AdministratorHello,
As ANSYS employees, we will not be able to open any attached files. Could you please post the instructions you are talking about as screenshots? If this does not work, could you please point us to the link where you found this document? We would like to understand your question better.
If you have not see these already, here are some resources which might be of some help to you.
https://forum.ansys.com/forums/topic/download-matlab-toolbox-ansysaas/
https://www.ansys.com/blog/how-to-make-matlab-apps-for-ansys/
Also, I am moving this post to 'Structural Mechanics' for more traction.
I hope this helps.
Best Regards,
Karthik
-
October 26, 2018 at 9:10 pm
aacius1
SubscriberThanks for the response Karthik
You're first link was helpful to me earlier today as it explains how to find Fluent and MAPDL. The suggestions by the Admin at the end of the thread on using workbench were how to call workbench in matlab. You'll notice step 3 of the admins suggestions calls aaS-Wbld.txt. That's the file I need to get Ansys to create. I have already gotten MAPDL and Fluent to make respective files for their uses.
Unfortunately the 2nd link only states that the .txt file Im trying to get should be made, not how to make it
The instructions state that for workbench you should add the below to the standard workbench command
-I -E "with open('aaS_Wbld.txt','w') as file:file.write(Server.StartServer('localhost',0,9000,9200))"
I assumed that this meant I should call workbench from the windows command prompt. I used the following line...
C:Program FilesANSYS Incv162FrameworkbinWin64rubwb2 -I -E "with open('aaS_Wbld.txt','w') as file:file.write(Server.StartServer('localhost',0,9000,9200))"
I found that this would open workbench but I would receive an error that stated there was a unexpected syntax ":" and would point at 'w' near the beginning of the extra command.
Ansys Student also has youtube files on how to get MAPDL and Fluent set up but not workbench. If we figure this out, I'm sure it would help a lot of people if another video was added
Thanks
Aric
-
October 29, 2018 at 1:17 pm
Gary Stofan
Ansys Employee
Example:
Create a batch file in your home folder, i.e. C:usersjsmith
Double click the batch file. WB will start, and the aaS_WbId.txt will be created
Note: The 2nd command is a single line.
myRunWB.cmd
@echo off
"C:Program FilesANSYS Incv190FrameworkbinWin64runwb2.exe" -I -E "with open('aaS_WbId.txt','w') as file:file.write(Server.StartServer('localhost',0,9000,9200))"
-
October 29, 2018 at 7:47 pm
aacius1
SubscriberHey Gary_S
Hopefully you won't mind but I have another question since you got me past that first roadblock. Once I open up Workbench with this, and follow the method of connecting matlab to workbench by putting the following into Matlab:
orb=initialize_orb()
load_ansys_aas;
actwbserver(C
Users/me/aaS_WbId.txt')
Everything seems to be going fine.
When I enter in the next commands as suggested by the instructions I get JAVA errors. The command and error are below.
Whenever I use execwbcommand(' ') I get the same error. My understanding was that it should work in a similar way to regular ansys script commands.
-
April 12, 2019 at 6:57 pm
Meru
Subscriber
Example:
Create a batch file in your home folder, i.e. C:usersjsmith
Double click the batch file. WB will start, and the aaS_WbId.txt will be created
Note: The 2nd command is a single line.
myRunWB.cmd
@echo off
"C:Program FilesANSYS Incv190FrameworkbinWin64runwb2.exe" -I -E "with open('aaS_WbId.txt','w') as file:file.write(Server.StartServer('localhost',0,9000,9200))"
Hello,
while running this bat file I am able to create a txt file called aaS_WbId.txt but this file is blank and there is no key in it. could you help me in overcoming this hurdle?
also when I initiate connection with in matlab by actwbserver('aaS_WbId.txt') command I am getting a java error
could you please help me
Thank you
Meru
-
- You must be logged in to reply to this topic.

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.

Ansys Blog
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
- An Unknown error occurred during solution. Check the Solver Output…..
- Understanding Force Convergence Solution Output
- Solver Pivot Warning in Beam Element Model
- Colors and Mesh Display
- How to calculate the residual stress on a coating by Vickers indentation?
- whether have the difference between using contact and target bodies
- What is the difference between bonded contact region and fixed joint
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- User manual
-
2524
-
2066
-
1281
-
1096
-
459
© 2023 Copyright ANSYS, Inc. All rights reserved.