|
[Sponsors] |
[ANSYS Meshing] Automatic mesh generation by batch file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 19, 2013, 18:36 |
Automatic mesh generation by batch file
|
#1 |
New Member
Neal
Join Date: Sep 2013
Posts: 4
Rep Power: 13 |
I currently have a parameterized geometry and mesh file in work bench that I change the parameters on to run multiple cases. I would like to instead have a batch file that generates the geometry and mesh for me with named selections that can be imported by another batch file into a CFX Pre and run by command lines in a third batch file.
I have a starting point to look at the coding for the Pre and solver batch files because i can use the command line editor in Pre. I am somewhat lost as to where to find information on generating geometry and mesh from a batch command. Any suggestions where to look or directions to some appropriate guides would be appreciated. |
|
September 20, 2013, 03:28 |
|
#2 |
New Member
Join Date: Sep 2012
Posts: 26
Rep Power: 14 |
Hello Neal,
I don't know if you have found this site, that describes how to work with workbench and excel. http://www.padtinc.com/blog/the-focu...el-with-python You can use the same technique using batch files. But working with parameterized geometry and mesh i prefer using excel. If you want to automatize the generation of Mesh and Geometry from the scratch you will have to use JScript for Designmodeler and Mesher, which is barely documented. Regardless if you just want to change your parameters, update your geometry and mesh, export it as .meshdat and start the simulation you can use the IronPython from Workbench, which is documented in the ANSYS help. If you want to export it in the mesh in another format please take a look here http://www.cfd-online.com/Forums/ans...ia-script.html Greets Nigirim |
|
September 20, 2013, 09:11 |
|
#3 |
Member
vidyanand
Join Date: Nov 2011
Location: bangalore,india
Posts: 66
Rep Power: 18 |
paramtrci model is easy Design model becuase it directly linked with excel or you can make parmetric model easily,if its prameter in CAD geometry then A complier is require to transfer the parameter from CAD to Design modeler,Even ANSYS mesh also content the parametric mesh (like size fuction ),even you can parmeter in FLUENT for BC
|
|
September 23, 2013, 14:28 |
|
#4 |
New Member
Neal
Join Date: Sep 2013
Posts: 4
Rep Power: 13 |
The way i understand the link you provided it requires workbench already being open and i start doing things in workbench. This will not work for what i need. I need to have a third program start workbench or the individual components and pass information to them to update to a new geometry and mesh file. Using excel shouldnt be an issue but im not sure how to have my third program start the journal file/script execution in workbench.
(the third party software is called Isight by 3DS and is being used for optimization) |
|
September 24, 2013, 13:15 |
|
#5 |
New Member
Join Date: Sep 2012
Posts: 26
Rep Power: 14 |
Hi nealm,
you can start Workbench via batch file, load a workbenchproject and run a script. Code:
retval = Shell(“C:\Program Files\Ansys Inc\V130\Framework\bin\win64\runwb2 \ -X -R updateWB2.py -F ExcelTower1.wbpj”, vbNormalFocus) End Sub -F PATH should open a workbenchprojectfile, -R PATH should run a journal or pythonscript after workbench is started -X closes Workbench and all other Workbenchapplications if the journal or pythonscript is done. The pythonscript can open and close every Workbenchapplication, update the project and all the other stuff Workbench is able to do. Regarding Python or journals, this is documented in ANSYS Help. If you want to change something in Designmodeler or the Mesher you need to use JScript macros for those two, this is not documented by ANSYS. Hope this helps Greets Nigirim |
|
April 1, 2014, 19:59 |
|
#6 |
Senior Member
Join Date: Apr 2014
Location: Melbourne
Posts: 584
Rep Power: 14 |
Hi Nealrm,
You can create a batch file and run the following code "C:\Program Files\ANSYS Inc\v130\Framework\bin\Win64\RunWB2.exe" -I -R file_name.wbjn Once you run this .bat file, it will open up a new project, go into your directory and run the specified .wbjn file you want. Hope this helps Cheers Kapi |
|
Tags |
batch, geometry preparation, mesh generation |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] mesh airfoil NACA0012 | anand_30 | OpenFOAM Meshing & Mesh Conversion | 13 | March 7, 2022 18:22 |
how to calculate mass flow rate on patches and summation of that during the run? | immortality | OpenFOAM Post-Processing | 104 | February 16, 2021 09:46 |
[swak4Foam] Error bulding swak4Foam | sfigato | OpenFOAM Community Contributions | 18 | August 22, 2013 13:41 |
ParaView Compilation | jakaranda | OpenFOAM Installation | 3 | October 27, 2008 12:46 |
error while compiling the USER Sub routine | CFD user | CFX | 3 | November 25, 2002 16:16 |