# Dr. Huang's CPFEM UMAT in CalculiX

**URL:** <https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224>\
**Category:** Advanced features\
**Created:** [April 20, 2024, 9:31pm UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224 "2024-04-20T21:31:21Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atsushi](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Atsushi](https://calculix.discourse.group/u/Atsushi)\
**Post date:** [April 20, 2024, 9:31pm UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/1 "2024-04-20T21:31:21Z")

</div>

Hello, everyone.

Does anyone know how to use UMAT with Dr. Huang’s crystal plasticity finite element method(CPFEM)?  
The program and input files can be downloaded from the following website.

[https://www.researchgate.net/post/Can\_anyone\_help\_me\_to\_implement\_properly\_Huangs\_UMAT\_for\_single\_crystal\_plasticity\_on\_Abaqus](https://www.researchgate.net/post/Can_anyone_help_me_to_implement_properly_Huangs_UMAT_for_single_crystal_plasticity_on_Abaqus)

“umatcrystal\_mod.f” is the UMAT program, and “umatcryspl\_mod.inp” is the input file.

The input file contains several keywords that CalculiX does not recognize. Therefore, they must be modified in order to be calculated. The umatcryspl\_mod2.inp is a fixed version of them.

I recompiled the program and ran the input file. The results of the run are as follows.

```auto
atsushi@atsushi:~/tmp$ ~/CalculiX_2.21_umatHuang/src/ccx_2.21_MT -i umatcryspl_mod

************************************************************

CalculiX Version 2.21, Copyright(C) 1998-2023 Guido Dhondt
CalculiX comes with ABSOLUTELY NO WARRANTY. This is free
software, and you are welcome to redistribute it under
certain conditions, see gpl.htm

************************************************************

You are using an executable made on Sat Jul 29 10:52:01 CEST 2023

  The numbers below are estimated upper bounds

  number of:

   nodes: 20
   elements: 1
   one-dimensional elements: 0
   two-dimensional elements: 0
   integration points per element: 8
   degrees of freedom per node: 3
   layers per element: 1

   distributed facial loads: 0
   distributed volumetric loads: 0
   concentrated loads: 0
   single point constraints: 24
   multiple point constraints: 1
   terms in all multiple point constraints: 1
   tie constraints: 0
   dependent nodes tied by cyclic constraints: 0
   dependent nodes in pre-tension constraints: 0

   sets: 5
   terms in all sets: 25

   materials: 1
   constants per material and temperature: 160
   temperature points per material: 2
   plastic data points per material: 0

   orientations: 0
   amplitudes: 3
   data points in all amplitudes: 3
   print requests: 0
   transformations: 0
   property cards: 0

 *ERROR reading *USER MATERIAL: anisotropic definition
   is not complete.
 *ERROR reading *USER MATERIAL. Card image:
        *DEPVAR

Segmentation fault
atsushi@atsushi:~/tmp$

```

Unfortunately, an error occurs.  
It seems to be an error in usermaterials.f.  
Also, the same error occurs in the original “umatcrystal\_mod.f”.  
I don’t know why.

Does anyone know?  
Please tell me, any small hints are welcome.

Thanks,  
Atsushi

“umatcryspl\_mod2.inp”

```auto
**
** Heading +++++++++++++++++++++++++++++++++++++++++++++++++
**
*Heading
CPFEM test
**Hash: rrJYTz6R, Date: 04/11/2024, Unit system: MM_TON_S_C
**
** Nodes +++++++++++++++++++++++++++++++++++++++++++++++++++
**
*Node
1, 0.00000000E+000, 0.00000000E+000, 0.00000000E+000
2, 0.00000000E+000, 1.00000000E+001, 0.00000000E+000
3, 0.00000000E+000, 1.00000000E+001, 1.00000000E+001
4, 0.00000000E+000, 0.00000000E+000, 1.00000000E+001
5, 1.00000000E+002, 0.00000000E+000, 0.00000000E+000
6, 1.00000000E+002, 1.00000000E+001, 0.00000000E+000
7, 1.00000000E+002, 1.00000000E+001, 1.00000000E+001
8, 1.00000000E+002, 0.00000000E+000, 1.00000000E+001
9, 0.00000000E+000, 5.00000000E+000, 0.00000000E+000
10, 0.00000000E+000, 1.00000000E+001, 5.00000000E+000
11, 0.00000000E+000, 5.00000000E+000, 1.00000000E+001
12, 0.00000000E+000, 0.00000000E+000, 5.00000000E+000
13, 1.00000000E+002, 5.00000000E+000, 0.00000000E+000
14, 1.00000000E+002, 1.00000000E+001, 5.00000000E+000
15, 1.00000000E+002, 5.00000000E+000, 1.00000000E+001
16, 1.00000000E+002, 0.00000000E+000, 5.00000000E+000
17, 5.00000000E+001, 0.00000000E+000, 0.00000000E+000
18, 5.00000000E+001, 1.00000000E+001, 0.00000000E+000
19, 5.00000000E+001, 1.00000000E+001, 1.00000000E+001
20, 5.00000000E+001, 0.00000000E+000, 1.00000000E+001
**
** Elements ++++++++++++++++++++++++++++++++++++++++++++++++
**
*Element, Type=C3D20R
1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
16, 17, 18, 19, 20
**
** Node sets +++++++++++++++++++++++++++++++++++++++++++++++
**
*Nset, Nset=Fix123
1
*Nset, Nset=Fix13
2
*Nset, Nset=Fix1
3, 4, 9, 10, 11, 12
*Nset, Nset=Move
5, 6, 7, 8, 13, 14, 15, 16
**
** Element sets ++++++++++++++++++++++++++++++++++++++++++++
**
*Elset, Elset=Solid
1
**
** Surfaces ++++++++++++++++++++++++++++++++++++++++++++++++
**
**
** Physical constants ++++++++++++++++++++++++++++++++++++++
**
**
** Materials +++++++++++++++++++++++++++++++++++++++++++++++
**
*Material, Name=ABAQUSNL1
*USER MATERIAL,CONSTANTS=160
**
** All the constants below must be real numbers!
**
 168400.0, 121400.0, 75400.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** c11 , c12 , c44 , (elastic constants of copper crystal)
** MPa , MPa , MPa , 
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** constants only used for an elastic orthotropic or anisotropic material
** MPa ,
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** constants only used for an elastic anisotropic material
** MPa ,
**
** The elastic constants above are relative to crystal axes, where
** 1 -- [100], 2 -- [010], 3 -- [001] . These elastic constants 
** are arranged in the following order:  
** eight constants each line (data card)
**
** (1) isotropic: 
** E , Nu (Young's modulus and Poisson's ratio)
** 0.
** 0.
**
** (2) cubic:
** c11 , c12 , c44
** 0.
** 0.
**
** (3) orthotropic:
** D1111, D1122, D2222, D1133, D2233, D3333, D1212, D1313,  
** D2233
** 0.
**
** (4) anisotropic:
** D1111, D1122, D2222, D1133, D2233, D3333, D1112, D2212,
** D3312, D1212, D1113, D2213, D3313, D1213, D1313, D1123,
** D2223, D3323, D1223, D1323, D2323
**
**
      1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** number of sets of slip systems
** -- ,
**
      1.0, 1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0,
** normal to slip plane , slip direction , of the 1st set
** -- , -- , -- , -- , -- , -- ,
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** normal to slip plane , slip direction , of the 2nd set
** -- , -- , -- , -- , -- , -- ,
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** normal to slip plane , slip direction , of the 3rd set
** -- ,
**
**
     -1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0,
** direction in local system , global system , of the 1st vector
** --- , -- , -- , -- , -- , -- ,
** (the first vector to determine crystal orientation in global system)
**
      0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0,
** direction in local system , global system , of the 2nd vector
** -- , -- , -- , -- , -- , -- ,
** (the second vector to determine crystal orientation in global system)
**
** constraint: The angle between two non-parallel vectors in the local
** and global systems should be the same. The relative 
** difference must be less than 0.1%. 
**
**
     10.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** n , adot , of 1st set of slip systems
** --- , 1/sec ,
** (power hardening exponent and hardening coefficient)
**gammadot = adot * ( tau / g )** n
**
** Users who want to use their own constitutive relation may change the
** function subprograms F and DFDX called by the subroutine 
** STRAINRATE and provide the necessary data (no more than 8) in the 
** above line (data card).
**
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** n , adot , of 2nd set of slip systems
** --- , 1/sec ,
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** n , adot , of 3rd set of slip systems
** -- , 1/sec ,
**
**
    541.5, 109.5, 60.8, 0.0, 0.0, 0.0, 0.0, 0.0,
** h0 , taus , tau0 , of 1st set of slip systems
** MPa , MPa , MPa ,
** (initial hardening modulus, saturation stress and initial critical 
** resolved shear stress)
**H = H0 * { sech [H0 * gamma / (taus - tau0 )] }** 2
**
** Users who want to use their own self-hardening law may change the 
** function subprogram HSELF called by the subroutine LATENTHARDEN 
** and provide the necessary data (no more than 8) in the above line 
** (data card).
**
**
      1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** q , q1 , Latent hardening of 1st set of slip systems
** -- , -- ,
** (ratios of latent to self-hardening in the same and different sets 
** of slip systems)
**
** Users who want to use their own latent-hardening may change the 
** function subprogram HLATNT called by the subroutine LATENTHARDEN 
** and provide the additional data (beyond the self-hardening data, 
** no more than 8) in the above line (data card).
**
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** h0 , taus , tau0 , of 2nd set of slip systems
** MPa , MPa , Mpa ,
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** q , q1 , of 2nd set of slip systems
** -- , -- ,
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** h0 , taus , tau0 , of 3rd set of slip systems
** MPa , MPa , MPa ,
**
      0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** q , q1 , of 3rd set of slip systems
** -- , -- ,
**
**
      0.5, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
** THETA , NLGEOM ,
** -- , -- ,
**
** THETA: implicit integration parameter, between 0 and 1
**
** NLGEOM: parameter determining whether finite deformation of single 
** crystal is considered
**
** NLGEOM=0. --- small deformation
** otherwise --- finite rotation and finite strain, Users must 
** declare "NLGEOM" in the input file, at the *STEP 
** card
**
**
      1.0, 10.0, 1.0E-5, 0.0, 0.0, 0.0, 0.0, 0.0
** ITRATN , ITRMAX , GAMERR ,
** -- , -- , -- ,
** ITRATN: parameter determining whether iteration method is used to 
** solve increments of stresses and state variables in terms of 
** strain increments
**
** ITRATN=0. --- no iteration
** otherwise --- iteration
**
** ITRMAX: maximum number of iterations
**
** GAMERR: absolute error of shear strains in slip systems
**
**
*DEPVAR
125
**
** Sections ++++++++++++++++++++++++++++++++++++++++++++++++
**
*Solid section, Elset=Solid, Material=ABAQUSNL1
**
** Pre-tension sections ++++++++++++++++++++++++++++++++++++
**
**
** Constraints +++++++++++++++++++++++++++++++++++++++++++++
**
**
** Surface interactions ++++++++++++++++++++++++++++++++++++
**
**
** Contact pairs +++++++++++++++++++++++++++++++++++++++++++
**
**
** Amplitudes ++++++++++++++++++++++++++++++++++++++++++++++
**
**
** Initial conditions ++++++++++++++++++++++++++++++++++++++
**
**
** Steps +++++++++++++++++++++++++++++++++++++++++++++++++++
**
**
** Step-1 ++++++++++++++++++++++++++++++++++++++++++++++++++
**
*Step, Nlgeom, Inc=500
*Static, Solver=Spooles
0.0005, 1, 1E-07, 0.2
**
** Output frequency ++++++++++++++++++++++++++++++++++++++++
**
*Output, Frequency=1
**
** Boundary conditions +++++++++++++++++++++++++++++++++++++
**
*Boundary, op=New
** Name: Displacement_rotation-1
*Boundary
Fix123, 1, 1, 0
** Name: Displacement_rotation-2
*Boundary
Fix123, 2, 2, 0
** Name: Displacement_rotation-3
*Boundary
Fix123, 3, 3, 0
** Name: Displacement_rotation-4
*Boundary
Fix13, 1, 1, 0
** Name: Displacement_rotation-5
*Boundary
Fix13, 3, 3, 0
** Name: Displacement_rotation-6
*Boundary
Fix1, 1, 1, 0
** Name: Move
*Boundary
Move, 1, 1, 0.1
Move, 2, 2, 0
Move, 3, 3, 0
**
** Loads +++++++++++++++++++++++++++++++++++++++++++++++++++
**
*Cload, op=New
*Dload, op=New
**
** Defined fields ++++++++++++++++++++++++++++++++++++++++++
**
**
** History outputs +++++++++++++++++++++++++++++++++++++++++
**
**
** Field outputs +++++++++++++++++++++++++++++++++++++++++++
**
*Node file
U
*El file
S, E, NOE
*Output, Frequency=1
**
** End step ++++++++++++++++++++++++++++++++++++++++++++++++
**
*End step

```

---

<div class="post-metadata">

**Author:** ![jbr](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@jbr](https://calculix.discourse.group/u/jbr)\
**Post date:** [April 20, 2024, 10:00pm UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/2 "2024-04-20T22:00:44Z")

</div>

> [@Atsushi](#):
>
> I recompiled the program and ran the input file. The results of the run are as follows.

Did you modify all the necessary files? It looks like you need to define the depvars and potentially other initial variables.

I looked at one of the files, and this will not simply compile as given, for example:

- `include 'aba_param.inc'` → Needs to be removed.
- `EXTERNAL F` → It needs to be removed or fixed with the corresponding global variable. This is not recommended unless you truly know what you are doing.
- Other internal subroutines → Need to check one by one and make sure they do not exist in ccx right now.

---

<div class="post-metadata">

**Author:** ![Atsushi](https://avatars.discourse-cdn.com/v4/letter/a/ed655f/32.png) [@Atsushi](https://calculix.discourse.group/u/Atsushi)\
**Post date:** [April 21, 2024, 12:03am UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/3 "2024-04-21T00:03:23Z")

</div>

Thanks for telling me know.

Sorry, I forgot to attach the file.  
I used “aba\_param.inc” to compile umat.f.

I have not changed about “EXTERNAL F”.

How to compile  
Replace the file name “umatcrystal\_mod.f” with “umat.f”,  
Recompile with make command.  
Now you can compile.

Are you saying that this work is not enough to implement UMAT?

“aba\_param.inc”

```auto
      implicit real*8(a-h,o-z)
      parameter (nprecd=2)

```

---

<div class="post-metadata">

**Author:** ![k3rrig4n](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@k3rrig4n](https://calculix.discourse.group/u/k3rrig4n)\
**Post date:** [January 23, 2026, 7:45am UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/4 "2026-01-23T07:45:58Z")

</div>

Hello. Have you been able to solve this problem?

---

<div class="post-metadata">

**Author:** ![johanngil](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@johanngil](https://calculix.discourse.group/u/johanngil)\
**Post date:** [January 23, 2026, 11:22am UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/5 "2026-01-23T11:22:47Z")

</div>

Please replace the ccx (version 2.23) fortran files allocation.f, usermaterials.f, headings.f and umat\_abaqusnl.f by the attached modified file versions ([Unique Download Link | WeTransfer](https://we.tl/t-dxjiyDho5w)) and recompile ccx. Then the 2 attached inp (be aware of the user material name being used!) files with the Huang/Kysar single crystal material runs with ccx as it provides some console output during the execution. The results can be postprocessed as well.

There are a couple of aspects why we see here in the forum recurring problems with user defined materials especially when they have \>8 material parameters:

- The original inp file for Abaqus has the temperature only **once** after the last parameter. Calculix needs it as last parameter in **every** line (in case temperature dependency is needed). So the syntax in the inp file seems to be different in Abaqus vs. ccx to get it run with the same umat Fortran subroutine.
- The ccx manual (version 2.23) states on page 630: „if CONSTANTS is a **multiple of** 8“. I don’t think that this is correct, „if CONSTANTS is **greater than** 8“ may be a more precise statement.
- I have not found any ccx example standard test file with a user material having \>8 constants being defined for multiple temperatures. I have tried different syntax variants for multi-temperature setups for CONSTANTS \> 8, but I did not manage to get it run. So the attached Fortran files are expected to only work for temperature independent user material definitions.

---

<div class="post-metadata">

**Author:** ![k3rrig4n](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@k3rrig4n](https://calculix.discourse.group/u/k3rrig4n)\
**Post date:** [January 26, 2026, 5:49am UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/6 "2026-01-26T05:49:35Z")

</div>

Thanks for the answer. I tried your suggestion for solving this problem, but i faced other issue. I replaced fortran files, added aba\_param.inc file, i renamed Dr. Huang’s umat into umat\_HUANG\_KYSAR\_SINGLE\_CRYSTAL.f, i also modified umat\_main.f and makefile.inc files but i got this error:

 ![image](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/c/cc85090ea539ae5fbfa4f963bbf79d2296f74688.png)

Is there any advise on how to solve that error?

---

<div class="post-metadata">

**Author:** ![johanngil](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@johanngil](https://calculix.discourse.group/u/johanngil)\
**Post date:** [January 26, 2026, 4:12pm UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/7 "2026-01-26T16:12:28Z")

</div>

Why did you modify umat\_main? umat\_HUANG\_KYSAR\_SINGLE\_CRYSTAL.f will be called from umat\_abaqusnl(), not from umat\_main.f. Keep in mind that the umat was originally developed for Abaqus why the sequence of calls should be umat\_main() –\> umat\_abaqusnl() –\> umat\_HUANG\_KYSAR\_SINGLE\_CRYSTAL().

The error in your screenshot means that the linker could not find subroutine umat\_HUANG\_KYSAR\_SINGLE\_CRYSTAL(). Please make sure that the subroutine in umat\_HUANG\_KYSAR\_SINGLE\_CRYSTAL.f has the name umat\_HUANG\_KYSAR\_SINGLE\_CRYSTAL(). You need to change its original name.

Please further check if umat\_HUANG\_KYSAR\_SINGLE\_CRYSTAL.o was successfully created by the compiler to enable the linker to find it.

---

<div class="post-metadata">

**Author:** ![k3rrig4n](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@k3rrig4n](https://calculix.discourse.group/u/k3rrig4n)\
**Post date:** [January 27, 2026, 4:24am UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/8 "2026-01-27T04:24:12Z")

</div>

Thank you for the reply. Turns out name of subroutine in umat is wrong. I managed to recompile it, but your example’s arent working. It say’s: \*\*\*ERROR - first vector is zero. I tried to change 1st and 2nd vectors, but it didnt work. Can you please help on that one?

UPD: Looks like Calculix is not reading PROPS.

UPD2: The input parameters are not passed from umat\_abaqusnl to umat\_HUANG\_KYSAR\_SINGLE\_CRYSTAL

---

<div class="post-metadata">

**Author:** ![johanngil](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@johanngil](https://calculix.discourse.group/u/johanngil)\
**Post date:** [January 27, 2026, 4:01pm UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/9 "2026-01-27T16:01:01Z")

</div>

I successfully reran both examples on my side: The original inp model example umat\_huang\_kysar\_cryspl04.inp for the UMAT shows during the run console output like:

 ![grafik](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/3/3a7a6f3300812f6554c9956bf6119eea67039e85.jpeg)

After completion of the run I see the deformed brick in the postprocessor:

 ![grafik](https://global.discourse-cdn.com/free1/uploads/calculix/original/2X/8/83f8463c7f3402a58605c4166e66c7d86b9d4462.png)

---

<div class="post-metadata">

**Author:** ![k3rrig4n](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@k3rrig4n](https://calculix.discourse.group/u/k3rrig4n)\
**Post date:** [January 28, 2026, 8:23am UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/10 "2026-01-28T08:23:07Z")

</div>

I am sorry to bother you that much, but can you please send your version of umat? Is it different from the version above?

---

<div class="post-metadata">

**Author:** ![johanngil](https://avatars.discourse-cdn.com/v4/letter/j/779978/32.png) [@johanngil](https://calculix.discourse.group/u/johanngil)\
**Post date:** [January 28, 2026, 3:46pm UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/11 "2026-01-28T15:46:29Z")

</div>

Here is my umat version of the Huang/Kysar crystal plasticity model: [Unique Download Link | WeTransfer](https://we.tl/t-rZCMPtyzDa)

---

<div class="post-metadata">

**Author:** ![k3rrig4n](https://avatars.discourse-cdn.com/v4/letter/k/58f4c7/32.png) [@k3rrig4n](https://calculix.discourse.group/u/k3rrig4n)\
**Post date:** [January 29, 2026, 9:26am UTC](https://calculix.discourse.group/t/dr-huangs-cpfem-umat-in-calculix/2224/12 "2026-01-29T09:26:20Z")

</div>

Thank you very much. It is working now.
