pyyeti.nastran.bulk.mknast¶
- pyyeti.nastran.bulk.mknast(script=None, *, nascom='nast9p1', nasopt='batch=no', ext='out', stoponfatal=False, shell='/bin/sh', files=None, before='', after='', top='', bottom='')[source]¶
Creates a shell script for running a chain of Nastran (or other) runs.
Note that all inputs except script must be named and can be input in any order.
- Parameters:
script (string or None; optional) – Name of shell script to create; if None, user is prompted for name.
nascom (string; optional) – Nastran command; note: this can actually specify any program, but nasopt would likely need adjusting too.
nasopt (string; optional) – Options for nastran command
ext (string; optional) – The extension of the Nastran output (F06) file; usually ‘f06’ or ‘out’
stoponfatal (bool; optional) – Set to True if you want the script to exit on first FATAL instead of continuing on
shell (string; optional) – Shell program to write at top of script, eg: #!`shell`
files (string or None; optional) – List of filenames to run; if None, user is prompted for names
before (string; optional) – String to put in shell script before each nastran command
after (string; optional) – String to put in shell script after each nastran command
top (string; optional) – String to put in shell script at the top
bottom (string; optional) – String to put in shell script at the bottom
- Returns:
None
Notes
If you’re in the ‘bash’ shell, the resulting script can be run in the background with, assuming the script name is ‘doruns.sh’:
nohup ./doruns.sh > doruns.log 2>&1 &
Example usage:
from pyyeti import nastran nastran.mknast('doruns.sh', files=['file1.dat', 'file2.dat'])