You are not logged in. Please login or register.

Forum updated

We have recently updated our forums system, and we have cleared all spam topics and users. In case we accidentally deleted your account, please register again. If you miss a topic you have posted before, please let us know.

Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Smilies

All fields with bold label must be completed before the form is submitted.

Required information for guests


Required information

Topic review (newest first)

23

Hello amitjn7042,
ad 1.: please see the documentation of your compiler (e.g., Visual Studio 2015 or Intel Fortran) and any libraries used from your DLL (e.g., MKL) to find out which redistributables (runtime libraries) you need to install/copy with your .DLL.

Ad 2.: To use your material from the 64-bit ATENA version, you of course need to compile your .DLL as x64.

22

Hello,

I had developed the material model with your help and it now running well, but there are some issues:

1. Each time I run the ATENA on different computer, I need to create .dll file using Visual Studio. Is there anyway I can create .dll file once and it run on all computer?

2. As of now, I am working on a 64bit machine. I pasted the .dll file at both paths "C:\Program Files (x86)\CervenkaConsulting" and  "C:\Program Files\CervenkaConsulting\AtenaV5x64". When I try to run ATENA Studio for 64 bit. It gives me following error:

(Thread 1) CCException: Cannot load DLL: OneDimSMA.dll
Source line: 259, file: ..\..\Sources\CCMaterial\CCElastIsotropic\CCUserMaterial\CCUserMaterial_Misc.cpp, last modified at: Wed Jul 23 15:10:18 2014

Could you please help in solving these issues.

Thank you.

21

Hello, the most likely reason is that some runtime libraries used by your .DLL are missing on the other computer. For example, if you use the Microsoft Visual C++ or Intel FORTRAN compiler to create your .DLL, you need to install the Visual C++ runtime or the Intel FORTRAN runtime (of course, version corresponding to your compiler). You also need to include the runtime DLLs of any additional libraries used in your .DLL.
Regards.

20

Hi,
I have completed the material model and it is working nicely on my PC. When I tried to run the same input file on another PC after pasting .dll file in program directory, it is showing error that .dll file is not found.

What should be the error?

Thanks,
Amit Jain

19

I have sent you the required files and information. Please let me know if you need any more information.

Thanks,
Amit Jain

18

Please follow ATENA Troubleshooting, 2.1.1 to send us your model etc.

17

Could you please give me your email address or please give me a test mail to amitjn7042@gmail.com .

Yes I am exporting the .dll file with "__declspec(dllexport)" keyword before the declaration of the function. An example of the same is as follows:

__declspec(dllexport) UINT CDECL UserDLLCalculateResponse(
      double deps[], double teps[], double sigma[], double UserMaterialParams[], double UserMaterialState[]
){
/*...*/
}

I will send you the .dll file once I will receive an email address. I am using Visual Studio Express 2013 to compile the program and to generate the .dll file. I have also written a program to use the generated .dll file. I am able use the functions from .dll file. I don't know why I am getting this error while using .inp file.

Please let me know what other information should I provide you with .dll file.

16

Dear Amit Jain,
I assume you have defined the Calculate Response function. The next typical reason is name mangling/decorating, i.e., the additional characters the compiler+linker add to function names according to the parameters' and return value types. Please check the compiler settings and/or the strings in your compiled .dll.

With the Microsoft compilers (VC 2012 etc.), use the option
__declspec(dllexport)
to make your functions accessible through undecorated names. See https://msdn.microsoft.com/en-us/library/a90k134d.aspx for more information.

If you can not identify the name difference, please send us your .dll including the sources + information about which compiler you use.

Regards.

15

Dear Dpryl,

I don't know why I got different file name in message. But I tried to do it again and now I am getting the same file name in message file as I specified in .inp file. Could you please let me know where am I doing wrong.

The message I received is as follows:
(Thread 1) CCException: Cannot find function UserDLLCalculateResponse in DLL: OneDimSMA.dll : The specified procedure could not be found.

Source line: 289, file: ..\..\Sources\CCMaterial\CCElastIsotropic\CCUserMaterial\CCUserMaterial_Misc.cpp, last modified at: Wed Jul 23 15:10:18 2014

As I said earlier that I could able to run this program with the in-build 1-D material definition.

Thanks,
Amit Jain

14

Dear Amit Jain,
it seems you are probably running the analysis for another Input (.inp) file than intended - the message reports "1D_SMA_DLL.dll", in the .inp quote I see "OneDimSMA.dll"?

Regards.

13

Hi,

I have updated the code and created the .dll file for the user material. But I could not be able to implement it into ATENA. I am getting the following error, which says that ATENA could not be able to load the .dll file

(Thread 1) CCException: Cannot load DLL: 1D_SMA_DLL.dll
Source line: 259, file: ..\..\Sources\CCMaterial\CCElastIsotropic\CCUserMaterial\CCUserMaterial_Misc.cpp, last modified at: Wed Jul 23 15:10:18 2014

My implementation procedure is as follows:
1. I have created a model in ATENA 3D, similar to tensile testing of a cable. (The cable is connected with 3D-linear-elastic-isotropic steel cubes). At the first step, I am specifying cable to follow the linear elastic reinforcement material. The program runs well and gives the expected results.
2. Now I have exported the input file of the model and replace the following code

 
MATERIAL ID 335544322 NAME "Reinforcement"
TYPE "CCReinforcement"
   E       2.000000e+005
   ALPHA   1.200000e-005
   RHO     7.850000e-003
   COMPRESSION 1

with the code:

MATERIAL ID 335544322 NAME "SMA"
TYPE "CC3DUserMaterial"
UserMaterialDLL "OneDimSMA.dll"
   Ea       67000   // UserMaterialParams
   Em      26300  // UserMaterialParams
   Ca       8          // UserMaterialParams
   Cm      13.5     // UserMaterialParams
   Ms       18.4     // UserMaterialParams
   Mf       9          // UserMaterialParams
   As       34.5     // UserMaterialParams
   Af        49       // UserMaterialParams
   epsL    0.067  // UserMaterialParams
   T         53       // UserMaterialParams

I have tested the OneDimSMA.dll file by importing its function in another C++ program. In that program the required functions are getting imported from .dll file and runs as expected.

Please let me know, where am I doing mistake.

Thanks,
Amit Jain

12

As mentioned in a previous reply, you need to define new data attribute(s) (state variable(s)) in your material DLL - see also the User Material DLL manual, 1.2.1. Material Definition.

11

I am doubt that how can I store the stress value for each time step using the usermaterial dll file. As per my understanding this dll file is called for each time step and the variable which i will create using this file would be a local variable. How would I be able to access it next time step.

Please correct me if I am wrong. Also please let me know a way to do it.

Thank you

10

i am modeling pseudo elastic behavior of SMA (shape memory alloys). A typical stress strain behavior can be seen as in figure (b) http://what-when-how.com/wp-content/upl … p10103.jpg. So at some intermediate strain level, the corresponding stress depends on whether the material is in loading state or unloading state. Therefore, I would like to store stress for all previous time steps. Please let me know how can I do that?

Thanks,
Amit Jain

9

Dear Amit,
please explain which effects/influences you wish to consider - how the history influences the response?

Ad 1. You can define new data attributes as you wish and store into them what you like when creating your own  UserMaterialDLL.

Ad 2. Please see ATENA Troubleshooting, 2.1.9.1 Reinforcement buckling and 2.2.12.3 Unbonded segments for basic ideas on bars not fully embedded in a volume material.

With some extra care, it is also possible to directly support a bar (or cable), at least using the ATENA-GiD interface (I am not sure about the Engineering 3D and 2D GUEs).