Jump to content
Mr. Neukam Johannes

hard coded path for stl and result csv with Star CCM+

Recommended Posts

Hi,

 

I tried to do some runs with sobol and manuel tests. My Java script has the paths to both the stl and the path to the result hard coded, which is not that bad for the stl, but will always overwrite the results of one simulation. The export option for imported java scripts into CAESES does remove the whole path of the stl file and leaves only " partImportManager_0.importStlPart(resolvePath("rohstl.stl"), "OneSurfacePerPatch", units_0, true, 1.0E-5);" Running starccm on windows it is then not able to find the stl.

 

How do you actually add a result file for optimization, when it is not yet created and neither is the folder structure you might find them in?

 

kind regards

Johannes

Share this post


Link to post
Share on other sites

Hi Johannes,

 

Usually you don't need to care about paths in CAESES.

CAESES automatically executes the integrated software (StarCCM+ in your case) in a certain result folder and that is where the software expects all input files to resist and where it then stores the results files. So you just have to deal with file names, not with the paths.

 

Result files (as well as input files which need to be manipulated for each run) are handled as "templates" in CAESES. Have you checked the tutorial "External Software" yet? The document explains nicely how the parts of a software connection work and how to set them up. You find it in the Documentation Browser of CAESES: Tutorials/Getting Started/External Software

 

I would suggest:

- Remove the path of the stl file which is hard coded in your java script file. Just leave the file name there. (If necessary you can also add a relative path, e.g /subdir/filename.ext)

- Do the same for the result file(s).

- Add all needed input (stl, js) and output (results) files to your Software Connector.

- Set the executable (StarCCM+) in the Computation of the Software Connector.

- Set up a value which should be read from the result file and create a parameter with this value. You can do that in the results template you have just added to the Software Connector.

- Use the parameter as evaluation in the Sobol design engine.

- Now run the Sobol design engine.

The parameter then tries to extract its value from the (yet not existing) result file which triggers StarCCM to run and produce that very file.

 

Cheers

Ben

Share this post


Link to post
Share on other sites

Hi,

 

thank you for your help. I had a closer look at the java script and the error that showed turned out to be related to the renaming of the stl to be imported. After fixing this, import without path worked like a charm.

 

kind regards,

Johannes

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...