Nguyen Lab Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
abaqus [2024/04/18 10:55] – [Linking Intel oneMKL to ABAQUS (optional)] bdatta1abaqus [2024/04/18 11:10] (current) – [Linking Intel oneMKL to ABAQUS (optional)] bdatta1
Line 17: Line 17:
 ==== 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. \\ \\ 
Line 44: Line 45:
 ==== 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 <code>'/Qmkl:parallel'</code>, 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 ====
Line 63: Line 66:
  
   * **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**.
Line 79: Line 82:
   - 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).
  
  
Line 99: Line 102:
 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.+
  
  
  
  
DokuWiki CC Attribution-Share Alike 4.0 International