Both sides previous revisionPrevious revisionNext revision | Previous revision |
abaqus [2024/04/18 10:54] – [Abaqus Licensing] bdatta1 | abaqus [2024/05/28 13:25] (current) – [Programming Abaqus user subroutines] bdatta1 |
---|
| |
Abaqus CAE is a pre- and post-processing package bundled with Abaqus solver. It allows the creation of CAD models, meshing, defining boundary conditions, and loading via GUI. But you might want to learn to create Abaqus input files if you're using user-defined features. To use Abaqus's user-defined features, you will need the Intel Fortran (and C++) compiler installed with Microsoft Visual Studio. Abaqus output is written in .odb file format and you will need Abaqus CAE (or Viewer) to view and process those results. | Abaqus CAE is a pre- and post-processing package bundled with Abaqus solver. It allows the creation of CAD models, meshing, defining boundary conditions, and loading via GUI. But you might want to learn to create Abaqus input files if you're using user-defined features. To use Abaqus's user-defined features, you will need the Intel Fortran (and C++) compiler installed with Microsoft Visual Studio. Abaqus output is written in .odb file format and you will need Abaqus CAE (or Viewer) to view and process those results. |
| |
| ==== Abaqus documentation (https://help.3ds.com) ==== |
| |
| Abaqus documentation is available at https://help.3ds.com. You will need to open an account to access the documentation. Once you login, you can search for specific version of Abaqus and navigate to the documentation. |
| |
| Abaqus installation also comes with a **.exe** file for Abaqus documentation which will you redirect you to the above website. You can find older version of documentation publicly hosted online by different institutes. But we recommend using the documentation from the installed or latest version. |
| |
==== Abaqus Licensing ==== | ==== Abaqus Licensing ==== |
==== Installing Abaqus on Windows ==== | ==== Installing Abaqus on Windows ==== |
| |
**Visual Studio and Intel oneAPI have to be installed in that particular order. Abaqus can be installed at any time.** | |
| |
ABAQUS is not forward compatible means ABAQUS 2021 won't be able to open the .CAE and .ODB files generated by ABAQUS 2022 or later versions. But the newer version can open files from an older version. So decide on an appropriate version that you can use for a long time (check what version Rockfish offers as well in case you have to run simulations there and transfer your files to local computer). You can download the software from [[https://software.wse.jhu.edu/]] and install it by yourself by obtaining the license information from WSE IT (or ask one of your labmates who uses ABAQUS for licensing information). Please make sure to select ABAQUS/Standard and Abaqus/Explicit solver with CAE package and CAA API components during installation. | ABAQUS is not forward compatible means ABAQUS 2021 won't be able to open the .CAE and .ODB files generated by ABAQUS 2022 or later versions. But the newer version can open files from an older version. So decide on an appropriate version that you can use for a long time (check what version Rockfish offers as well in case you have to run simulations there and transfer your files to local computer). You can download the software from [[https://software.wse.jhu.edu/]] and install it by yourself by obtaining the license information from WSE IT (or ask one of your labmates who uses ABAQUS for licensing information). Please make sure to select ABAQUS/Standard and Abaqus/Explicit solver with CAE package and CAA API components during installation. |
| |
**Make sure to obtain the research license for Abaqus. Academic license have limited functionalities.** | **Make sure to obtain the research license for Abaqus from WSE IT. Academic license have limited functionalities.** |
| |
==== Microsoft Visual Studio and Intel oneAPI ==== | ==== Installing Microsoft Visual Studio and Intel oneAPI ==== |
| |
To be able to leverage user-defined features of Abaqus, **Microsoft Visual Studio** and **Intel Fortran Compiler** are required to be installed **in that order**. Installing in different order will not work. Intel Fortran (and C++) compiler is a part of Intel oneAPI Toolkit which is available for free. Download the latest stable version of Intel oneAPI, both Base Toolkit and HPC Toolkit. The Base Toolkit has the compiler and oneMKL package and HPC Toolkit has the parallel computing packages. Please make sure to check which version of Microsoft Visual Studio is compatible with that particular Intel oneAPI version. Download the compatible version of the community edition of Visual Studio. Both these software are freely available. | **Visual Studio and Intel oneAPI have to be installed in that order while Abaqus can be installed at any time.** |
| |
| To be able to leverage user-defined features of Abaqus, **Microsoft Visual Studio** and **Intel Fortran Compiler** are required to be installed. Intel Fortran (and C++) compiler is a part of Intel oneAPI Toolkit which is available for free. Download the latest stable version of Intel oneAPI, both Base Toolkit and HPC Toolkit. The Base Toolkit has the compiler and oneMKL package and HPC Toolkit has the parallel computing packages. Please make sure to check which version of Microsoft Visual Studio is compatible with that particular version of Intel oneAPI. Download the compatible version of the community edition of Visual Studio. Both these software are freely available. |
| |
- Start the installation procedure with Visual Studio. Make sure to select ''Desktop development with C++'' on the installation page while other settings could be default. The installation process is trivial. \\ \\ | - Start the installation procedure with Visual Studio. Make sure to select ''Desktop development with C++'' on the installation page while other settings could be default. The installation process is trivial. \\ \\ |
- Then install the Intel oneAPI Base Toolkit and Intel oneAPI HPC Toolkit, respectively. Default installation should work and both of these software will recognize existing Visual Studio and link itself. This process might take 30-40 minutes. \\ \\ | - Then install the Intel oneAPI Base Toolkit and Intel oneAPI HPC Toolkit, respectively. Default installation should work and both of these software will recognize existing Visual Studio and link itself. \\ \\ |
- Upon successful installation, Intel oneAPI packages will be installed in C:\Program Files (x86)\Intel\oneAPI directory on Windows. Navigate further into the directory and check the folder ''C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\windows\bin\intel64'' (version could be different) for the ''ifort'' executable. Copy the path to a text editor for later use. \\ \\ | - Upon successful installation, Intel oneAPI packages will be installed in C:\Program Files (x86)\Intel\oneAPI directory on Windows. Navigate further into the directory and check the folder ''C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\windows\bin\intel64'' (version could be different) for the ''ifort'' executable. Copy the path to a text editor for later use. \\ \\ |
- Now navigate to the ''C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\env'' directory (again, the version could be different) and locate the ''vars.bat'' file. If your directory names are arranged differently for Intel oneAPI, you can search for the ''vars.bat'' through Windows Explorer and locate the one under the compiler directory. There will be other ''vars.bat'' files for different oneAPI packages, so, please make sure you find the right one. Copy the path to a text editor for later use. \\ \\ | - Now navigate to the ''C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\env'' directory (again, the version could be different) and locate the ''vars.bat'' file. If your directory names are arranged differently for Intel oneAPI, you can search for the ''vars.bat'' through Windows Explorer and locate the one under the compiler directory. There will be other ''vars.bat'' files for different oneAPI packages, so, please make sure you find the right one. Copy the path to a text editor for later use. \\ \\ |
SET PATH=%PATH%;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\windows\bin\intel64; | SET PATH=%PATH%;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\windows\bin\intel64; |
call “C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\env\vars.bat” intel64 | call “C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\env\vars.bat” intel64 |
</code> The first line here is the path directory for the ''ifort'' compiler and the second line calls the batch file (or script) to initialize the environment variable for the ''ifort'' compiler when the ABAQUS command is invoked. \\ | </code> The first line here is the path directory for the ''ifort'' compiler and the second line calls the batch file (or script) to initialize the environment variable for the ''ifort'' compiler when the ABAQUS command is invoked. \\ \\ |
- Now, open either Abaqus Commands, cmd, or Powershell from the Windows start menu and type the following to check and verify the installation. This should return all the system information, including the linker and compiler on the terminal. <code> | - Now, open either Abaqus Commands, cmd, or Powershell from the Windows start menu and type the following to check and verify the installation. This should return all the system information, including the linker and compiler on the terminal. <code> |
abaqus info=system </code> | abaqus info=system </code> |
==== Linking Intel oneMKL to ABAQUS (optional) ==== | ==== Linking Intel oneMKL to ABAQUS (optional) ==== |
| |
- Intel oneMKL (Math Kernel Library) is also part of the Intel oneAPI distribution. Intel oneMKL has Intel's implementation of BLAS, LAPACK, FFTW, and other math libraries which can be used in the user subroutine feature of ABAQUS. Navigate back to ''C:\SIMULIA\Commands'' directory, and open the ''abqXXX.bat'' file again. Add the following line below the previously added lines for the ifort compiler. This will initialize the environment variables for oneMKL when ABAQUS is called. <code> call "C:\Program Files (x86)\Intel\oneAPI\mkl\2021.1.1\env\vars.bat" intel64 </code> | Intel oneMKL (Math Kernel Library) is also part of the Intel oneAPI distribution. Intel oneMKL has Intel's implementation of BLAS, LAPACK, FFTW, and other math libraries which can be used in the user subroutine feature of ABAQUS. Learn a little bit about these libraries. |
| |
| - Navigate back to ''C:\SIMULIA\Commands'' directory, and open the ''abqXXX.bat'' file again. Add the following line below the previously added lines for the ifort compiler. This will initialize the environment variables for oneMKL when ABAQUS is called. <code> call "C:\Program Files (x86)\Intel\oneAPI\mkl\2021.1.1\env\vars.bat" intel64 </code> |
- Now navigate to ''C:\SIMULIA\EstProducts\2020\win_b64\SMA\site'' (or similar directory) based on your ABAQUS installation and locate ''win86_64.env'' file and open it as an administrator (same as before). Find the following line and add ''/Qmkl:sequential'' in between other compiler flag options. The file should now look as below for that line. <code> | - Now navigate to ''C:\SIMULIA\EstProducts\2020\win_b64\SMA\site'' (or similar directory) based on your ABAQUS installation and locate ''win86_64.env'' file and open it as an administrator (same as before). Find the following line and add ''/Qmkl:sequential'' in between other compiler flag options. The file should now look as below for that line. <code> |
compile_fortran=['ifort','/Qmkl:sequential', ... ... | compile_fortran=['ifort','/Qmkl:sequential', ... ... |
</code> You should be able to use the Intel oneMKL library now with ABAQUS. Apparently, by using ''/Qmkl:parallel'', you may be able to use the parallel version of oneMKL, however, it has never been tested nor found to be necessary for the ABAQUS user subroutine feature so far. | </code> You should be able to use the Intel oneMKL library now with ABAQUS. Apparently, by using ''/Qmkl:parallel'', you may be able to use the parallel version of oneMKL, however, it has never been tested we do not think is is necessary either for the ABAQUS user subroutine feature so far. |
| |
==== Programming Abaqus user subroutines ==== | ==== Programming Abaqus user subroutines ==== |
Don't underestimate the power of Fortran for being a old language. It's still one of the fastest programming language for numerical computing. Under the hood, MATLAB and NumPy uses Fortran libraries. Learn about [[https://en.wikipedia.org/wiki/Fortran| Fortran history]] to understand F77 coding styles and how they are different now (comparison between F77 vs. F90). For legacy reasons, subroutine templates provided by Abaqus/Standard follow F77 standard (Abaqus/Explicit templates are different). We recommend coding the subroutine in a fixed form (save the Fortran files with ''.for'' extensions) but you are not limited by F77 features. As long as the compiler supports you can use features from latest Fortran version in your Abaqus subroutine. | Don't underestimate the power of Fortran for being a old language. It's still one of the fastest programming language for numerical computing. Under the hood, MATLAB and NumPy uses Fortran libraries. Learn about [[https://en.wikipedia.org/wiki/Fortran| Fortran history]] to understand F77 coding styles and how they are different now (comparison between F77 vs. F90). For legacy reasons, subroutine templates provided by Abaqus/Standard follow F77 standard (Abaqus/Explicit templates are different). We recommend coding the subroutine in a fixed form (save the Fortran files with ''.for'' extensions) but you are not limited by F77 features. As long as the compiler supports you can use features from latest Fortran version in your Abaqus subroutine. |
| |
* A good place to start is going through the [[https://fortran-lang.org/learn/ | resources on fortran-lang.org ]]. | * [[https://fortran-lang.org/learn/ | Learning resources on fortran-lang.org ]]. |
* Check [[https://stevelionel.com/drfortran/allposts/ | blog posts from Doctor Fortran ]] | * [[http://annefou.github.io/Fortran/ | Modern Fortran materials by Anne Fou ]] |
| * [[https://masuday.github.io/fortran_tutorial/| Modern Fortran Tutorial by Yutaka Masuda ]] |
* [[https://www.fortran90.org | Fortran 90 website ]] | * [[https://www.fortran90.org | Fortran 90 website ]] |
* [[https://fortranwiki.org/fortran/show/HomePage | Fortran Wiki webpage ]] | * [[https://fortranwiki.org/fortran/show/HomePage | Fortran Wiki webpage ]] |
| * [[https://fortran-lang.org/learn/rosetta_stone/| Fortran for Python programmers]] |
| * [[https://stevelionel.com/drfortran/allposts/ | Blog posts from Doctor Fortran ]] |
| * [[https://bristolcompositesinstitute.github.io/RSE-Guide/abaqus-user-subroutines/index.html| Best practices for Abaqus user subroutine by Bristol Composite Institute ]] |
| |
A list of user subroutines available from Abaqus can be found here: https://docs.software.vt.edu/abaqusv2022/English/SIMACAESUBRefMap/simasub-c-gen-idxusubroutinelist.htm. For most updated list, you should check Abaqus documentation from Dassault Systemes website at https://help.3ds.com (you will need to create an user account login). Among those user subroutines, user material subroutine (UMAT) and user defined element (UEL) in Abaqus/Standard are readily used in academic research to implement new constitutive model and new element technology, respectively. VUMAT and VUEL are Abaqus/Explicit counterparts of the You should read the documentation very thoroughly and understand how these subroutines work before start working on them. Please remember, Abaqus can recognize one Fortran file at the time of execution. If you would like to use multiple user subroutines, you will have to put them in a single Fortran file or arrange it in a way that your main Fortran file can have call other files. | A list of user subroutines available from Abaqus can be found here: https://docs.software.vt.edu/abaqusv2022/English/SIMACAESUBRefMap/simasub-c-gen-idxusubroutinelist.htm. For most updated list, you should check Abaqus documentation from Dassault Systemes website at https://help.3ds.com (you will need to create an user account login). Among those user subroutines, user material subroutine (UMAT) and user defined element (UEL) in Abaqus/Standard are readily used in academic research to implement new constitutive model and new element technology, respectively. VUMAT and VUEL are Abaqus/Explicit counterparts of the You should read the documentation very thoroughly and understand how these subroutines work before start working on them. Please remember, Abaqus can recognize one Fortran file at the time of execution. If you would like to use multiple user subroutines, you will have to put them in a single Fortran file or arrange it in a way that your main Fortran file can have call other files. |
| |
* **UMAT:** If you can express your constitutive model and spatial tangent in terms of Cauchy stress, you perhaps need a UMAT. In this case you can take advantage of the element formulation available via Abaqus such as hybrid element, incompatible model element, elements with hourglass stabilization, etc. UMAT subroutines are called at each integration point and the subroutine needs to return (at least) the stress and spatial tangent of the material which are later used to form the tangent (stiffness) matrix and residual vector. | * **UMAT:** If you can express your constitutive model and spatial tangent in terms of Cauchy stress, you perhaps need a UMAT. In this case you can take advantage of the element formulation available via Abaqus such as hybrid element, incompatible model element, elements with hourglass stabilization, etc. UMAT subroutines are called at each integration point and the subroutine needs to return (at least) the stress and spatial tangent of the material which are later used to form the tangent (stiffness) matrix and residual vector. |
* For incompressible hyperelastic material, use **UHYPER** subroutine. | * For incompressible hyperelastic material, use **UHYPER** subroutine. \\ \\ |
* **UEL:** If you need a total Lagrangian element formulation, or you need a different element technology beyond what Abaqus offers such as F-bar or B-bar type element to alleviate volumetric locking of incompressible or nearly-incompressible materials or if you want to analyze multifield models which are not available in Abaqus such as chemo-mechanical model for hydrogels or phase-field model for fracture, you will need to program a UEL subroutine. When programming UEL subroutine, you will have to program the constitutive response as well, i.e., a UMAT-like behavior also needed to be programmed. | * **UEL:** If you need a total Lagrangian element formulation, or you need a different element technology beyond what Abaqus offers such as F-bar or B-bar type element to alleviate volumetric locking of incompressible or nearly-incompressible materials or if you want to analyze multifield models which are not available in Abaqus such as chemo-mechanical model for hydrogels or phase-field model for fracture, you will need to program a UEL subroutine. When programming UEL subroutine, you will have to program the constitutive response as well, i.e., a UMAT-like behavior also needed to be programmed. |
* In case you want to use built-in material models provided by Abaqus with your own element formulation, consider using **UELMAT**. | * In case you want to use built-in material models provided by Abaqus with your own element formulation, consider using **UELMAT**. |
=== Additional resources === | === Additional resources === |
| |
| - [[https://github.com/nasa/CompDam_DGD/| Comp-DGD by NASA ]]:: This is an Abaqus/Explicit VUMAT project by NASA. While it may not be related to our research, but the follows good software practices. |
| - [[https://github.com/HenannResearchGroup?tab=repositories| GitHub repository from Henann Research group at Brown ]]: A collection of different types of Abaqus subroutines by David Henann's group at Brown. |
- Notes on [[https://imechanica.org/files/Writing%20User%20Subroutines%20with%20ABAQUS_0.pdf| Abaqus user subroutine on iMechanica]]: This document is based on a very old version of Abaqus. You should consult the Abaqus manual for additional subroutine-related documentation. | - Notes on [[https://imechanica.org/files/Writing%20User%20Subroutines%20with%20ABAQUS_0.pdf| Abaqus user subroutine on iMechanica]]: This document is based on a very old version of Abaqus. You should consult the Abaqus manual for additional subroutine-related documentation. |
- Prof. Allan F. Bower's class on [[https://www.brown.edu/Departments/Engineering/Courses/En2340/| Computational Methods in Solid Mechanics at Brown University]]: This class covers different finite element formulation (mechanical to multiphysics) and their implementation in a custom Fortran based FEA code which shares the same user subroutine format as Abaqus. | - Prof. Allan F. Bower's class on [[https://www.brown.edu/Departments/Engineering/Courses/En2340/| Computational Methods in Solid Mechanics at Brown University]]: This class covers different finite element formulation (mechanical to multiphysics) and their implementation in a custom Fortran based FEA code which shares the same user subroutine format as Abaqus. |
- Prof. Allan F. Bower's [[https://github.com/albower/EN234_FEA| FEA Code on GitHub]]: You can use this code. | - Prof. Allan F. Bower's [[https://github.com/albower/EN234_FEA| FEA Code on GitHub]]. This is an extended version of the FEACHEAP code (http://solidmechanics.org/FEA.php) which supports Abaqus-style user subroutine programming. This code can give you an idea of the orgranization and programming style as well, but be careful about the bugs if you use the code (there is no license available for this code on GitHub so we do not recommend using it). |
| |
| |
As of 2023, Rockfish has replaced MARCC as JHU's HPC. Verify the lines in the header to make sure your email, HPC partition, runtime, etc. are configured correctly. Additionally, make sure the correct Abaqus module is loaded for your use case. | As of 2023, Rockfish has replaced MARCC as JHU's HPC. Verify the lines in the header to make sure your email, HPC partition, runtime, etc. are configured correctly. Additionally, make sure the correct Abaqus module is loaded for your use case. |
| |
[[https://github.com/NguyenLabJHU/Rockfish-HPC-Scripts| Go to this GitHub repository]] and find the batch scripts to run Abaqus on Rockfish and MARCC. They are almost identical and you can create your own from these. | [[https://github.com/NguyenLabJHU/Rockfish-HPC-Scripts| This GitHub repository]] contains batch scripts to run Abaqus on Rockfish and MARCC (this is a private GitHub repository, and you will have to have an account added to the Nguyen Lab account to access this.). Scripts for Rockfish and MARCC are almost identical, and you can create your own from these if you need to. |
| |
This is a private GitHub repository, and you will have to have an account added to the Nguyen Lab account to access this. | |
| |
| |
| |
| |