Comments (17)
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.
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.
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.
Since MOOSE is developed on C++, do you think this problem is caused by their fortran compiler?
from ttb.
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.
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.
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.
I meant the whole library. You're right. Just deleting libdiv would cause other problems.
from ttb.
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.
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.
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.
@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.
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.
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.
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.
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.
@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.
from ttb.
Related Issues (20)
- Cannot read uppercase extensions .F in Ubuntu HOT 6
- ttb compatibility with default r8 HOT 3
- Cmake/Makefile for ttb HOT 3
- Questions about unfixed bugs
- Collection of Figures HOT 2
- Enhance `libpower.f` HOT 1
- Inner-crossed dyadic product of two sym. tensors can't be stored as a 6x6 fourth-order tensor HOT 2
- Rebase hardcoded fourth-order `identity4(T)` tensor on `cdya(T, T)` HOT 1
- Crossed-dyadic product is wrong HOT 1
- Link to Example 3 is broken
- Assign a scalar multiplies the scalar with the array items
- Initialisation of tensor components to zero HOT 2
- Add unit tests HOT 1
- umat_nh_ttb_simple.f does not work in Abaqus HOT 7
- Collection of Ideas for the Documentation
- Docs are broken HOT 4
- Implement Polar decomposition HOT 5
- Wrong orientation of the Rotation Matrix
- Old unused print statement in `sqrt_2()`
- Enhance the docs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ttb.