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

Automating Workbench with excel

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   October 15, 2014, 05:06
Lightbulb Automating Workbench with excel
  #1
Member
 
Join Date: Oct 2014
Posts: 38
Rep Power: 2
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, 20:16
Default
  #2
Senior Member
 
Join Date: Apr 2014
Location: Melbourne
Posts: 182
Rep Power: 3
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, 11:19
Default
  #3
Member
 
Join Date: Oct 2014
Posts: 38
Rep Power: 2
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: 182
Rep Power: 3
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, 20:54
Default
  #5
Senior Member
 
Ashkan Javadzadegan
Join Date: Sep 2010
Posts: 230
Rep Power: 7
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

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 237 May 30, 2015 03:37
FLUENT installation on UBUNTU 12.04 (LTS) teymourj FLUENT 0 August 26, 2013 20:27
ansys workbench interface with excel shree272 ANSYS 0 April 6, 2013 03:48
Block structured hexagonal mesh vs automated tetra mesh inside Workbench for CFD Chander CFX 3 November 27, 2011 17:24
Automating the Named Selctions in WorkBench Mostapha ANSYS Meshing & Geometry 10 June 20, 2011 21:45


All times are GMT -4. The time now is 03:45.