Skip to content

Commit 40b9aa1

Browse files
committed
Use consistent way to compute deformation gradient
We are now using F=I+grad_u for every shape of the solid elements to compute the deformation gradient.
1 parent ed8cb14 commit 40b9aa1

21 files changed

+343
-359
lines changed

src/solid_3D_ele/4C_solid_3D_ele_calc_lib.hpp

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -588,28 +588,12 @@ namespace Discret::Elements
588588
const JacobianMapping<celltype>& jacobian_mapping,
589589
const ElementNodes<celltype>& element_nodes, const double scale_defgrd = 1.0)
590590
{
591-
Core::LinAlg::Tensor<double, 3, 3> defgrd;
592-
if constexpr (celltype == Core::FE::CellType::hex8)
593-
{
594-
// For some reason, some contact tests with hex8 discretization don't like the computation
595-
// of the deformation gradient based on the nodal displacements. They only converge if the
596-
// deformation gradient is computed based on the current coordinates. Similarly, there are
597-
// ssi and ssti tests with an tet4 discretization that only converge when using the
598-
// displacements. Until we found the problem, we compute the deformation gradient based on
599-
// the current coordinates (F=(X+u)^T dN/dX^T) for hex8 and based on the displacement (F=I
600-
// + u^T dN/dX^T) for the other celltypes.
601-
Core::LinAlg::make_matrix_view(defgrd).multiply_nt(scale_defgrd,
602-
element_nodes.current_coordinates,
603-
Core::LinAlg::make_matrix_view(jacobian_mapping.N_XYZ));
604-
}
605-
else
606-
{
607-
defgrd = Core::LinAlg::get_full(Core::LinAlg::TensorGenerators::identity<double,
608-
Core::FE::dim<celltype>, Core::FE::dim<celltype>>);
591+
Core::LinAlg::Tensor<double, 3, 3> defgrd =
592+
Core::LinAlg::get_full(Core::LinAlg::TensorGenerators::identity<double,
593+
Core::FE::dim<celltype>, Core::FE::dim<celltype>>);
609594

610-
Core::LinAlg::make_matrix_view(defgrd).multiply_nt(scale_defgrd, element_nodes.displacements,
611-
Core::LinAlg::make_matrix_view(jacobian_mapping.N_XYZ), scale_defgrd);
612-
}
595+
Core::LinAlg::make_matrix_view(defgrd).multiply_nt(scale_defgrd, element_nodes.displacements,
596+
Core::LinAlg::make_matrix_view(jacobian_mapping.N_XYZ), scale_defgrd);
613597

614598
return defgrd;
615599
}

tests/input_files/cardiovascular0d_arterialproxdist_structure_direct_genalpha.4C.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ RESULT DESCRIPTION:
9191
DIS: "structure"
9292
NODE: 226
9393
QUANTITY: "dispz"
94-
VALUE: 8.0088764
94+
VALUE: 8.0082124
9595
TOLERANCE: 1e-06
9696
DESIGN SURF DIRICH CONDITIONS:
9797
- E: 1

tests/input_files/cardiovascular0d_arterialproxdist_structure_direct_genalpha_mor.4C.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ RESULT DESCRIPTION:
8888
DIS: "structure"
8989
NODE: 226
9090
QUANTITY: "dispz"
91-
VALUE: 11.76073357
91+
VALUE: 11.76097949
9292
TOLERANCE: 1e-06
9393
DESIGN SURF DIRICH CONDITIONS:
9494
- E: 1

tests/input_files/cardiovascular0d_arterialproxdist_structure_direct_genalpha_new_struc.4C.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ RESULT DESCRIPTION:
9898
DIS: "structure"
9999
NODE: 226
100100
QUANTITY: "dispz"
101-
VALUE: 8.0088764
101+
VALUE: 8.0082124
102102
TOLERANCE: 1e-06
103103
DESIGN SURF DIRICH CONDITIONS:
104104
- E: 1

tests/input_files/cardiovascular0d_syspulcirculation_2chamber_structure_direct_genalpha.4C.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -146,37 +146,37 @@ RESULT DESCRIPTION:
146146
DIS: "cardiovascular0d"
147147
SPECIAL: true
148148
QUANTITY: "p_at_l"
149-
VALUE: 0.559884105
149+
VALUE: 0.55984112
150150
TOLERANCE: 1e-06
151151
- CARDIOVASCULAR0D:
152152
DIS: "cardiovascular0d"
153153
SPECIAL: true
154154
QUANTITY: "q_vin_l"
155-
VALUE: 3572.215
155+
VALUE: 3579.218
156156
TOLERANCE: 1e-02
157157
- CARDIOVASCULAR0D:
158158
DIS: "cardiovascular0d"
159159
SPECIAL: true
160160
QUANTITY: "q_vout_l"
161-
VALUE: -0.873007587
161+
VALUE: -0.8730205
162162
TOLERANCE: 1e-06
163163
- CARDIOVASCULAR0D:
164164
DIS: "cardiovascular0d"
165165
SPECIAL: true
166166
QUANTITY: "p_v_l"
167-
VALUE: 0.55631152575
167+
VALUE: 0.5562618947
168168
TOLERANCE: 1e-06
169169
- CARDIOVASCULAR0D:
170170
DIS: "cardiovascular0d"
171171
SPECIAL: true
172172
QUANTITY: "p_ar_sys"
173-
VALUE: 9.28639031
173+
VALUE: 9.28646698
174174
TOLERANCE: 1e-06
175175
- CARDIOVASCULAR0D:
176176
DIS: "cardiovascular0d"
177177
SPECIAL: true
178178
QUANTITY: "q_ar_sys"
179-
VALUE: 60020.54353557
179+
VALUE: 60021.21905
180180
TOLERANCE: 1e-01
181181
- CARDIOVASCULAR0D:
182182
DIS: "cardiovascular0d"
@@ -188,61 +188,61 @@ RESULT DESCRIPTION:
188188
DIS: "cardiovascular0d"
189189
SPECIAL: true
190190
QUANTITY: "q_ven_sys"
191-
VALUE: 76552.110876
191+
VALUE: 76552.67
192192
TOLERANCE: 1e-01
193193
- CARDIOVASCULAR0D:
194194
DIS: "cardiovascular0d"
195195
SPECIAL: true
196196
QUANTITY: "p_at_r"
197-
VALUE: 0.28536038599529967
197+
VALUE: 0.28534563
198198
TOLERANCE: 1e-06
199199
- CARDIOVASCULAR0D:
200200
DIS: "cardiovascular0d"
201201
SPECIAL: true
202202
QUANTITY: "q_vin_r"
203-
VALUE: 28909.89
203+
VALUE: 29402.63
204204
TOLERANCE: 1e-01
205205
- CARDIOVASCULAR0D:
206206
DIS: "cardiovascular0d"
207207
SPECIAL: true
208208
QUANTITY: "q_vout_r"
209-
VALUE: -0.1890935624
209+
VALUE: -0.189146138
210210
TOLERANCE: 1e-06
211211
- CARDIOVASCULAR0D:
212212
DIS: "cardiovascular0d"
213213
SPECIAL: true
214214
QUANTITY: "p_v_r"
215-
VALUE: 0.2564504
215+
VALUE: 0.255943006
216216
TOLERANCE: 1e-06
217217
- CARDIOVASCULAR0D:
218218
DIS: "cardiovascular0d"
219219
SPECIAL: true
220220
QUANTITY: "p_ar_pul"
221-
VALUE: 2.1473860428297766
221+
VALUE: 2.1474043877
222222
TOLERANCE: 1e-06
223223
- CARDIOVASCULAR0D:
224224
DIS: "cardiovascular0d"
225225
SPECIAL: true
226226
QUANTITY: "q_ar_pul"
227-
VALUE: 30912.234873850
227+
VALUE: 30911.1402
228228
TOLERANCE: 1e-01
229229
- CARDIOVASCULAR0D:
230230
DIS: "cardiovascular0d"
231231
SPECIAL: true
232232
QUANTITY: "p_ven_pul"
233-
VALUE: 1.6837022448701402
233+
VALUE: 1.6837373
234234
TOLERANCE: 1e-06
235235
- CARDIOVASCULAR0D:
236236
DIS: "cardiovascular0d"
237237
SPECIAL: true
238238
QUANTITY: "q_ven_pul"
239-
VALUE: 74921.268
239+
VALUE: 74926.411
240240
TOLERANCE: 1e-01
241241
- STRUCTURE:
242242
DIS: "structure"
243243
NODE: 226
244244
QUANTITY: "dispz"
245-
VALUE: -0.449860625
245+
VALUE: -0.448923267
246246
TOLERANCE: 1e-06
247247
DESIGN SURF NEUMANN CONDITIONS:
248248
- E: 8

tests/input_files/cardiovascular0d_syspulcirculation_2chamber_structure_simple_genalpha.4C.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -158,37 +158,37 @@ RESULT DESCRIPTION:
158158
DIS: "cardiovascular0d"
159159
SPECIAL: true
160160
QUANTITY: "p_at_l"
161-
VALUE: 0.5598841
161+
VALUE: 0.5598411
162162
TOLERANCE: 1e-06
163163
- CARDIOVASCULAR0D:
164164
DIS: "cardiovascular0d"
165165
SPECIAL: true
166166
QUANTITY: "q_vin_l"
167-
VALUE: 3572.215260
167+
VALUE: 3579.2180105
168168
TOLERANCE: 1e-06
169169
- CARDIOVASCULAR0D:
170170
DIS: "cardiovascular0d"
171171
SPECIAL: true
172172
QUANTITY: "q_vout_l"
173-
VALUE: -0.873007587
173+
VALUE: -0.873020508
174174
TOLERANCE: 1e-06
175175
- CARDIOVASCULAR0D:
176176
DIS: "cardiovascular0d"
177177
SPECIAL: true
178178
QUANTITY: "p_v_l"
179-
VALUE: 0.556311525756
179+
VALUE: 0.5562618947
180180
TOLERANCE: 1e-06
181181
- CARDIOVASCULAR0D:
182182
DIS: "cardiovascular0d"
183183
SPECIAL: true
184184
QUANTITY: "p_ar_sys"
185-
VALUE: 9.2863903
185+
VALUE: 9.2864669756
186186
TOLERANCE: 1e-06
187187
- CARDIOVASCULAR0D:
188188
DIS: "cardiovascular0d"
189189
SPECIAL: true
190190
QUANTITY: "q_ar_sys"
191-
VALUE: 60020.567167
191+
VALUE: 60021.219047
192192
TOLERANCE: 1e-05
193193
- CARDIOVASCULAR0D:
194194
DIS: "cardiovascular0d"
@@ -200,61 +200,61 @@ RESULT DESCRIPTION:
200200
DIS: "cardiovascular0d"
201201
SPECIAL: true
202202
QUANTITY: "q_ven_sys"
203-
VALUE: 76552.110999
203+
VALUE: 76552.670945
204204
TOLERANCE: 1e-05
205205
- CARDIOVASCULAR0D:
206206
DIS: "cardiovascular0d"
207207
SPECIAL: true
208208
QUANTITY: "p_at_r"
209-
VALUE: 0.28536038599529023
209+
VALUE: 0.28534633
210210
TOLERANCE: 1e-06
211211
- CARDIOVASCULAR0D:
212212
DIS: "cardiovascular0d"
213213
SPECIAL: true
214214
QUANTITY: "q_vin_r"
215-
VALUE: 28909.834795
215+
VALUE: 29402.627819
216216
TOLERANCE: 1e-05
217217
- CARDIOVASCULAR0D:
218218
DIS: "cardiovascular0d"
219219
SPECIAL: true
220220
QUANTITY: "q_vout_r"
221-
VALUE: -0.1890935624
221+
VALUE: -0.189146138
222222
TOLERANCE: 1e-06
223223
- CARDIOVASCULAR0D:
224224
DIS: "cardiovascular0d"
225225
SPECIAL: true
226226
QUANTITY: "p_v_r"
227-
VALUE: 0.256450353
227+
VALUE: 0.255943006
228228
TOLERANCE: 1e-06
229229
- CARDIOVASCULAR0D:
230230
DIS: "cardiovascular0d"
231231
SPECIAL: true
232232
QUANTITY: "p_ar_pul"
233-
VALUE: 2.1473860428298606
233+
VALUE: 2.147404387685
234234
TOLERANCE: 1e-06
235235
- CARDIOVASCULAR0D:
236236
DIS: "cardiovascular0d"
237237
SPECIAL: true
238238
QUANTITY: "q_ar_pul"
239-
VALUE: 30912.19004
239+
VALUE: 30911.14022
240240
TOLERANCE: 1e-05
241241
- CARDIOVASCULAR0D:
242242
DIS: "cardiovascular0d"
243243
SPECIAL: true
244244
QUANTITY: "p_ven_pul"
245-
VALUE: 1.683702244870212
245+
VALUE: 1.683737284
246246
TOLERANCE: 1e-06
247247
- CARDIOVASCULAR0D:
248248
DIS: "cardiovascular0d"
249249
SPECIAL: true
250250
QUANTITY: "q_ven_pul"
251-
VALUE: 74921.26821
251+
VALUE: 74926.41144
252252
TOLERANCE: 1e-05
253253
- STRUCTURE:
254254
DIS: "structure"
255255
NODE: 226
256256
QUANTITY: "dispz"
257-
VALUE: -0.4498606
257+
VALUE: -0.448923
258258
TOLERANCE: 1e-06
259259
DESIGN SURF NEUMANN CONDITIONS:
260260
- E: 8

0 commit comments

Comments
 (0)