-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request toolbox compatibility LS-Dyna #10
Comments
Hi @jfriedlein glad you like it! I'm sorry that the toolbox didn't work for you out of the box. Unfortunately I can't delete all Example without the *r4 procedures: And I would like to have both lines working. Which Fortran version are you using? Strange - I never encountered that kind of error. I'll see if it is possible do implement some IF-ELSE statements but I'm not really sure if FORTRAN allows that in the interface section. Otherwise I would have to create a second Regarding the 4th-order deviatoric projection tensor: I did not implement it because there is a distinction between a physical deviatoric and a mathematical deviatoric projection tensor, e.g. the physical one related to the PK2-stress S and the right cauchy green tensor C:
whereas the mathematical deviatoric projection tensor is just:
And, finally, as it is totally easy to generate What do you mean by your Last but not least: I'm open for code improvements and extensions. Feel free to contribute! Best regards, |
@jfriedlein Okay, I did some experiments with precompilation flags #define tensordyna
use Tensor and inside the Toolbox #ifndef tensordyna
module procedure dot_40_r4
...
#endif and renamed files to ...but I get compilation errors in gfortran (can't test Intel Fortran at home). |
I found a solution which works in gfortran. I had to change the include statement from Edit: Solution works! Will update source and docs tomorrow. |
fixes problems for LS-DYNA users as reported in #10. Now the include statement is done via a preprocessor flag `#include "ttb/ttb_library.F"` and all *_r4 procedures may be excluded from compiling with `#define NOR4`. Updated docs too.
@jfriedlein please download again, adapt your code from include 'ttb/ttb_library.F'
...
use Tensor
... to #define NOR4
#include "ttb/ttb_library.F"
...
use Tensor
... and save your files with UPPERCASE file extensions ( BR Andreas |
Hi Andreas @adtzlr, LS-Dyna Fortran Version: module procedure *r4 Fourth order deviatoric tensor: Volumetric part of a tensor: Next: To sum up, we could close this issues. Thanks again. Best regards, |
@jfriedlein Thanks for the missing _r4 lines. I already updated it - I closed this issue. Do you think it would be possible to generate a minimal (and tested) working UMAT example for LS-Dyna which could be included in the docs section? I think that would help other users a lot. For Marc I think the Neo-Hookean or the St.-Venant-Kirchhoff HYPELA2 (that's the name for UMAT in Marc) serves as a reference example. I think you did not get an error because somehow constants like For the deviatoric fourth-order projection tensor: What name would be appropriate for that? Will have to sleep some nights until I make a decision :) |
@adtzlr Deviator tensor: Helper modules: I'm glad to help where I can, so just tell me where I can contribute. I will send you the LS-Dyna example UMAT this or next week. |
Hi Andreas @adtzlr, |
@adtzlr
I currently implement user material models in LS-Dyna with Fortran. Luckily, I found your tensor toolbox to be able to implement our tensor-based models.
Firstly, thank you so much for giving us such a well-written toolbox with, most importantly, a great documentation.
I found some minor issues when trying to use your toolbox in the Fortran version of LS-Dyna, as described below. Nevertheless, I use it now successfully. I also added some additional functions (volumetric part, deviatoric fourth order tensor, ...).
I was wondering whether I could contribute to your repository, so we get a toolbox for Abaqus, Marc and LS-Dyna.
ttb in LS-Dyna:
LS-Dyna probably uses an older Fortran version than Abaqus and Marc. When I include the toolbox, the following error results
.\ttb/libdiv.f(57): error #5286: Ambiguous generic interface OPERATOR(/): previously declared specific procedure DIV_10 is not distinguishable from this declaration. [DIV_10_R4] function div_10_r4(T, w)
... (for all functions ending with r4)
By simply deleting all the
module procedure *r4
inttb_library.f
all errors disappear and we can use the toolbox (of course without the r4 variants). Is this because this fortran version cannot yet distinguish between data type-"templated" functions?proposols:
Maybe we use a new
ttb_library.f
with the above modification or can incorporate this into a single file. The additional functions (vol, I_dev, ...) could be added to existing and new files.If you can make time and give me an answer, I would appreciate it.
The text was updated successfully, but these errors were encountered: