1 /*
2 Copyright (C) 1998 Dennis Roddeman
3 email: dennis.roddeman@feat.nl
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software Foundation
17 59 Temple Place, Suite 330, Boston, MA, 02111-1307, USA
18 */
19
20 #include "tochnog.h"
21
user_bounda_time(long int index,double time_current,double & val)22 void user_bounda_time( long int index, double time_current, double &val )
23
24 /* Purpose: user supplied routine for time table for
25 bounda_unknown index.
26
27 You need to skip the error message.
28
29 You need to specify val for all times.
30
31 index: Input. Index of the bounda_unknown record for which the time
32 value is to be given.
33 time_current: Input. Current time.
34 val: Output. Value at time (typically specified here with a function).
35 */
36
37 {
38 cout << "\nError: routine user_bounda_time not programmed.\n";
39 exit(0);
40 }
41
user_change_dataitem_time(long int index,double time_current,double & val)42 void user_change_dataitem_time( long int index, double time_current, double &val )
43
44 /* Purpose: user supplied routine for time table for
45 change_dataitem index.
46
47 You need to skip the error message.
48
49 index: Input. Index of the change_dataitem record for which the time
50 value is to be given.
51 time_current: Input. Current time.
52 val: Output. Value at time (typically specified here with a function).
53 */
54
55 {
56 cout << "\nError: routine user_change_dataitem_time not programmed.\n";
57 exit(0);
58 }
59
user_change_geometry_time(long int index,double time_current,double & val)60 void user_change_geometry_time( long int index, double time_current, double &val )
61
62 /* Purpose: user supplied routine for time table for
63 change_geometry index.
64
65 You need to skip the error message.
66
67 index: Input. Index of the change_geometry record for which the time
68 value is to be given.
69 time_current: Input. Current time.
70 val: Output. Value at time (typically specified here with a function).
71 */
72
73 {
74 cout << "\nError: routine user_change_geometry_time not programmed.\n";
75 exit(0);
76 }
77
user_plasti(long int task,double user_data[],double new_unknowns[],double old_hisv[],double new_hisv[],double new_stress[],double & f)78 void user_plasti( long int task, double user_data[], double new_unknowns[],
79 double old_hisv[], double new_hisv[], double new_stress[], double &f )
80
81 /* Purpose: user supplied routine for calculation of plasticity yield
82 function and flow rule function.
83
84 You need to skip the error message.
85
86 task: Input. 1: Yield function. 2: Flow rule function.
87 user_data[]: Input. User supplied data values (if specified
88 in datafile).
89 new_unknowns: Input. It contains the primary dof values at this
90 integration point at the new time point t+dt.
91 old_hisv: Input. It contains the old estimates for the
92 materi_history_variables (if initialized in the data file).
93 new_hisv: Output. On output it should contain
94 the new estimates for the materi history variables (if initialized in the data file).
95 new_stress: Input. It contains the most recent estimate for
96 the new stresses (if initialized in the data file).
97 f: Output. Yield function if task==1 and flow rule function if task==2.
98
99
100 Example: f_yield = temp * stresszz * stresszz - user_data[0].
101 f_flow = user_data[1] * f_yield
102
103 Assume that materi_stress is initialized first,
104 and condif_temperature is initialized second.
105 Then new_unknowns[] contains:
106 stressxx, stressxy, stressxz, stressyy, stressyz, stresszz, temp
107
108 double f_field;
109
110 f_yield = new_unknowns[6] * new_stress[5] * new_stress[5] - user_data[0];
111 if ( task==1 )
112 f = f_yield;
113 else {
114 assert( task==2 );
115 f = user_data[1] * f_yield;
116 */
117
118 {
119 cout << "\nError: routine user_plasti not programmed.\n";
120 exit(0);
121 }
122
123
user_sigma(double user_data[],double new_unknowns[],double inc_epe[],double old_hisv[],double new_hisv[],double old_stress[],double new_stress[],double Cuser[3][3][3][3])124 void user_sigma( double user_data[], double new_unknowns[],
125 double inc_epe[], double old_hisv[],
126 double new_hisv[], double old_stress[], double new_stress[],
127 double Cuser[3][3][3][3] )
128
129 /* Purpose: user supplied routine for adding incremental stresses
130 (stress increments over dt).
131
132 Note: this routine should only be used when materi_strain_total is
133 initialised.
134
135 user_data: Input. User supplied data values (if specified
136 in datafile).
137 new_unknowns: Input. It contains the primary dof values at this
138 integration point at the new time point.
139 inc_epe: Input. It contains the most recent estimate for
140 the incremental elastic strains, i.e.
141 the total strain increment minus the plastic strain increment (inc_epexx,
142 inc_epexy, inc_epexz, inc_epeyx, inc_epeyy, inc_epeyz, inc_epezx,
143 inc_epezy, inc_epezz).
144 new_epe: Input. It contains the most recent estimate for
145 the elastic strains (if initialized in the data file).
146 old_hisv: Input. On input it contains
147 the old estimates for the materi history variables (if initialized in the data file).
148 new_hisv: Output. On output it should contain
149 the new estimates for the materi history variables (if initialized in the data file).
150 old_stress: Input. The old elastic stresses.
151 For all number_of_space_dimensions these iold
152 stresses are old_stressxx, old_stressxy, old_stressxz, old_stressyx, old_stressyy,
153 old_stressyz, old_ stresszx, old_stresszy, old_stresszz.
154 new_stress: Output. The incremental elastic stresses should
155 be added. For all number_of_space_dimensions these
156 are inc_stressxx, inc_stressxy, inc_stressxz, inc_stressyx, inc_stressyy,
157 inc_stressyz, inc_stresszx, inc_stresszy, inc_stresszz.
158 Cuser: Input and Output. The material stiffness matrix needs
159 to be added. Cuser[i][j][k][l] = delta stress[i][j] / delta epsilon[[k][l].
160 In case of membrane stresses you need to use the membrane stiffness.
161
162 */
163
164 {
165 }
166
user_viscosity(double user_data[],double new_unknowns[],double & visc)167 void user_viscosity( double user_data[], double new_unknowns[], double &visc )
168
169 /* Purpose: user supplied routine for calculation of viscosity.
170
171 user_data: Input. User supplied data values (if specified
172 in datafile).
173 new_unknowns: Input. It contains the primary dof values at this
174 integration point at the new time point.
175 visc: Output. Viscosity.
176
177 Example: visc = user_data[0] * ( user_data[1] - temp );
178
179 Assume that materi_strain_total is initialized first,
180 and condif_temperature is initialized second.
181 Then new_unknowns[] contains:
182 eptxx, eptxy, eptxz, eptyy, eptyz, eptzz, temp
183
184 visc = user_data[0] * ( user_data[1] - new_unknowns[6] );
185 */
186
187 {
188 cout << "\nError: routine user_viscosity not programmed.\n";
189 exit(0);
190 }
191