Python scripts¶
Initial setup¶
setup.py sets up local adaptions by creating the following files
that are ignored by git:
rollover/local_paths.py: This module contains the following variables:rollover_repo_path: Path to the git repositorydata_path: Path to the data folder (which will contain examples and user data
abaqus_v6.env: This file should be added either to the working directory of the simulation, or to the user’s home directory (%HOME%on Windows and~on Linux)data/usub/usub_rollover.objordata/usub/usub_rollover.o: Basic user subroutine required to run rollover simulation.
Compiling user subroutines¶
The script create_usub.py is used to compile user
subroutines by combining multiple input sources.
The usub/usub_3d.for and the contents of that folder are
automatically added.
On the script input, specify the path to additional fortran source code
containing the Abaqus user subroutine. All content of its folder will be
added to the temporary directory and the contents of the particular file
is added to the combined user subroutine file.
Note the following restrictions:
Only the files containing abaqus subroutines should be given, and maximum one per folder. If you have multiple subroutines, combine these in one file. The remaining files, that do not have abaqus subroutines can be included via include statements. Hence, the req. for the compilation to work is that the given subroutine file would compile on its own using abaqus make library=<subroutine_file>
No files can have the same path relative the copied folder because the contents of the copied folders are put in the same temporary folder.
No module names may overlap.
Example
You have a user material subroutine called umat.for, that uses a
module umat_mod in umat_mod.f90.
These routines are located in C:/umats/my_special_material.
umat.for should then have the statement
include 'umat_mod.f90' before
subroutine umat(...).
To compile this subroutine together with the required subroutines for
rollover, call the present script from some folder on your computer as:
python <path_to_create_usub.py> C:/umats/my_special_material/umat.for