ansys.dyna.core.run.local_solver#
Attributes#
Functions#
|
Return the runner for the job. |
|
Run the Ls-Dyna solver with the given input file. |
Module Contents#
- ansys.dyna.core.run.local_solver.run_dyna(input: str | object, **kwargs) str [source]#
Run the Ls-Dyna solver with the given input file.
- Parameters:
- input
str
orobject
Either the path to a dyna keyword file or an instance of
ansys.dyna.keywords.Deck
.- **kwargs
dict
- mpi_optionint
The mpi option to use. Choose from the values defined in
MpiOption
. Defaults to MpiOption.SMP.- precisionint
Floating point precision. Choose from the values defined in
Precision
. Defaults to Precision.DOUBLE.- versionstr
Version of Ansys Unified installed to use. Defaults to: TODO (find the latest one?).
- executablestr
Optional and Linux-Only: The name of the DYNA solver executable. Default is s based on the value of the
mpi_option
argument. On linux: it can be the full path. Also on linux, ansys-tools-path can be used to save a custom location of a dyna executable so that it doesn’t need to be set here each time.- ncpuint
Number of cpus. Defaults to 1.
- memoryint
Amount of memory units, as defined by memory_unit for DYNA to use. Defaults to 20.
- memory_unitint
Memory unit. Choose from the values defined in
MemoryUnit
. Defaults to MemoryUnit.MB.- working_directorystr
Working directory. If the input parameter is a path to the input file, defaults to the same folder as that file. Otherwise, the job is run in a new folder under $TMP/ansys/pydyna/jobs.
- containerstr
DockerContainer to run LS-DYNA in.
- container_envdict()
Environment variables to pass into the docker container.
- streambool
Currently only affects runs using the container option. If True, the stdout of solver is streamed to python’s stdout during the solve. If False, the solver stdout is printed once after the container exits. Defaults to True.
- input
- Returns:
- result
str
The working directory where the solver is launched. If stream is False and container is set, returns the stdout of the run
- result