Run simulation from Command line

Run simulation from Command line

Anonymous
Not applicable
1,035 Views
4 Replies
Message 1 of 5

Run simulation from Command line

Anonymous
Not applicable

Hi All,

 

Is there any documentation that describes syntax to run Simulation Mechanical (or Algor) from the command line?

 

I am trying to use a Process Integration software with Sim Mech so that my process integration software can control Sim Mech and launch a simulation design study that I already created by using a command line syntax.

 

Thanks in advance for any responses.

Reply
Reply
0 Likes
Accepted solutions (1)
1,036 Views
4 Replies
Replies (4)
Message 2 of 5

AstroJohnPE
Advisor
Advisor
Accepted solution

See if this post answers your question: "Run from Command Line".

 

That post describes how to run the processor directly which requires that the model has been meshed and "Analysis > Analysis > Check Model" beforehand. My current batch file includes the commands to solid mesh the model, check model, and perform the analysis. The batch file looks like this (refer to the previous post for a description):

--------------------------------------------------------

 :: solid mesh and run the simulation

  :: use a drive substitution for the folder with the ADSK Sim Mech software
subst K: /d
subst K: "C:\Program Files\Autodesk\Simulation 2014"


  :: use a drive substitution for the folder with the model
subst J: /d
subst J: "C:\Users\jholtz\Documents\Simulations\Knowledge Base\mesh and run"

  :: use a variable for the name of the model.
  :: DO NOT include spaces on either side of the = sign
set "file=mesh and run test model.fem"

  :: mesh each design scenario as necessary
 :: -d # is the design scenario to mesh. 0 indicates "last active"
 :: -f is the .FEM file
 :: -pf indicates to mesh parts based on the .FEM file
 :: -ui-progress indicates to show the meshing progress dialog
 :: -z 1 indicates to solid mesh the parts that have not been meshed
K:\algormeshrun.exe -- -d 1 -f "J:\%file%" -pf -ui-progress -z 1
K:\algormeshrun.exe -- -d 2 -f "J:\%file%" -pf -ui-progress -z 1
K:\algormeshrun.exe -- -d 3 -f "J:\%file%" -pf -ui-progress -z 1
K:\algormeshrun.exe -- -d 4 -f "J:\%file%" -pf -ui-progress -z 1

  :: run the analysis
 :: -s indicates the design scenarios to analyze. All; Active; n,m,o; or n-m
K:\algor.exe -s All "J:\%file%"

--------------------------------------------------------

 

 

Reply
Reply
0 Likes
Message 3 of 5

Anonymous
Not applicable
Thanks! This helps a lot.

That post describes a case where I have already set up a model a certain way and then run it. What if I wanted to change some input parameters or dimensions from the command line and then rerun the simulation, is this possible?

Thanks.
Reply
Reply
0 Likes
Message 4 of 5

AstroJohnPE
Advisor
Advisor

I am not aware of any input that can be changed from a command line. That includes basic numerical input (such as material properties, loads, etc), and more elaborate input such as overall dimensions, mesh, etc. Everything is stored in binary databases (the .fem file, the model.dbf located under the design scenario's .mod folder, and the series of .dbf files that are read by the processors).

 

Maybe someone has a "third party" program that can change things without using the interface. The trick is knowing what information is stored in what database, the format of the database, and the effect of changing that information outside of the interface. For example, material properties could be changed directly in the model.dbf (somewhat easy to accomplish manually by translating the database, etc), and that change would appear in the interface when the model is opened. A dimensional change would be difficult, probably practical for beam and truss models only, and manual changes would not appear when the model is opened.

 

If you want to provide more details about the model and what you want to change, then someone may have a better answer.

Reply
Reply
0 Likes
Message 5 of 5

Anonymous
Not applicable
Hmmm.... Okay.

I don't have a specific model. I am just trying to see how I can integrate it into a Process Integration software. The end goal is to have the Process Integration software redefine any input variables, and then record the output.

So for a high level example, if I was simulating an iPhone, and my performance objectives were to minimize temperature and maximize the stiffness (so it doesnt bend and become flimsy) and I can vary the thickness of the iPhone, the Process Integration software will choose any number of random variables (say 20) within a range of thickness that I define (say 0.5" to 0.75"), change the geometry, run the simulations, and extract the temperature and stiffness outputs from the results files, then I can analyze the data to determine what the optimal thickness will be to optimize both objectives. Does this make sense?

Shayee Senbore
Reply
Reply
0 Likes