Macro Utils v3.

Each topic contains a file uploaded by the creator. Browse, upload, download and comment on new and existing files.

Macro Utils v3.

Postby frkasper » Thu Dec 26, 2013 5:05 pm

Macro Utils is a set of useful methods to assist the process of writing macros in STAR-CCM+. One can think of it as a high level way of writing macros, i.e., a high level API. Since version 3 is being distributed as MacroUtils.jar file, javadoc folder and MacroUtils.java source code. There are some Demos available in separate topics as well.

I invite you to Image the Macro Utils fan page on Facebook.

Instructions on how to use or to code with Macro Utils are included in the index.html file provided within the javadoc folder. Some Demos are given in this Forum too, listed as follows:

Latest version is v3.3 and can be downloaded here.

Happy coding! :mrgreen:
Fabio Kasper
User avatar
frkasper
 
Posts: 154
Joined: Mon Dec 12, 2011 5:55 pm

Macro Utils v3.0 build 23.

Postby frkasper » Thu Dec 26, 2013 5:14 pm

Dear MacroHutters, :D

Macro Utils is changing along side with STAR-CCM+ so this release has lots of new things and some code clean up. After all, this .java file is getting huge. :o

Summarized list of changes:
  • Changed to Library and created .jar file;
  • Changed from Collections and Vectors to ArrayLists. That's right. STAR-CCM+ API methods work whether with Collections or Vectors, which are considered obsolete by Netbeans. ArrayLists are more modern and can accommodate the other two;
  • Previous Collections and Vectors public variables were deprecated. Introduced other ones as ArrayLists. E.g.: geometries, namedObjects, regions, boundaries, etc...;
  • Deleted Deprecated methods in v2d;
  • Added: createUpdateEvent();
  • Added: getUpdateEvent(Plots, Scenes);
  • Added: setUpdateEvent(Plots, Scenes);
  • Added: addTags();
  • Added: 3D-CAD Simple Shapes -- Block and Cylinder;
  • Added: Parts Based Mesh (PBM) Operations -- Drected Meshing, Automated Mesh, Surface Wrapper, etc...;
  • Added: Streamlines creation.
  • Improved: prettifyMe();
  • Improved: Little by little changing specific variable types to parent variable types;

Requirement is STAR-CCM+ v8.06 mainly because of PBM.

Have fun. :lol:
Please login or register to access and download the files attached to this post.
Fabio Kasper
User avatar
frkasper
 
Posts: 154
Joined: Mon Dec 12, 2011 5:55 pm

Re: Macro Utils v3.

Postby akimbrell » Wed Apr 16, 2014 5:17 pm

Fabio,

Thank you for developing MacroUtils, I have gotten good use out of your methods and in the process learned some good Java coding practices.

I have a quick question - since v8.06, we have the option to use the Simulation Assistant. Have you gotten MacroUtils to work with the Simulation Assistant? Obviously I could copy methods within the overall MacroUtils package and paste into the Sim Assistant module but I was hoping I could simply include the library and get access to the MacroUtils methods.

If you have any insight I would be interesting in learning how one might integrate the two packages.

Thanks
akimbrell
 
Posts: 9
Joined: Tue Jun 29, 2010 12:45 pm

Re: Macro Utils v3.

Postby frkasper » Thu Apr 17, 2014 5:56 pm

Hi akimbrell,

Although I haven't coded any Sim Assistant (SA) yet one of the motivations of turning Macro Utils into a .jar file was exactly to work as a library. However, quickly loading a HelloWorld.java example I wasn't able to initialize MacroUtils in the SA.

So something is definitely missing. Please Copy/Paste the methods you want for now and let me try to fix this in the next release. Or, if you figure out a way to do it please let me know, ok?

Thanks for getting it to my attention. I'm glad some people are using this as an additional resource for their own macros. ;)

Regards,
Fabio Kasper
User avatar
frkasper
 
Posts: 154
Joined: Mon Dec 12, 2011 5:55 pm

Macro Utils v3.1 build 71.

Postby frkasper » Sun Jun 08, 2014 9:34 pm

Howdy,

It took a while but here goes a good update.

Summarized list of changes:
  • Deleted Deprecated methods in v3.0 and fixed bugs
  • Added: createDerivedPart_Isosurface()
  • Added: createDerivedPart_Line()
  • Added: createDerivedPart_Point()
  • Added: createMonitor_FieldMean()
  • Added: createPhysicsContinua()
  • Added: createPlot_XY()
  • Added: createReportPressureDrop()
  • Added: createReportSum()
  • Added: getLegend()
  • Added: getScalarDisplayQuantity()
  • Added: getDerivedPart()
  • Added: getVectorDisplayQuantity()
  • Added: getVisTransform()
  • Added: createShapePartCone()
  • Added: set/getMeshBaseSize()
  • Added: setBC_FieldFunction()
  • Added: setBC_Values()
  • Added: setColormap() and a few more built-in Colormaps.
  • Added: setMaterialProperty()
  • Improved: createShapePartCylinder()
  • Improved: evalGCI()
Requirement is still STAR-CCM+ v8.06 libs. It also works with v9.02 and v9.04.

Have fun! :lol:
Please login or register to access and download the files attached to this post.
Fabio Kasper
User avatar
frkasper
 
Posts: 154
Joined: Mon Dec 12, 2011 5:55 pm

Macro Utils v3.2 build 79.

Postby frkasper » Wed Mar 25, 2015 2:20 pm

Howdy,

There has been a long while. I decided to share a small update:

Summarized list of changes:
  • Added: _initUtilsNonIntrusive()
  • Improved: Some new general methods are being added in order to save lines in the future. Using more primitive variables such as NamedObject's.
  • Removed: Deprecated methods in v3.1.

Requirement are STAR-CCM+ v10.02 libs.

It is worth mentioning that there is a current bug that avoids setting the camera position when a Scene is created by a macro. This shall be fixed soon in STAR-CCM+ and things will get back to normal in this API here as well.

Another motivation for future releases of Macro Utils is to moving away from Mesh Continuas, as STAR-CCM+ is more and more Parts Based driven on every new release.

In this update, the compilation of all Demos released so far are shared here too. Only the .java files. The supporting files can be found in each specific post.

Have fun! :lol:
Please login or register to access and download the files attached to this post.
Fabio Kasper
User avatar
frkasper
 
Posts: 154
Joined: Mon Dec 12, 2011 5:55 pm

Re: Macro Utils v3.

Postby chaituu1729 » Thu Jun 11, 2015 5:05 pm

hi,
I am getting the some errors (related to buildpath) in MacroUtils.java I added the given Macroutils.jar to the project libraries and using the files Demo1_Flow_In_a_Pipe.java and MacroUtils.java given in viewtopic.php?f=4&t=350
Please login or register to access and download the files attached to this post.
chaituu1729
 
Posts: 1
Joined: Wed Jun 10, 2015 11:34 pm

Re: Macro Utils v3.

Postby frkasper » Thu Jul 16, 2015 11:13 am

Hi chaituu1729,

Your picture suggests that you haven't mapped the STAR-CCM+ libraries into your IDE. Which IDE is this one, btw?

Hope this helps.
Fabio Kasper
User avatar
frkasper
 
Posts: 154
Joined: Mon Dec 12, 2011 5:55 pm

MacroUtils v3.3 build 94.

Postby frkasper » Fri Dec 18, 2015 4:57 pm

Dear all,

Again, it has been a little while but MacroUtils kept firm and strong :!: . I'm still using it in a weekly basis and updating the API as my projects demand for it. I am sharing an update, in which the list of changes can be seen below:

  • Deprecated a few unused methods and removed the ones deprecated in v3.2;
  • Added: enableAutoSave();
  • Added: enableTrimmerWakeRefinement();
  • Added: getActiveScene();
  • Added: getCellCount();
  • Added: getGeometryObjects();
  • Added: getUpdateEvent();
  • Added: PISO Support;
  • Added: printRegionsCellCount();
  • Added: removeNonContiguousCells();
  • Added: repair_ZipAllFreeEdges();
  • Added: sayObject() and sayObjects();
  • Added: sayValue();
  • Added: support for a few more Mesh Operations, such as 2D Meshing and Discrete Imprint;
  • Improved: AddTags() is now Public;
  • Improved: createPhysicsContinua();
  • Improved: Javadoc parameters;
  • Improved: mesh operations controls;
  • Improved: set the Locale to English to avoid issues with decimals in STAR-CCM+ in other languages;
  • Improved: support of Custom Controls in PBM;
  • Improved: updateSolverSettings();
  • Removed: sayNamedObjects().

Requirements are STAR-CCM+ v10.04 libs. Although it was tested in v10.06 as well.

When setting the camera position when a Scene is created by a macro, this is still a bug. It was working OK in v10.04 but then reappeared in v10.06. Hope this is fixed in the v11 series.

Similar to the last update, the compilation of all Demos released so far are shared here too. Only the .java files. The supporting files of each demo can be found in each of their specific posts.

Have fun! :lol:
Please login or register to access and download the files attached to this post.
Fabio Kasper
User avatar
frkasper
 
Posts: 154
Joined: Mon Dec 12, 2011 5:55 pm

Re: Macro Utils v3.

Postby kenedy » Thu Feb 04, 2016 5:40 pm

Its really good post you have shared here.Well done :!: :!:
Graduated from Soran University with First Class Degree with Honours in Computer Science.
kenedy
 
Posts: 1
Joined: Tue Feb 02, 2016 8:11 am


Return to Upload / Download Files

Who is online

Users browsing this forum: No registered users and 3 guests

cron