adamspy package

Submodules

adamspy.adamspy module

Functions for manipulating adams files and data

exception adamspy.adamspy.AdmFileError[source]

Bases: Exception

exception adamspy.adamspy.AviewError[source]

Bases: Exception

Raise this error to if a known error occurs in the log file.

adamspy.adamspy.get_log_errors(log_file)[source]

Checks the log file for errors of the type AviewError.

Parameters:log_file (str) – Filename of aview log file (usulally aview.log)
adamspy.adamspy.get_n_threads(adm_file)[source]

Searches adm_file for the NTHREADS statement and returns its value.

Parameters:adm_file (str) – Path to an Adams Dataset (.adm) file
Returns:Number of threads set adm_file
Return type:int
adamspy.adamspy.get_simdur_from_acf(acf_file)[source]

Reads an Adams command file (.acf) and returns the total duration of the simulation.

Parameters:acf_file (str) – Filepath to an Adams message file (.msg)
Raises:RuntimeError – Returned if no simulation end time was found in the specified message file
Returns:Total duration of the simulation
Return type:float
adamspy.adamspy.get_simdur_from_msg(msg_file)[source]

Reads an Adams message file (.msg) and returns the total duration of the simulation.

Parameters:msg_file (str) – Filepath to an Adams message file (.msg)
Raises:RuntimeError – Returned if no simulation end time was found in the specified message file
Returns:Total duration of the simulation
Return type:float
adamspy.adamspy.modify_xmt_path(cmd_file, new_xmt_path)[source]
adamspy.adamspy.set_n_threads(adm_file, n_threads)[source]

Changes or creates the NTHREADS option on the PREFERENCES statement in adm_file.

Parameters:
  • adm_file (str) – File path to an Adams Dataset (.adm) file
  • n_threads (int) – Number of threads to use when running the model specified in adm_file
adamspy.adamspy.solve(acf_file, wait=False, use_adams_car=False)[source]

Runs Adams Solver to solve the model specified in acf_file

Parameters:acf_file (str) – Path to an Adams Command (.acf) File

Module contents

adamspy is a set of python tools for manipulating MSC Adams files and data

Available subpackages

adripy
A set of python tools for manipulating MSC Adams Drill files and data

Available modules

adamspy
Functions for manipulating adams files and data