I guess some of you have already used a user-built constitutive model in FLAC3D. I have my .dll that I loaded and all but when it comes to attribute values to some variables defined inside my model, the program bugs. These input parameters of my model are not expected tokens .
Do I have, for instance, to put the .dll file in one of the flac installation folders?
By default, constitutive models are loaded on startup from the folder FLAC3D700/exe64/plugins/cmodel. If that works correctly, you should see commands like program load cmodel “plugins/cmodel/cmodelname007.dll” when opening FLAC3D. If that does not happen, you can load the DLL with the same command by yourself, giving the right path.
Then make sure to apply your consitutive model (zone cmodel assign modelname) and then you should be able to set its properties (e.g. zone prop bulk xx)
Bonus: Usign zone cmodel list properties you can see the possible parameters for each model. This can be useful to check against misspelling etc.
Thank you @markus. I did the last check you suggested and I was surprised that my variables were not among the parameters of the model. I think my problem stems from the compilation of the .dll file.
The model was in fact implemented in c++ and then compiled in a .dll file for the 5th version of FLAC3D. I am just given the code. I just compiled them in a new dll using Visual Basic 2019. Maybe my problem comes from here. Do you have any guidelines?
Hi @sebastien !
Compiling with MSVS 2019 should be fine, documentation mentions that 2017 and 2019 editions are supported.
However, source files might have changed from version 5 to latest ones.
The documentation provides details on how one should proceed.
You may want to start with the example located in
FLAC3D700/pluginfiles/cmodels/example where everything is provided, including compilation files that you “just” have to compile. You should then move the built *dll to the folder suggested by @markus.
Once compilation has no secrets for you anymore, you can reconstruct your custom model from the example files!
Hope it helps!
Hi @Theophile I am going to start over from the example files as you suggested. I’ll let you know. Thanks!
@sebastien another source that will help in your understanding of how to compile into a dll for further constitutive model implementation is: