forked from goma/goma
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmm_fill_solid.h
286 lines (260 loc) · 18.6 KB
/
mm_fill_solid.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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/************************************************************************ *
* Goma - Multiphysics finite element software *
* Sandia National Laboratories *
* *
* Copyright (c) 2022 Goma Developers, National Technology & Engineering *
* Solutions of Sandia, LLC (NTESS) *
* *
* Under the terms of Contract DE-NA0003525, the U.S. Government retains *
* certain rights in this software. *
* *
* This software is distributed under the GNU General Public License. *
* See LICENSE file. *
\************************************************************************/
#ifndef GOMA_MM_FILL_SOLID_H
#define GOMA_MM_FILL_SOLID_H
#include "el_elm.h"
#include "exo_struct.h"
#include "mm_fill_rs.h"
#include "rf_fem_const.h"
#include "std.h"
struct Boundary_Condition;
struct Elastic_Constitutive;
#ifdef EXTERN
#undef EXTERN
#endif
#ifdef GOMA_MM_FILL_SOLID_C
#define EXTERN /* do nothing */
#endif
#ifndef GOMA_MM_FILL_SOLID_C
#define EXTERN extern
#endif
EXTERN int belly_flop /* mm_fill_solid.c */
(dbl); /* mu - elastic modulus (plane stress case) */
EXTERN void invert_tensor /* mm_fill_solid.c */
(double[DIM][DIM], /* A - tensor to be inverted */
double[DIM][DIM], /* B - inverted tensor */
int, /* dim - dimensions of tensor */
double[DIM][DIM][DIM][MDE], /* dA - sensitivities of tensor to be
* inverted */
double[DIM][DIM][DIM][MDE], /* dB - sensitivities of inverted
* tensor */
int, /* dof - number of dofs of variable for
* sensitivities */
int); /* sense - flag to calculate sensitivities */
EXTERN void slope_n_dot_n0_bc /* mm_fill_solid.c */
(double[DIM], /* func */
double[DIM][MAX_VARIABLE_TYPES + MAX_CONC][MDE], /* d_func */
double, /* slopex */
double, /* slopey */
double); /* slopez */
EXTERN void force_n_dot_f_bc /* mm_fill_solid.c */
(double[DIM], /* func */
double[DIM][MAX_VARIABLE_TYPES + MAX_CONC][MDE], /* d_func */
const double, /* forcex */
const double, /* forcey */
const double, /* forcez */
const int, /* sic_flag */
const double, /* delta_t */
const double, /* theta */
const int, /* ip */
const int, /* ip_total */
const double); /* time_value */
EXTERN void rep_force_n_dot_f_bc /* mm_fill_solid.c */
(double[DIM], /* func */
double[DIM][MAX_VARIABLE_TYPES + MAX_CONC][MDE], /* d_func */
const double, /* pr - coeff for repulsion force to ensure
* no penetration of the solid boundary by the
* free surface */
const double, /* ap - a coefficient in plane equation */
const double, /* bp - b coefficient in plane equation */
const double, /* cp - c coefficient in plane equation */
const double, /* dp - d coefficient in plane equation */
const double, /* repexp - repulsive force exponent */
const double, /* friction - friction coefficient */
const int); /* BC id # */
EXTERN void rep_force_roll_n_dot_f_bc /* mm_fill_solid.c */
(double[DIM], /* func */
double[DIM][MAX_VARIABLE_TYPES + MAX_CONC][MDE], /* d_func */
const double, /* pr - coeff for repulsion force to ensure
* no penetration of the solid boundary by the
* free surface */
const double[3], /* ap - a coefficient in plane equation */
const double[3], /* bp - b coefficient in plane equation */
const double, /* roll_rad - radius of cylindrical indentor */
const double, /* repexp - repulsive force exponent */
const double, /* friction - friction coefficient */
const int); /* BC id # */
EXTERN void norm_force_n_dot_f_bc /* mm_fill_solid.c */
(double[DIM], /* func */
double[DIM][MAX_VARIABLE_TYPES + MAX_CONC][MDE], /* d_func */
double, /* forcex */
double, /* forcey */
double); /* forcez */
EXTERN void put_liquid_stress_in_solid /* mm_fill_solid.c */
(int, /* id - local element node number for the
* current node whose residual contribution
* is being sought */
int, /* I - Global node number */
int, /* ielem_dim - physical dimension of element,
* ie., 1, 2, 3 */
double[], /* resid_vector - Residual vector NO DUH! */
int, /* i_mat_solid - mat block id's of solid */
int, /* i_mat_fluid - mat block id's of liquid */
int[], /* local_node_list_fs - MDE list to keep track
* of nodes at which liquid contributions have
* been transfered to solid (fluid-solid
* boundaries) */
double); /* scale - term scaling */
EXTERN void put_liquid_stress_in_solid_ALE /* mm_fill_solid.c */
(int, /* id - local element node number for the
* current node whose residual contribution
* is being sought */
int, /* I - Global node number */
int, /* ielem_dim - physical dimension of element,
* ie., 1, 2, 3 */
double[], /* resid_vector - Residual vector NO DUH! */
int, /* i_mat_solid - mat block id's of solid */
int, /* i_mat_fluid - mat block id's of liquid */
int[], /* local_node_list_fs - MDE list to keep track
* of nodes at which liquid contributions have
* been transfered to solid (fluid-solid
* boundaries) */
double); /* scale - term scaling */
EXTERN
void put_fluid_stress_on_shell(
int id, /* local bulk element node number for the
* current node whose residual contribution
* is being sought */
int id_shell_curv, /* local shell element node number corresponding to id */
int id_shell_tens, /* local shell element node number corresponding to id */
int I, /* Global node number */
int ielem_dim, /* physical dimension of the elem */
double resid_vector[], /* Residual vector */
int local_node_list_fs[], /* MDE list to keep track
* of nodes at which
* bulk contributions
* have been transfered
* to shell */
double scale); /* Scale factor, nondimension */
EXTERN void put_shear_stress_on_shell(int, /* local element node number for the
* current node whose residual contribution
* is being sought */
int, /* local shell element node number corresponding to id */
int, /* Global node number */
int, /* physical dimension of the elem */
int[], /* MDE list to keep track
* of nodes at which
* solid contributions
* have been transfered
* to liquid (fluid-solid
* boundaries) */
double); /* Scale factor, nondimension */
EXTERN void penetration /* mm_fill_solid.c */
(double[], /* func */
double[DIM][MAX_VARIABLE_TYPES + MAX_CONC][MDE], /* d_func */
double[DIM], /* x_dot - mesh velocity vector */
dbl, /* tt - parameter to vary time integration
* from explicit (tt = 1) to
* implicit (tt = 0) */
dbl, /* dt - current value of the time step */
int, /* bc_input_id */
struct Boundary_Condition *, /* BC_Types - */
int, /* i_mat_solid */
int); /* i_mat_fluid */
EXTERN void no_slip /* mm_fill_solid.c */
(double[], /* func */
double[DIM][MAX_VARIABLE_TYPES + MAX_CONC][MDE], /* d_func */
double[DIM], /* x_dot - mesh velocity vector */
double[DIM], /* x_rs_dot - mesh velocity vector */
dbl, /* tt - parameter to vary time integration
* from explicit (tt = 1) to
* implicit (tt = 0) */
dbl, /* dt - current value of the time step */
int, /* bc_input_id */
struct Boundary_Condition *, /* BC_Types - */
int, /* i_mat_solid */
int); /* i_mat_fluid */
EXTERN int mesh_stress_tensor /* mm_fill_solid.c */
(dbl[DIM][DIM], /* TT */
dbl[DIM][DIM][DIM][MDE], /* dTT_dx */
dbl[DIM][DIM][MDE], /* dTT_dp */
dbl[DIM][DIM][MAX_CONC][MDE], /* dTT_dc */
dbl[DIM][DIM][MDE], /* dTT_dp_liq */
dbl[DIM][DIM][MDE], /* dTT_dp_gas */
dbl[DIM][DIM][MDE], /* dTT_dporosity */
dbl[DIM][DIM][MDE], /* dTT_dsink_mass */
dbl[DIM][DIM][MDE], /* dTT_dT */
dbl[DIM][DIM][MDE], /* dTT_dmax_strain */
dbl[DIM][DIM][MDE], /* dTT_dcur_strain */
dbl, /* mu */
dbl, /* lambda */
dbl, /* delta_t */
int, /* ielem - current element number */
int, /* ip - current integration point */
int); /* ip_total - num gauss points in element */
EXTERN int get_evp_stress_tensor /* mm_fill_solid.c */
(dbl[DIM][DIM], /* TT */
dbl[DIM][DIM][DIM][MDE], /* dTT_dx */
dbl[DIM][DIM][MDE], /* dTT_dp */
dbl[DIM][DIM][MAX_CONC][MDE], /* dTT_dc */
dbl, /* mu */
dbl, /* lambda */
dbl, /* delta_t */
int, /* ielem - current element number */
int, /* ip - current integration point */
int); /* ip_total - num gauss points in element */
EXTERN int get_F_vp /* mm_fill_solid.c */
(dbl[DIM][DIM], /* F_vp */
dbl[DIM][DIM], /* F_vp_old */
dbl[DIM][DIM], /* TT */
dbl[DIM][DIM][DIM][MDE], /* dTT_dx */
dbl[DIM][DIM][MAX_CONC][MDE], /* dTT_dc */
dbl[DIM][DIM][DIM][MDE], /* dF_vp_dx */
dbl[DIM][DIM][MAX_CONC][MDE], /* dF_vp_dc */
dbl[MAX_CONC][MDE], /* d_plastic_mu_dc */
dbl[MAX_CONC][MDE], /* d_yield_dc */
dbl); /* delta_t */
EXTERN int load_elastic_properties /* mm_fill_solid.c */
(struct Elastic_Constitutive *,
double *, /* mu */
double *, /* lambda */
double *, /* thermexp */
double[MAX_CONC], /* speciesexp */
double *, /* viscos */
double *, /* dil_viscos */
double[DIM][MDE], /* d_mu_dx */
double[DIM][MDE], /* d_lambda_dx */
double[MAX_VARIABLE_TYPES + MAX_CONC], /* d_thermexp_dx */
double[MAX_CONC][MAX_VARIABLE_TYPES + MAX_CONC], /* d_speciesexp_dx */
double[MAX_VARIABLE_TYPES + MAX_CONC], /* d_viscos_dx */
double[MAX_VARIABLE_TYPES + MAX_CONC]); /* d_dilviscos_dx */
EXTERN int load_plastic_properties /* mm_fill_solid.c */
(double[MAX_CONC][MDE], /* d_plastic_mu_dc */
double[MAX_CONC][MDE]); /* d_yield_dc */
EXTERN int check_for_neg_elem_volume(int, /* element block to check */
double[], /* x */
double[], /* resid_vector */
double[], /* x_old */
double[], /* x_older */
double[], /* xdot */
double[], /* xdot_old */
double[], /* x_update */
double *, /* delta_t */
double *, /* theta */
double *, /* time_value */
Exo_DB *); /* exo */
EXTERN void friction_n_dot_f_bc /* mm_fill_solid.c */
(double[DIM], /* func */
double[DIM][MAX_VARIABLE_TYPES + MAX_CONC][MDE], /* d_func */
const double, /* friction coefficient */
const int, /* block id */
const double, /* delta_t */
const double, /* theta */
const int, /* ip */
const int, /* ip_total */
const int, /* BC_Name */
const double, /* time_value */
const double[], /* parameter_list*/
const int); /* number of parameters */
#endif /* GOMA_MM_FILL_SOLID_H */