# Working of User Defined Constitutive Model

**URL:** https://forum.itascainternational.com/t/working-of-user-defined-constitutive-model/1194
**Category:** FLAC2D
**Created:** [September 28, 2023, 10:59am UTC](https://forum.itascainternational.com/t/working-of-user-defined-constitutive-model/1194 "2023-09-28T10:59:13Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![SamVarun10](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@SamVarun10](https://forum.itascainternational.com/u/SamVarun10)
#### Post date: [September 28, 2023, 10:59am UTC](https://forum.itascainternational.com/t/working-of-user-defined-constitutive-model/1194/1 "2023-09-28T10:59:13Z")

</div>

Hi there,  
I guess some of you have worked on creating User-Defined Constitutive Models using C++ UDM add-in. I was able to configure and install VS2010 and add the DLL file into the FLAC. But on adding a code line of model example, the properties are not initialised/took by the code. If possible, can the following doubts be conveyed. It would be very helpful for me:

1. Do we need a Release version oF Debug version of the DLL file for the example Constitutive Model created?
2. The basic example already available has Mohr-Coulomb model written inside. If I wanted to work with the same, I started with  
config cppudm  
model load ‘modelexample005\_64.dll’  
and then the following code:  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/1X/1f1db22dfb2d27eaf0642a10bb635114a91eeab6.png)  
This is the error which I get:  
 ![image](https://canada1.discourse-cdn.com/flex031/uploads/itasca/original/1X/f0b24c021f6c0ab806ef45426aef1f8d89ad28fc.png)  
The properties are not being added.  
What should be done?  
Please convey  
Thank you

---

<div class="post-metadata">

### Author: ![jwang](https://avatars.discourse-cdn.com/v4/letter/j/b782af/32.png) [@jwang](https://forum.itascainternational.com/u/jwang)
#### Post date: [September 28, 2023, 1:12pm UTC](https://forum.itascainternational.com/t/working-of-user-defined-constitutive-model/1194/2 "2023-09-28T13:12:36Z")

</div>

Since the model ‘example’ was a CPP built model, you have to use z\_prop() fish function to extract the properties from the zones. Please see the following post for more details:

> [@Use z\_model(),z\_prop() and z\_group(). to access model and properties](https://forum.itascainternational.com/t/use-z-model-z-prop-and-z-group-to-access-model-and-properties/106):
>
> 1.To access CPP (CPP built-in and CPPUDM) models and their properties: Use: z\_model() to return or modify model name. e.g. if z\_model(i,j)=‘finn’ z\_prop() to access property name. e.g. \_fric=z\_prop(i,j,‘friction’) To access other models and their properties: Use: model() to get the constitutive model number. e.g. if model(i,j)= 3 ;Mohr-Coulomb model A list of models on page 2-43 of Fish Reference manual. To access model properties, use the property name directly. e.g. \_coh= cohesion(i,…
