Accessing External Material Models for Structural Mechanics
Ed Gonzalez December 1, 2015
In structural mechanics, you may want to specify user-defined material models in your simulation. COMSOL Multiphysics® software version 5.2 enables you to access material models derived from external libraries as well as material functions programmed by yourself. We demonstrate how the new functionality works with the example of implementing Mazars’ model to describe damage to concrete.
A New Method for Specifying User-Defined Material Models
In COMSOL Multiphysics, you can access a variety of predefined materials to model mechanical deformation in solids. Material models for plasticity, viscoelasticity, creep, and hyperelasticity are just some of those that are available.
By using the built-in constitutive laws as a starting point, you have the ability to create your own material models based on stress or strain invariants, flow rules, or creep laws directly in the user interface. Extra PDEs or distributed ODEs can also extend a given material law. But what if your material model includes nonlinear expressions that are impossible to express in terms of standard variables, invariants, or additional PDEs?
The latest version of COMSOL Multiphysics — version 5.2 — features a new way for you to specify user-defined material models. In structural mechanics analyses, you are now able to completely define a nonlinear stress-strain relationship, or include an inelastic strain contribution with an existing elastic material. Two new features in the Solid Mechanics interface complement this functionality: the External Strain subnode under the Linear Elastic Material node and the External Stress-Strain Relation material model.
The External Material, External Strain, and External Stress-Strain Relation nodes in the model tree.
With the added capabilities, implementing external material functions coded in the C programming language is possible. If you write a wrapper function in C code, material functions can also be written in other programming languages, making it easy for you to reuse your legacy code.
Along with programming your own material models, distributing your models to colleagues and customers as add-ons is now an option as well. You can even create easy-to-use apps, by using the Application Builder and incorporating your external material functions, and distribute these to your colleagues and customers as well.
Putting the Added Functionality into Practice
To show you how the functionality works, we have added a tutorial to our Application Gallery that features a series of relevant demonstrations. The examples include a model file, a source C file, and a shared dynamic-link library (DLL) compiled and linked for a 64-bit Windows® operating system. (Running the models on Linux® operating systems and Mac OS X requires additional compilation and linking.)
In the first case, we explain how to write the C code for an isotropic linear elastic material and compare our results to the built-in Linear Elastic Material for a simple uniaxial test. The second, and more realistic, case shows how to implement a nonlinear material model that computes damage in concrete.
Let’s take a closer look at the latter of these two examples.
Using Mazars’ Damage Model for a Concrete Analysis
The deformation of brittle materials under mechanical loads is characterized by an initial elastic deformation. Upon unloading, the material will return back to its original state. However, if a critical stress or strain level is exceeded, a nonlinear fracture phase will follow the elastic phase.
As the critical value is reached, cracks will begin to grow and spread until the material fractures. The occurrence and growth of the cracks play an important role in the failure of concrete structures, and there are a number of theories used to describe such behavior. In the continuum damage mechanics formalism, a “damage” variable represents the amount of deterioration due to crack growth. The damage variable controls the weakening of the material’s stiffness.
Mazars’ model for concrete damage characterizes the fracture behavior within concrete using an isotropic scalar damage variable d. The variable enters the constitutive stress-strain relationship as
Here, \sigma is the stress tensor, C is the elasticity matrix, and \epsilon is the strain tensor.
The material, which behaves as a linear-elastic solid, is undamaged when the damage variable equals zero and fully damaged as the variable approaches one.
The inception and evolution of the damage variable is quite tricky to compute with standard variables in COMSOL Multiphysics. How so? It requires memorizing previous steps and conditional manipulation of variables based on principal stresses and principal strains. To overcome this limitation, we implemented Mazars’ damage model in an external material function, adding the C code for inspection and modification. The C code includes the definition of a number of variables, for loops, and the use of state variables to memorize damage from previous steps.
The plot below shows the computed uniaxial stress-strain response using Mazars’ damage model. The results are in excellent agreement with those findings presented in the book Mechanical Behavior of Concrete.
Uniaxial stress-strain response plot.
- Download the tutorial: External Material Examples, Structural Mechanics
- For more details on how to compile the C code for different operating systems, see the section “Working with External Materials” in the COMSOL Multiphysics Reference Manual
- Interested in learning more about Mazars’ damage model? Check out the following articles:
- J. Reynouard et al., “Modeling the Macroscopic Behavior of Concrete”, in Mechanical Behavior of Concrete, ed. J. Reynouard, J. Torrenti, and G. Pijaudier-Cabot. 63-119, Wiley 2010
- J. Mazars et al., “Local Second Gradient Models and Damage Mechanics: 1D Post-Localization Studies in Concrete Specimens”, in Bifurcations, Instabilities, Degradation in Geomechanics, ed. G. Exadaktylos and I. Vardoulakis. 127-142, Springer 2007
Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.
Linux is a registered trademark of Linus Torvalds.
Mac OS is a trademark of Apple Inc., registered in the U.S. and other countries.