Hello,

I created a simple but effective Tensor Toolbox for Fortran (ttb). It simplifies things a lot - think of having some matlab functionality available in Fortran:

You can find more information and a sample user subroutine or another example for MSC.Marc in my Github repository. Feel free to contribute bugs and your ideas - I'm open for everything I can handle. If you successfully use my module please tell me as I'm interested what is possible.

The most basic example on how to use this module is to download the module, put the 'ttb'-Folder in your working directory and add two lines of code:

The include 'ttb/ttb_library.f' statement replaces the line with the content of the ttb-module. The first line in a program or subroutine is now a use Tensor statement. That's it - now you're ready to go.

With the help of the Tensor module the Second Piola-Kirchhoff stress tensor S of a nearly-incompressible Neo-Hookean material model is basically a one-liner:

Isochoric part of the material elasticity tensor C4_iso of a nearly-incompressible Neo-Hookean material model:

Dear Abaqus users: Please use
to export stress and tangent matrix to change Marc ordering (11,22,33,12,23,31) to the one used in Abaqus (11,22,33,12,13,23).

Best Regards,

Andreas

I created a simple but effective Tensor Toolbox for Fortran (ttb). It simplifies things a lot - think of having some matlab functionality available in Fortran:

- Dot Product C(i,j) = A(i,k) B(k,j) written as C = A*B or C = A.dot.B
- Double Dot Product C = A(i,j) B(i,j) written as C = A**B or C = A.ddot.B
- Dyadic Product C(i,j,k,l) = A(i,j) B(k,l) written as C = A.dya.B
- Addition / Subtraction C(i,j) = A(i,j) + B(i,j) written as C = A+B or C = A.add.B
- Multiplication and Division by a Scalar C(i,j) = A(i,j) - B(i,j) written as C = A-B or C = A.sub.B
- Deviatoric Part of Tensor dev(C) = C - tr(C)/3 * Eye written as dev(C)
- Transpose and Permutation of indices B(i,j,k,l) = A(i,k,j,l) written as B = permute(A,1,3,2,4)
- Assigment of a real-valued Scalar to all components of a Tensor A = 0.0 or A = 0.d0
- Assigment of a real-valued Array to a Tensor with matching dimensions A = B where B is an Array and A a Tensor
- Rank 2 Identity tensor of input type Eye = identity2(Eye) with C = Eye*C
- Rank 4 Identity tensor (symmetric variant) of input type I4 = identity4(Eye) with C = I4(Eye)**C or inv(C) = identitiy4(inv(C))**C
- ...

You can find more information and a sample user subroutine or another example for MSC.Marc in my Github repository. Feel free to contribute bugs and your ideas - I'm open for everything I can handle. If you successfully use my module please tell me as I'm interested what is possible.

**Basic Usage**The most basic example on how to use this module is to download the module, put the 'ttb'-Folder in your working directory and add two lines of code:

Code:

include 'ttb/ttb_library.f' program script101_ttb use Tensor implicit none ! user code end program script101_ttb

**Example: Neo-Hookean Material**With the help of the Tensor module the Second Piola-Kirchhoff stress tensor S of a nearly-incompressible Neo-Hookean material model is basically a one-liner:

**Second Piola Kirchhoff Stress Tensor**Code:

S = mu*det(C)**(-1./3.)*dev(C)*inv(C)+p*det(C)**(1./2.)*inv(C)

**Material Elasticity Tensor**Isochoric part of the material elasticity tensor C4_iso of a nearly-incompressible Neo-Hookean material model:

Code:

C4_iso = det(F)**(-2./3.) * 2./3.* ( * tr(C) * (inv(C).cdya.inv(C)) * - (Eye.dya.inv(C)) - (inv(C).dya.Eye) * + tr(C)/3. * (inv(C).dya.inv(C)) )

Code:

asabqarray

Best Regards,

Andreas

## Comment