Analysis Manager > Configure > Miscellaneous
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Miscellaneous
The Miscellaneous configuration is analysis code specific.
MSC Nastran Miscellaneous
After selecting the Miscellaneous option on the menu, the following form appears.
MSC.Marc Miscellaneous
After selecting the Miscellaneous option on the menu, the following form appears.
 
Note:  
When invoked from Patran, items requiring file locations are usually passed directly into the Analysis Manager such as the User Subroutine, POST file, and View Factor file. Thus, in this case, there would be no need to reenter these items.
ABAQUS Miscellaneous
After selecting the Miscellaneous option on the menu, the following form appears.
General Miscellaneous
After selecting the Miscellaneous option on the menu, the following form appears.
 
Note:  
Some examples of General analysis applications are discussed below.
 
Examples of some specific command lines used to invoke analysis codes are given here.
Example 1:
The first example involves the ANSYS 5 code. First the Analysis Preference must be set to ANSYS 5 from Patran’s Analysis Preference form and an input deck for ANSYS 5 must have been generated via the Analysis application (this is done by setting the Action to Analyze, and the Method to Analysis Deck). Then Patran’s Analysis Manager can be invoked from the Analysis main form. Note that a direct submittal from Patran is not feasible in this and the subsequent example.
The jobfile (jobname.prp in this case) is automatically displayed as the input file and the Submit button can be pressed. The jobfile is the only file that is copied over to the remote host with this general analysis submittal capability.
In the host.cfg configuration file the path_name of the executable is defined. The rest of the command line would then look like this:
-j $JOBNAME < $JOBFILE > $JOBNAME.log
If the executable and path defined is as /ansys/bin/ansys.er4k50a, then the entire command that is executed is:
/ansys/bin/ansys.er4k50a -j $JOBNAME < $JOBFILE > $JOBNAME.log
Here the executable is invoked with a parameter (-j) specifying the jobname. The input file ($JOBFILE) is redirected using the UNIX redirect symbol as the standard input and the standard output is redirected into a file called $JOBNAME.log. The variables beginning with the $ sign are passed by Patran’s Analysis Manager. All resulting output files are copied back to the invoking host and directory on completion.
Example 2:
This is a more complicated example where an analysis code needs more than one input file. The general analysis capability in Patran’s Analysis Manager only copies one input file over to the remote host for execution. If more than one file needs to be copied over then a script must be developed for this purpose. This example shows how Patran FEA can be submitted via a script that does the proper copying of files to the remote host.
The Analysis Preference in Patran is set to Patran FEA and, in addition to setting the Preference, the input file suffix is specified as .job. Patran FEA needs three possible input files: jobname.job, jobname.ntl, and an auxiliary input file. The jobname.job file is automatically copied over to the remote host. The auxiliary input file can be called anything and is specified in the jobname.job file.
A shell script called FeaExecute is created and placed on all hosts that allow execution of Patran FEA. This FeaExecute script does the following:
1. Parses the jobname.job file to find the name of the auxiliary input file if it is specified.
2. Copies the auxiliary input file and the jobname.ntl file to the remote host.
3. Execute the FeaControl script which controls actual execution of the Patran FEA job. This is a standard script which is delivered with the Patran FEA installation.
In the Patran Analysis Manager configuration file, the FeaExecute script and its path are specified. The input parameters for this script are:
-j $JOBNAME, -h $P3AMHOST -d $P3AMDIR
which specify the jobname, the host from which the job was submitted and the directory on that host where job was submitted from. With this information the job can be successfully run. The full command that is executed on the remote host is (assuming a location of FeaExecute):
/fea/bin/FeaExecute -j $JOBNAME, -h $P3AMHOST -d $P3AMDIR
The FeaExecute script contents are shown for completeness:
#! /bin/sh
# Script to submit Patran FEA to a remote host via the Analysis Manager
# Define a function for displaying valid params for this script
abort_usage( ) {
	cat 2>&1 <</
Usage: $Cmd -j Jobname -h Remote_Host -d Remote_Dir
/
	exit 1
}
 
# Define a function for checking status
check_status( ) {
	Status=$1
	if [ “$1” -ne 0 ] ; then
		echo “Error detected ... aborting $Cmd”
		exit 2
	fi
}
 
# Define a function for doing a general-purpose exit
exit_normal( ) {
	echo “$Cmd complete”
	exit 0
}
 
# Define a for extracting keyword values from
# the .job file. Convert keyword value to upper case 
GetKeyValue( )
{
	JobFile=${1?} ; Key=‘echo ${2?} | sed ‘s/ //g’‘
	cat $JobFile | sed ‘s/ //g’ | grep -i ‘^’$Key’=’ | \
	sed ‘s/^.*=//’ | tr ‘[a-z]’ ‘[A-Z]’
}
# Define a for extracting keyword values from
# the .job file. Return the correct case for all characters
# (don’t force anything to upper case.)
GetKeyValueCC( )
{
	JobFile=${1?} ; Key=‘echo ${2?} | sed ‘s/ //g’‘
	cat $JobFile | sed ‘s/ //g’ | grep -i ‘^’$Key’=’ | \
	sed ‘s/^.*=//’
}
 
# Define a function to get the Jobname from the jobfilename
#
# # usage: get_Jobname filespecification
#
get_Jobname()
{
	echo $1 | sed -e ‘s;^.*/;;’ -e ‘s;\..*$;;’
}
# Determine the command name of this script
Cmd=‘echo $0 | sed ‘s;^.*/;;’‘
 
# Assign the default argument parameter values
Jobname=’’
Verbose=’’
if [ “<installation_directory>” = ““ ] ; then
 Acommand=”<installation_directory>/bin/FeaControl”
else
 Acommand=”<installation_directory>/bin/FeaControl”
fi
Status=0
 
# Parse through the input arguments.
 
if [ $# -ne 6 ] ; then
 abort_usage
fi
 
while [ $# -ne 0 ] ; do
	case “$1” in
		-j) Jobname=$2 ; shift 2 ;;
		-h) remhost=$2 ; shift 2 ;;
		-d) remdir=$2 ; shift 2 ;;
		 *) abort_usage ;;
	esac
done
# Runtime determination of machine/system type
OsName=‘uname -a | awk ‘{print $1}’‘
case “$OsName” in
	SunOS)
		Rsh=”rsh”
		RshN1=’-n’
		RshN2=’’
		;;
	HP-UX)
		Rsh=remsh
		RshN1=’’
		RshN2=’’
		;;
	AIX)
		Rsh=/usr/ucb/remsh
		RshN1=’’
		RshN2=’-n’
		;;
	ULTRIX)
		Rsh=/usr/ucb/rsh
		RshN1=’’
		RshN2=’-n’
		;;
	IRIX)
		Rsh=rsh
		RshN1=’’
		RshN2=’-n’
		;;
	*)
		Rsh=rsh
		RshN1=’’
		RshN2=’’
		;;
esac
 
# Determine the fully expanded names for the input files.
JobFile=${Jobname}.job
AifFile=‘GetKeyValueCC “$JobFile” “AUXILIARY INPUT FILE”‘
 
# Copy the files over from the remote host
NtlFile=${Jobname}.ntl
lochost=‘hostname‘
curdir=‘pwd‘
if [ “$curdir” = “$remdir” ] ; then
	crap=1
else
	if [ “$remhost” = “$lochost” ] ; then
		cp ${remdir}/${NtlFile} .
		if [ “$AifFile” = ““ ] ; then
			crap=1
		else
			cp ${remdir}/${AifFile} .
		fi
	else
		rcp ${remhost}:${remdir}/${NtlFile} .
		if [ “$AifFile” = ““ ] ; then
			crap=1
		else
			rcp ${remhost}:${remdir}/${AifFile} .
		fi
	fi
fi
 
# Perform the analysis
$Acommand $Jobname ; check_status $? 
 
# Successful exit of script
exit_normal