CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS

Automating Workbench with excel

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 15, 2014, 06:06
Lightbulb Automating Workbench with excel
  #1
Member
 
Join Date: Oct 2014
Posts: 44
Rep Power: 12
kar.coep is on a distinguished road
Hello,
I am trying to drive and automate workbench (opening project file, Design modeler, mesher, setup, postprocessor and customized report generation) with excel. I have just started on it. Has anyone worked on something like this? Even automation of a module (like mesher/designmodeler) would work. Also ansys has capability to record macros/journals..if I create a journal involving excel, where to see its programming?

Any help would be appreciated, as I am just starting out and need to complete it by 2 months.

Thanks.
kar.coep is offline   Reply With Quote

Old   October 21, 2014, 21:16
Default
  #2
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
Hi kar.coep,

I suggest you to go to help section of Ansys and go to "Updating a Workbench Project and Parameters from Excel" in Workbench Scripting Guide.
This guide will help you to start with scripting with excel
Kapi is offline   Reply With Quote

Old   October 22, 2014, 12:19
Default
  #3
Member
 
Join Date: Oct 2014
Posts: 44
Rep Power: 12
kar.coep is on a distinguished road
Thanks Kapi!!! I am going through the guide..
The guide says about updating the workbench file. but I need to create a program from scratch..
Is there a way to manipulate the coding with micros like we can in Excel.. In excel we can create a macro of desired actions and copy it and edit it accordingly.. macros would just give us basics to start with.. can we do that in ansys journaling?
kar.coep is offline   Reply With Quote

Old   October 28, 2014, 21:58
Default
  #4
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14
Kapi is on a distinguished road
Hi kar.coep,

Yes you can do it. You can create a button or any UI which will run the batch file which in turn run workbench journal file.
A .wbjn file typically look like this:

Quote:
# encoding: utf-8
SetScriptVersion(Version="15.0")
template1 = GetTemplate(TemplateName="Mesh")
system1 = template1.CreateSystem()
geometry1 = system1.GetContainer(ComponentName="Geometry")
geometry1.Edit()
script = open('geometry.js', 'r')
geometry1.SendCommand(Command=script.read())
script.close();
geometry1.Exit()
component1 = system1.GetComponent(Name="Mesh")
component1.Refresh()
mesh1 = system1.GetContainer(ComponentName="Mesh")
mesh1.Edit()
script = open('mesh.js', 'r')
mesh1.SendCommand(Command=script.read())
script.close();
mesh1.Exit()
This WBJN file then go into respective geometry and mesh javascripts to execute the command to give you final mesh.

Hope this helps.

You can go to Ansys website and look for documents on scripting. These documents detail lot many things which is not thr in HELP section.


Cheers,
Kapi
Kapi is offline   Reply With Quote

Old   May 7, 2015, 21:54
Default
  #5
Senior Member
 
Ashkan Javadzadegan
Join Date: Sep 2010
Posts: 255
Rep Power: 17
ashtonJ is on a distinguished road
Hi Kar,

Just wondering if you had any luck in automating workbench with excel. If yes, I would be very grateful if you would let me know how to do it.

Thanks
AshtonJ
ashtonJ is offline   Reply With Quote

Reply

Tags
automation, excel, python


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 289 April 20, 2023 10:23
FLUENT installation on UBUNTU 12.04 (LTS) teymourj FLUENT 2 March 1, 2017 23:24
Automating the Named Selctions in WorkBench Mostapha ANSYS Meshing & Geometry 11 August 11, 2015 17:27
ansys workbench interface with excel shree272 ANSYS 0 April 6, 2013 04:48
Block structured hexagonal mesh vs automated tetra mesh inside Workbench for CFD Chander CFX 3 November 27, 2011 17:24


All times are GMT -4. The time now is 13:08.