-
Notifications
You must be signed in to change notification settings - Fork 3
/
mat.h
144 lines (121 loc) · 5.87 KB
/
mat.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
/*
* mat.h
* Copyright (C) 2009, Tomasz Koziara (t.koziara AT gmail.com)
* ---------------------------------------------------------------
* bulk material
*/
/* This file is part of Solfec.
* Solfec is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Solfec is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Solfec. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include "mem.h"
#include "map.h"
#include "fld.h"
#ifndef __mat__
#define __mat__
/* UMAT: user material subroutine mimicking the ABAQUS counterpart
* ----------------------------------------------------------------
* stress (ntens): Cauchy stress at the beginning (IN) or end (OUT) of the increment;
* statev (nstatv): solution dependent state variables at the beginning (IN) or end (OUT) of the increment;
* ddsdde (ntens, ntens): Jacobian matrix of the constitutive model: d (stress increment) / d (strain increment);
* sse, spd, scd: specific elastic strain energy, plastic dissipation and creep dissipation, respectively;
* rpl: mechanical volumetric heat generation per unit time at the end of the increment;
* ddsddt (ntens): variation of stress increments with respect to the temperature;
* drplde (ntens): variation of 'prl' with respect to the strain increments;
* drpldt: variation of 'prl' with respect to the temperature;
* stran (ntens): the total strains minus the thermal strains; rotated according to rigid motion approximations to logarithmic strain;
* dstran (ntens): the total strain increments minus the thermal strain increments;
* time (2): value of step time and total time, respectively, at the beginning of the current increment;
* dtime: time increment;
* temp: temperature at the start of the increment;
* dtemp: increment of temperature;
* predef: array of interpolated values of predefined field variables at this point at the start of the increment, based on the values read in at the nodes;
* dpred: array of increments of predefined field variables;
* cmname: user-defined material name;
* ndi: number of direct stress components at this point;
* nshr: number of engineering shear stress components at this point;
* ntens: size of the stress or strain component array (ndi + nshr);
* nstatv: number of solution-dependent state variables that are associated with this material type;
* props (nprops): user-specified array of material constants associated with this user material;
* nprops: user-defined number of material constants associated with this user material;
* coords: an array containing the current coordinates of this point;
* drot (3, 3): rotation increment matrix; provided so that vector- or tensor-valued state variables can be rotated in this subroutine;
* pnewdt: ratio of suggested new time increment to the time increment being used;
* celent: characteristic element length;
* dfgrd0 (3, 3): array containing the deformation gradient at the beginning of the increment;
* dfgrd1 (3, 3): array containing the deformation gradient at the end of the increment;
* noel: element number;
* npt: integration point number;
* layer: layer number (for composite shells and layered solids);
* kspt: section point number within the current layer;
* kstep: step number;
* kinc: increment number;
*/
typedef void (*UMAT) (double *stress, double *statev, double *ddsdde, double *sse, double *spd, double *scd,
double *rpl, double *ddsddt, double *drplde, double *drpldt, double *stran, double *dstran,
double *time, double *dtime, double *temp, double *dtemp, double *predef, double *dpred,
char *cmname, int *ndi, int *nshr, int *ntens, int *nstatv, double *props, int *nprops,
double *coords, double *drot, double *pnewdt, double *celent, double *dfgrd0, double *dfgrd1,
int *noel, int *npt, int *layer, int *kspt, int *kstep, int *kinc);
typedef struct bulkmat BULK_MATERIAL;
typedef struct matset MATSET;
#define MAX_NFIELD 64
struct bulkmat
{
char *label;
enum
{
KIRCHHOFF, /* elastic material */
TSANG_MARSDEN /* nuclear graphite */
} model;
double young,
poisson,
density;
double tensile; /* tensile strength for fracture check */
double fracene; /* fracture energy */
UMAT umat;
int nfield, /* number of fields (stored at mesh nodes) */
nstate; /* number of state variables (stored at integration points) */
FIELD *fld [MAX_NFIELD]; /* fields */
};
struct matset
{
MEM matmem,
mapmem;
MAP *map; /* label based map */
int size; /* number of materials */
};
/* bulk material routine
* ---------------------
* mat (IN) - material
* state (IN/OUT) - state variables at this integration point
* field (IN) - field variables interpolated from nodes
* F (IN) - deformation gradient (column-wise)
* a (IN) - coefficient that will scale P and K
* P (OUT) - first Piola tensor (column-wise); NULL allowed
* K (OUT) - tangent dP/dF; NULL allowed
* --------------------------------------
* return det (F)
*/
double BULK_MATERIAL_ROUTINE (BULK_MATERIAL *mat, double *state, double *field, double *F, double a, double *P, double *K);
/* create bulk material set */
MATSET* MATSET_Create ();
/* insert new material */
BULK_MATERIAL* MATSET_Insert (MATSET *set, char *label, BULK_MATERIAL data);
/* find by label */
BULK_MATERIAL* MATSET_Find (MATSET *set, char *label);
/* release memory */
void MATSET_Destroy (MATSET *set);
/* export MBFCP definition */
void MATSET_2_MBFCP (MATSET *set, FILE *out);
#endif