Git Product home page Git Product logo

Comments (17)

adtzlr avatar adtzlr commented on August 25, 2024

Hi @edwardXZ06,

yes this is possible. Just take an older version of this library (https://github.com/adtzlr/ttb/tree/15372e07ad2031a83b8e3a4fe1c99bf538c4d20b). I added the .F files because an Ansys-user had problems with the initial .f files.

Please note that there is one bug in this older version #18 but everything else is up-to-date.

Hope that helps!

EDIT: Here is the download link of this older version: https://github.com/adtzlr/ttb/archive/15372e07ad2031a83b8e3a4fe1c99bf538c4d20b.zip

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

Also thanks for letting me know that Abaqus has problems with .F files. I may provide two versions in the future, I'll see.

from ttb.

edwardXZ06 avatar edwardXZ06 commented on August 25, 2024

Hi. Thanks for your answer.
The .F files work perfectly in Abaqus as far as I know. I am working on a open source finite element framework MOOSE, which has has developed an interface with Abaqus UMAT for material definition.
Now the included .f file can be well found by the Abaqus interface, however I met a new issue shown as below.
image
Since MOOSE is developed on C++, do you think this problem is caused by their fortran compiler?

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

Hi, the Fortran Compiler could be the case. But this is far out of my expertise; I'm okay with Fortran, good with Python but have absolutely no expertise on C++. However, the error remembers me why we introduced the .F files for the Ansys LS Dyna users (@jfriedlein) . You could try to remove all the single precision (r4) functions in the library, probably this will help if you're only using double precision.

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

You could also track this down with a minimal version of this library. The code is fairly simple - just remove everything except Tensor2 and the dot product of two Tensor2 and see if it compiles.

from ttb.

edwardXZ06 avatar edwardXZ06 commented on August 25, 2024

You could also track this down with a minimal version of this library. The code is fairly simple - just remove everything except Tensor2 and the dot product of two Tensor2 and see if it compiles.

Do you mean just modifying the libdiv.f, or the whole library by deleting everything except the Tensor2 and dot product of tensor 2?I am assuming I cannot only change libdiv.f since that file will be called by other f file in library.

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

I meant the whole library. You're right. Just deleting libdiv would cause other problems.

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

I'm not sure which Fortran version you minimal need that the type-based operator overloading stuff will work. Probably posting this on stack overflow or some similar forum could also help you out.

from ttb.

edwardXZ06 avatar edwardXZ06 commented on August 25, 2024

Hi, Andreas:
Thanks for your suggestion, I have deleting all r4 variables in ttb_library.f, and it finally get compiled. Right now, I have just simply tested it by outputting the identity matrix and it is working!! Would definitely let you know if I find any question.
I am developing a complicated material model where the tensor algebraic is extensively used. Before trying your library, I went from CfKu tensor library which is also published on GitHub. TBH, you library contains much more operators than that one. Really appreciate your contribution to this community and immediate technical support!

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

Glad it worked! It's always nice if someone re-uses my own work and find it useful. Please report back if you encounter any bugs or have suggestions to this library.

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

@edwardXZ06 If I remember correctly - if you remove all single precision subroutines you have to use double precision scalars in your code (2.d0 instead of 2.0). But again, this could also depend on the compiler.

from ttb.

edwardXZ06 avatar edwardXZ06 commented on August 25, 2024

Hi, I have got two comments:

First, it seems only .F file will work for Abaqus, maybe that is determined by the associated fortran compiler that I installed.

Second, I find right now the inverse function only applies to 2nd order tensor, is there any easy way to realize inverse of 4th order tensor? I am thinking about converting 4th tensor to 2nd, inverse them, and transform back to 4th order....

Thanks,

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

First, it seems only .F file will work for Abaqus, maybe that is determined by the associated fortran compiler that I installed.

Again, sorry, I have no clue on that. I have no access to Abaqus, so this was trial-and-error with feedback from other users for me (a few years back already). I did test everything with MSC.Marc+Intel Fortran as well as gfortran and both versions work fine for me.

Second, I find right now the inverse function only applies to 2nd order tensor, is there any easy way to realize inverse of 4th order tensor? I am thinking about converting 4th tensor to 2nd, inverse them, and transform back to 4th order....

Do you mean a 4th order tensor of shape (3,3,3,3) , which should be reshaped to (9,9), inverted and reshaped back to (3,3,3,3)? You could try this on your own. It's not that easy with this library because the code for matrix inversion is hard-coded for (3,3) matrices here. You could write a function on your own, add it to the library.

Best regards
Andreas

from ttb.

edwardXZ06 avatar edwardXZ06 commented on August 25, 2024

Hi, I have a question. Regarding voigt(DEV_EYE4), where DEV_EYE4 is a 4th order tensor, it is supposed to be a 6x6 matrix mathematically. However, how can I extract the data from it, since I don't know the type of voigt(DEV_EYE4), and it looks like in your library, it is neither a 6x6 matrix nor a 1D array.

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

This is DEV_EYE4%a6b6. Have a look at the readme, section Access Tensor components by Array.

Access Tensor components by Array

Tensor components may be accessed by a conventional array with the name of the tensor variable T followed by a percent o perator % and a keyword as follows:

Tensor of rank 1 components as array: T%a. i-th component of T: T%a(i)

Tensor of rank 2 components as array: T%ab. i,j component of T: T%ab(i,j)

Tensor of rank 4 components as array: T%abcd. i,j,k,l component of T: T%abcd(i,j,k,l)

Symmetric Tensor of rank 2 (Voigt) components as array: T%a6. i-th component of T: T%a6(i)

Symmetric Tensor of rank 4 (Voigt) components as array: T%a6b6. i,j component of T: T%a6b6(i,j)

from ttb.

adtzlr avatar adtzlr commented on August 25, 2024

@edwardXZ06 is it okay for you if I close this issue? I think the titled issue regarding .F and .f files was solved.

from ttb.

edwardXZ06 avatar edwardXZ06 commented on August 25, 2024

from ttb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.