abaqus
The micromechanical model command line interface, run with python -m micromechanical
or micromechanical
.
ABAQUS_UMAT_SUBROUTINE_TEMPLATE
module-attribute
ABAQUS_UMAT_SUBROUTINE_TEMPLATE = '#include "{include_file}"\n\n// Please add the following include directories for your C/C++ compiler:\n//\n// {includes}\n\nnamespace mm = micromechanical;\n\nextern "C" void umat(double* stress, double* statev, double* ddsdde, double* sse, double* spd, double* scd, double* rpl,\n double* ddsddt, double* drplde, double* drpldt, double* stran, double* dstran, double* time,\n double* dtime, double* temp, double* dtemp, double* predef, double* dpred, char* cmname, int* ndi,\n int* nshr, int* ntens, int* nstatv, double* props, int* nprops, double* coords, double* drot,\n double* pnewdt, double* celent, double* dfgrd0, double* dfgrd1, int* noel, int* npt, int* layer,\n int* kspt, int* jstep, int* kinc) {{\n model = mm::{model_class}<double>(mm::ContactLawType::{contact}, mm::Material<double>::{props_meth}(props), {npv}, {radius});\n {post_setup}\n model.umat(dstran, stress, statev, ddsdde, *jstep == 1 && *kinc == 1);\n}}\n'
ABAQUS_VUMAT_SUBROUTINE_TEMPLATE
module-attribute
ABAQUS_VUMAT_SUBROUTINE_TEMPLATE = '#include "{include_file}"\n\n// Please add the following include directories for your C/C++ compiler:\n//\n// {includes}\n\nnamespace mm = micromechanical;\n\nextern "C" void vumat(int* nBlock, int* nDir, int* nShr, int* nStatev, int* nFieldV, int* nProps, int* jInfoArray,\n double* stepTime, double* totalTime, double* dtArray, char* cmName, double* coordMp,\n double* charLength, double* props, double* density, double* strainInc, double* relSpinInc,\n double* tempOld, double* stretchOld, double* defGradOld, double* fieldOld, double* stressOld,\n double* stateOld, double* enerInternOld, double* enerInelasOld, double* tempNew,\n double* stretchNew, double* defGradNew, double* fieldNew, double* stressNew, double* stateNew,\n double* enerInternNew, double* enerInelasNew) {{\n model = mm::{model_class}<double>(mm::ContactLawType::{contact}, mm::Material<double>::{props_meth}(props), {npv}, {radius});\n {post_setup}\n model.vumat(*nBlock, strainInc, stressOld, stressNew, stateOld, stateNew, *totalTime - *stepTime < 1e-6);\n}}\n'
AbaqusCLI
Bases: AbqpyCLI
Abaqus command line interface.
job
classmethod
job(
*,
output: str | PathLike,
includes: str | None = None,
script: str | PathLike | None = None,
input: str | PathLike | None = None,
user: str | PathLike | None = None,
post: str | PathLike | None = None,
vis: str | PathLike | None = None,
overwrite: bool = False,
compile: bool = False,
clear: bool = False,
job: str | None = None,
submit: bool = True,
analysis: Literal["select", "odb", "state", "all"] | None = None,
datacheck: Literal["select", "odb", "state", "all"] | None = None,
parametercheck: Literal["select", "odb", "state", "all"] | None = None,
continue1: Literal["select", "odb", "state", "all"] | None = None,
convert: Literal["select", "odb", "state", "all"] | None = None,
recover: (
Literal[
"environment",
"local",
"memory",
"release",
"support",
"system",
"all",
]
| None
) = None,
syntaxcheck: (
Literal[
"environment",
"local",
"memory",
"release",
"support",
"system",
"all",
]
| None
) = None,
information: (
Literal[
"environment",
"local",
"memory",
"release",
"support",
"system",
"all",
]
| None
) = None,
uniquelibs: str | None = None,
oldjob: str | None = None,
fil: Literal["append", "new"] | None = None,
globalmodel: str | None = None,
cpus: int | None = None,
parallel: Literal["domain", "loop"] | None = None,
domains: int | None = None,
dynamic_load_balancing: Literal["on", "off"] | None = None,
mp_mode: Literal["mp", "threads"] | None = None,
threads_per_mpi_process: int | None = None,
standard_parallel: Literal["all", "solver"] | None = None,
gpus: int | None = None,
memory: str | None = None,
interactive: bool = True,
double: Literal["explicit", "both", "off", "constraint"] | None = None,
scratch: str | None = None,
output_precision: Literal["single", "full"] | None = None,
resultsformat: Literal["odb", "sim", "both"] | None = None,
port: int | None = None,
host: str | None = None,
csedirector: str | None = None,
timeout: int | None = None,
unconnected_regions: Literal["yes", "no"] | None = None,
noFlexBody: bool | None = None,
license_type: Literal["token", "credita"] | None = None,
ssd_split: int | None = None,
ssd_partition: int | None = None,
**fmt_specs
)
Run an Abaqus simulation.
PARAMETER | DESCRIPTION |
---|---|
output
|
Path to the output directory.
TYPE:
|
includes
|
Paths to directories containing include files which will be added in the
TYPE:
|
script
|
Path to the Abaqus/Python script to run before the simulation.
TYPE:
|
input
|
Path to the Abaqus input file to run. If not specified, an input file will be searched for in the output
directory, typically generated by the Abaqus/Python script specified by
TYPE:
|
user
|
Path to the Abaqus user subroutine to compile and run.
TYPE:
|
post
|
Path to the Abaqus/Python script to run after the simulation.
TYPE:
|
vis
|
Path to the Python script to run after the simulation to visualize the results. Note that this script will be run with the local Python interpreter instead of the Abaqus/Python interpreter.
TYPE:
|
overwrite
|
Whether to overwrite the files in the output directory.
TYPE:
|
compile
|
Whether to compile the user subroutine before running the simulation.
TYPE:
|
clear
|
Whether to remove temporary files after the simulation.
TYPE:
|
job
|
Name of the job.
TYPE:
|
submit
|
Whether to submit the job to Abaqus.
TYPE:
|
analysis
|
See the Abaqus documentation for details.
TYPE:
|
datacheck
|
See the Abaqus documentation for details.
TYPE:
|
parametercheck
|
See the Abaqus documentation for details.
TYPE:
|
continue1
|
See the Abaqus documentation for details.
TYPE:
|
convert
|
See the Abaqus documentation for details.
TYPE:
|
recover
|
See the Abaqus documentation for details.
TYPE:
|
syntaxcheck
|
See the Abaqus documentation for details.
TYPE:
|
information
|
See the Abaqus documentation for details.
TYPE:
|
uniquelibs
|
See the Abaqus documentation for details. |
oldjob
|
See the Abaqus documentation for details. |
fil
|
See the Abaqus documentation for details. |
globalmodel
|
See the Abaqus documentation for details. |
cpus
|
See the Abaqus documentation for details. |
parallel
|
See the Abaqus documentation for details. |
domains
|
See the Abaqus documentation for details. |
dynamic_load_balancing
|
See the Abaqus documentation for details. |
mp_mode
|
See the Abaqus documentation for details. |
threads_per_mpi_process
|
See the Abaqus documentation for details. |
standard_parallel
|
See the Abaqus documentation for details. |
gpus
|
See the Abaqus documentation for details. |
memory
|
See the Abaqus documentation for details. |
interactive
|
See the Abaqus documentation for details. |
double
|
See the Abaqus documentation for details. |
scratch
|
See the Abaqus documentation for details. |
output_precision
|
See the Abaqus documentation for details. |
resultsformat
|
See the Abaqus documentation for details. |
port
|
See the Abaqus documentation for details. |
host
|
See the Abaqus documentation for details. |
csedirector
|
See the Abaqus documentation for details. |
timeout
|
See the Abaqus documentation for details. |
unconnected_regions
|
See the Abaqus documentation for details. |
noFlexBody
|
See the Abaqus documentation for details. |
license_type
|
See the Abaqus documentation for details. |
ssd_split
|
See the Abaqus documentation for details. |
ssd_partition
|
See the Abaqus documentation for details. |
fmt_specs
|
Specifications for formatting the files specified by
DEFAULT:
|
AbaqusSubroutineCLI
Abaqus user subroutine command line interface.
compile
classmethod
compile(
user: str | PathLike,
*,
output: str | PathLike = None,
includes: str | None = None,
overwrite: bool = False,
**fmt_specs
)
Compile the Abaqus user subroutine.
PARAMETER | DESCRIPTION |
---|---|
user
|
Path to the Abaqus user subroutine to compile.
TYPE:
|
output
|
Path to the output directory where the compiled user subroutine will be saved, defaults to the current working directory.
TYPE:
|
includes
|
Paths to directories containing include files which will be added in the
TYPE:
|
overwrite
|
Whether to overwrite the files in the output directory.
TYPE:
|
fmt_specs
|
Specifications for formatting the file specified by
DEFAULT:
|
generate
classmethod
generate(
model: AvailableMicromechanicalModels,
contact: AvailableContactModels,
*,
output: str | PathLike,
type: Literal["umat", "vumat"] = "umat",
npv: float = 1000000000.0,
radius: float = 0.00065,
fabric_type: AvailableFabricTypes | None = None,
fabric_evolution: AvailableFabricEvolutionTypes | None = None,
**kwargs
)
Generate Abaqus user subroutine, pass additional parameters for the fabric coefficients.
PARAMETER | DESCRIPTION |
---|---|
model
|
Micromechanical model to use.
TYPE:
|
contact
|
Contact model to use.
TYPE:
|
type
|
Subroutine type, "umat" or "vumat".
TYPE:
|
output
|
Path to the output file.
TYPE:
|
npv
|
Number of particles per unit volume.
TYPE:
|
radius
|
Radius of the particles.
TYPE:
|
fabric_type
|
Fabric tensor type.
TYPE:
|
fabric_evolution
|
Fabric tensor evolution type.
TYPE:
|
kwargs
|
Calculation option, or (if not) fabric tensor coefficients or
DEFAULT:
|