|
[Sponsors] |
January 19, 2017, 07:44 |
bash script information
|
#1 |
Member
Join Date: Apr 2014
Location: N/A
Posts: 50
Rep Power: 12 |
Hey guys,
i'm running simulations on a grid and for that I need a bash-script. But unfortunatelly i'm encountering some problems while searching for information how to write this scripts. For example. Up to now I use the following script to run the simulation. But the simulation doesn't stop when it reaches the maximum step quantity specified in my sim.-file. Which line do i have to add for this? package macro; import java.util.*; import star.common.*; public class macrotest extends StarMacro { public void execute() { execute0(); } private void execute0() { Simulation simulation_0 = getActiveSimulation(); ResidualPlot residualPlot_0 = ((ResidualPlot) simulation_0.getPlotManager().getPlot("Residuals") ); residualPlot_0.open(); simulation_0.getSimulationIterator().run(); } } |
|
January 19, 2017, 16:17 |
|
#2 |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
This should stop with the stopping criterion if they are enabled, check that is the case. There's no need to open the residual plot in batch, you can take those lines out.
Also this is not a Bash script, this is Java. |
|
January 21, 2017, 10:55 |
|
#3 | |
New Member
DL
Join Date: Jun 2016
Posts: 18
Rep Power: 10 |
Quote:
<INSTALL_PATH>/star/bin/starccm+ -np <# of cores> -batch <simulation filename> -licpath <port@licenseserver name> Depending on your simulation needs and the configuration of your grid, use starccm+ -help to review additional options. I suspect you are using a job scheduler, so pay extra attention to the -batchsystem option. The above basic command typically is the last line of the script. You indirectly stated that your shell is bash, but directly that you need a script in bash. #!/bin/bash will be the first line of the script. Make friends with your system administrator(s), as they should be able to help you build the guts of the script based on the details of the grid configuration. Hope that helps and I didn't confuse you too much! |
||
January 21, 2017, 11:37 |
|
#4 | |
Senior Member
Join Date: Nov 2010
Location: USA
Posts: 1,232
Rep Power: 25 |
Quote:
<INSTALL_PATH>/star/bin/starccm+ -np <# of cores> -batch <java script or command> -licpath <port@licenseserver name> <simulation filename> The -batch command takes an argument of a macro or one of the 'simple' commands like run or mesh. The sim filename is an argument to the starccm+ binary. |
||
January 22, 2017, 12:51 |
|
#5 |
New Member
DL
Join Date: Jun 2016
Posts: 18
Rep Power: 10 |
Both commands will work, but me3840 comments are more complete.
I should have been more clear. The macro shared originally only solves the model, and the suggestion is to omit the macro. -batch without any macro or smart arguments (like mesh or run) defaults to run. |
|
January 23, 2017, 11:30 |
|
#6 |
New Member
Max
Join Date: Dec 2010
Posts: 4
Rep Power: 16 |
Both commands will work, but best practice (based on ~8 years of using STAR-CCM+) is that you should have the sim file as your last argument and any macro filename immediately preceeding that.
It matters less now than it used to (i.e. STAR-CCM+ cares a lot less these days about the order of the arguments) but is still good to apply this principle. |
|
January 31, 2017, 12:17 |
|
#7 |
Member
Join Date: Apr 2014
Location: N/A
Posts: 50
Rep Power: 12 |
Thanks guys!
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ANSYS Meshing] Script Model - Mechanical | USER1234 | ANSYS Meshing & Geometry | 33 | September 25, 2015 10:19 |
libz.so.1: no version information available | dmaz | OpenFOAM Running, Solving & CFD | 3 | January 4, 2015 17:54 |
[ANSYS Meshing] Problem with Icem Script | Krish | ANSYS Meshing & Geometry | 0 | October 18, 2011 13:10 |
information from saved data files:Unsteady flow | Atul | FLUENT | 5 | July 27, 2008 21:05 |
TASCflow,problem with script and parallel mode | Zbynek Hrncir | CFX | 0 | October 2, 2001 08:30 |