Skip to content

Commit 83ab98f

Browse files
committed
Temperature dependent orthotropic material #215
1 parent 479773a commit 83ab98f

File tree

20 files changed

+281
-171
lines changed

20 files changed

+281
-171
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,19 @@ SPDX-License-Identifier: BSD-3-Clause
88

99
All notable changes to this project will be documented in this file.
1010

11-
## [1.2.6] - 2024-01-10
11+
## [1.2.7] - 2025-01.20
12+
13+
### Added
14+
15+
- Temperature dependent orthotropic material #215
16+
- Blockwise angle definition
17+
18+
### Fixed
19+
20+
- Field allocation for additive
21+
- MPI Testing
22+
23+
## [1.2.6] - 2025-01-10
1224

1325
### Added
1426

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Combinatorics = "^1"
4949
DataFrames = "^1"
5050
DataStructures = "^0.18"
5151
Dates = "^1"
52-
Dierckx = "< 0.5.2"
52+
Dierckx = "^0.5"
5353
Exodus = "^0.13"
5454
FastGaussQuadrature = "^1"
5555
JSON3 = "^1"

examples/Undulations/Smetana.yaml

Lines changed: 12 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -159,16 +159,8 @@ PeriLab:
159159
C55: 4200.000000000001
160160
C56: 0.0
161161
C66: 42170.22415673136
162-
Hourglass Coefficient: 1.0
163162
Material Model: Correspondence Elastic
164-
Material Symmetry: Anisotropic
165-
Plane Stress: true
166-
Poisson's Ratio: 0.33999999999999997
167-
Stabilization Type: Global Stiffness
168-
Symmetry: isotropic plane stress
169-
Thermal Bond Based: true
170-
Thickness: 1.0
171-
Young's Modulus: 165000.0
163+
Symmetry: Anisotropic plane strain
172164
Zero Energy Control: "Global"
173165
mat_10:
174166
C11: 168977.79883095485
@@ -192,16 +184,8 @@ PeriLab:
192184
C55: 5600.0
193185
C56: 0.0
194186
C66: 5600.0
195-
Hourglass Coefficient: 1.0
196187
Material Model: Correspondence Elastic
197-
Material Symmetry: Anisotropic
198-
Plane Stress: true
199-
Poisson's Ratio: 0.33999999999999997
200-
Stabilization Type: Global Stiffness
201-
Symmetry: isotropic plane stress
202-
Thermal Bond Based: true
203-
Thickness: 1.0
204-
Young's Modulus: 165000.0
188+
Symmetry: Anisotropic plane strain
205189
Zero Energy Control: "Global"
206190
mat_11:
207191
C11: 168977.79883095485
@@ -225,16 +209,8 @@ PeriLab:
225209
C55: 5600.0
226210
C56: 0.0
227211
C66: 5600.0
228-
Hourglass Coefficient: 1.0
229212
Material Model: Correspondence Elastic
230-
Material Symmetry: Anisotropic
231-
Plane Stress: true
232-
Poisson's Ratio: 0.33999999999999997
233-
Stabilization Type: Global Stiffness
234-
Symmetry: isotropic plane stress
235-
Thermal Bond Based: true
236-
Thickness: 1.0
237-
Young's Modulus: 165000.0
213+
Symmetry: Anisotropic plane strain
238214
Zero Energy Control: "Global"
239215
mat_12:
240216
C11: 168977.79883095485
@@ -258,16 +234,8 @@ PeriLab:
258234
C55: 5600.0
259235
C56: 0.0
260236
C66: 5600.0
261-
Hourglass Coefficient: 1.0
262237
Material Model: Correspondence Elastic
263-
Material Symmetry: Anisotropic
264-
Plane Stress: true
265-
Poisson's Ratio: 0.33999999999999997
266-
Stabilization Type: Global Stiffness
267-
Symmetry: isotropic plane stress
268-
Thermal Bond Based: true
269-
Thickness: 1.0
270-
Young's Modulus: 165000.0
238+
Symmetry: Anisotropic plane strain
271239
Zero Energy Control: "Global"
272240
mat_2:
273241
C11: 11402.506122303133
@@ -291,16 +259,8 @@ PeriLab:
291259
C55: 2800.0
292260
C56: 0.0
293261
C66: 5600.0
294-
Hourglass Coefficient: 1.0
295262
Material Model: Correspondence Elastic
296-
Material Symmetry: Anisotropic
297-
Plane Stress: true
298-
Poisson's Ratio: 0.33999999999999997
299-
Stabilization Type: Global Stiffness
300-
Symmetry: isotropic plane stress
301-
Thermal Bond Based: true
302-
Thickness: 1.0
303-
Young's Modulus: 165000.0
263+
Symmetry: Anisotropic plane strain
304264
Zero Energy Control: "Global"
305265
mat_3:
306266
C11: 53619.92831989757
@@ -324,16 +284,8 @@ PeriLab:
324284
C55: 4200.000000000001
325285
C56: 0.0
326286
C66: 42170.224156731456
327-
Hourglass Coefficient: 1.0
328287
Material Model: Correspondence Elastic
329-
Material Symmetry: Anisotropic
330-
Plane Stress: true
331-
Poisson's Ratio: 0.33999999999999997
332-
Stabilization Type: Global Stiffness
333-
Symmetry: isotropic plane stress
334-
Thermal Bond Based: true
335-
Thickness: 1.0
336-
Young's Modulus: 165000.0
288+
Symmetry: Anisotropic plane strain
337289
Zero Energy Control: "Global"
338290
mat_4:
339291
C11: 168977.79883095485
@@ -357,16 +309,8 @@ PeriLab:
357309
C55: 5600.0
358310
C56: 0.0
359311
C66: 5600.0
360-
Hourglass Coefficient: 1.0
361312
Material Model: Correspondence Elastic
362-
Material Symmetry: Anisotropic
363-
Plane Stress: true
364-
Poisson's Ratio: 0.33999999999999997
365-
Stabilization Type: Global Stiffness
366-
Symmetry: isotropic plane stress
367-
Thermal Bond Based: true
368-
Thickness: 1.0
369-
Young's Modulus: 165000.0
313+
Symmetry: Anisotropic plane strain
370314
Zero Energy Control: "Global"
371315
mat_5:
372316
C11: 168977.79883095485
@@ -390,16 +334,8 @@ PeriLab:
390334
C55: 5600.0
391335
C56: 0.0
392336
C66: 5600.0
393-
Hourglass Coefficient: 1.0
394337
Material Model: Correspondence Elastic
395-
Material Symmetry: Anisotropic
396-
Plane Stress: true
397-
Poisson's Ratio: 0.33999999999999997
398-
Stabilization Type: Global Stiffness
399-
Symmetry: isotropic plane stress
400-
Thermal Bond Based: true
401-
Thickness: 1.0
402-
Young's Modulus: 165000.0
338+
Symmetry: Anisotropic plane strain
403339
Zero Energy Control: "Global"
404340
mat_6:
405341
C11: 53619.92831989757
@@ -423,16 +359,8 @@ PeriLab:
423359
C55: 4200.000000000001
424360
C56: 0.0
425361
C66: 42170.224156731456
426-
Hourglass Coefficient: 1.0
427362
Material Model: Correspondence Elastic
428-
Material Symmetry: Anisotropic
429-
Plane Stress: true
430-
Poisson's Ratio: 0.33999999999999997
431-
Stabilization Type: Global Stiffness
432-
Symmetry: isotropic plane stress
433-
Thermal Bond Based: true
434-
Thickness: 1.0
435-
Young's Modulus: 165000.0
363+
Symmetry: Anisotropic plane strain
436364
Zero Energy Control: "Global"
437365
mat_7:
438366
C11: 11402.506122303133
@@ -456,16 +384,8 @@ PeriLab:
456384
C55: 2800.0
457385
C56: 0.0
458386
C66: 5600.0
459-
Hourglass Coefficient: 1.0
460387
Material Model: Correspondence Elastic
461-
Material Symmetry: Anisotropic
462-
Plane Stress: true
463-
Poisson's Ratio: 0.33999999999999997
464-
Stabilization Type: Global Stiffness
465-
Symmetry: isotropic plane stress
466-
Thermal Bond Based: true
467-
Thickness: 1.0
468-
Young's Modulus: 165000.0
388+
Symmetry: Anisotropic plane strain
469389
Zero Energy Control: "Global"
470390
mat_8:
471391
C11: 53619.92831989742
@@ -489,16 +409,8 @@ PeriLab:
489409
C55: 4200.000000000001
490410
C56: 0.0
491411
C66: 42170.22415673136
492-
Hourglass Coefficient: 1.0
493412
Material Model: Correspondence Elastic
494-
Material Symmetry: Anisotropic
495-
Plane Stress: true
496-
Poisson's Ratio: 0.33999999999999997
497-
Stabilization Type: Global Stiffness
498-
Symmetry: isotropic plane stress
499-
Thermal Bond Based: true
500-
Thickness: 1.0
501-
Young's Modulus: 165000.0
413+
Symmetry: Anisotropic plane strain
502414
Zero Energy Control: "Global"
503415
mat_9:
504416
C11: 168977.79883095485
@@ -522,16 +434,8 @@ PeriLab:
522434
C55: 5600.0
523435
C56: 0.0
524436
C66: 5600.0
525-
Hourglass Coefficient: 1.0
526437
Material Model: Correspondence Elastic
527-
Material Symmetry: Anisotropic
528-
Plane Stress: true
529-
Poisson's Ratio: 0.33999999999999997
530-
Stabilization Type: Global Stiffness
531-
Symmetry: isotropic plane stress
532-
Thermal Bond Based: true
533-
Thickness: 1.0
534-
Young's Modulus: 165000.0
438+
Symmetry: Anisotropic plane strain
535439
Zero Energy Control: "Global"
536440
Pre Calculation Global:
537441
Bond Associated Deformation Gradient: false

src/Compute/compute_field_values.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ function calculate_stresses(
160160
if options["Calculate Strain"]
161161
material_parameter = datamanager.get_properties(block, "Material Model")
162162
hookeMatrix = get_Hooke_matrix(
163+
datamanager,
163164
material_parameter,
164165
material_parameter["Symmetry"],
165166
datamanager.get_dof(),

src/Core/Solver/Solver_control.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function set_angles(datamanager::Module, params::Dict, block_nodes::Dict)
185185
for block in eachindex(block_nodes)
186186
angles_global = get_angles(params, block, dof)
187187
for iID in block_nodes[block]
188-
angles[iID, :] = angles_global
188+
angles[iID, :] .= angles_global
189189
end
190190
end
191191
end

src/Models/Damage/Energy_release.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ function get_quad_horizon(horizon::Float64, dof::Int64, thickness::Float64)
279279
end
280280
return Float64(4 / (pi * horizon^4))
281281
end
282+
282283
function init_model(
283284
datamanager::Module,
284285
nodes::Union{SubArray,Vector{Int64}},

src/Models/Material/Material_Basis.jl

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ using LinearAlgebra
77
using LoopVectorization
88
using StaticArrays
99
include("../../Support/Helpers.jl")
10-
using .Helpers: get_MMatrix, determinant, invert, smat, interpol_data
10+
using .Helpers: get_MMatrix, determinant, invert, smat, interpol_data, get_dependent_value
1111
export get_value
1212
export get_all_elastic_moduli
1313
export get_Hooke_matrix
@@ -207,26 +207,37 @@ function get_all_elastic_moduli(
207207
end
208208

209209
"""
210-
get_Hooke_matrix(parameter::Dict, symmetry::String, dof::Int64, ID::Int64=1)
210+
get_Hooke_matrix(datamanager::Module, parameter::Dict, symmetry::String, dof::Int64, ID::Int64=1)
211211
212212
Returns the Hooke matrix of the material.
213213
214214
# Arguments
215+
- `datamanager::Module`: The data manager.
215216
- `parameter::Union{Dict{Any,Any},Dict{String,Any}}`: The material parameter.
216217
- `symmetry::String`: The symmetry of the material.
217218
- `dof::Int64`: The degree of freedom.
218219
- `ID::Int64=1`: ID of the point. Needed for point wise defined material properties.
219220
# Returns
220221
- `matrix::Matrix{Float64}`: The Hooke matrix.
221222
"""
222-
function get_Hooke_matrix(parameter::Dict, symmetry::String, dof::Int64, ID::Int64 = 1)
223+
function get_Hooke_matrix(
224+
datamanager::Module,
225+
parameter::Dict,
226+
symmetry::String,
227+
dof::Int64,
228+
ID::Int64 = 1,
229+
)
223230
"""https://www.efunda.com/formulae/solid_mechanics/mat_mechanics/hooke_plane_stress.cfm"""
224231

225232
if occursin("anisotropic", lowercase(symmetry))
226233
aniso_matrix = get_MMatrix(36)
227234
for iID = 1:6
228235
for jID = iID:6
229-
value = parameter["C"*string(iID)*string(jID)]
236+
value = get_dependent_value(
237+
datamanager,
238+
"C" * string(iID) * string(jID),
239+
parameter,
240+
)
230241
aniso_matrix[iID, jID] = value
231242
aniso_matrix[jID, iID] = value
232243
end
@@ -235,15 +246,15 @@ function get_Hooke_matrix(parameter::Dict, symmetry::String, dof::Int64, ID::Int
235246
elseif occursin("orthotropic", lowercase(symmetry))
236247
aniso_matrix = get_MMatrix(36)
237248

238-
E_x = parameter["Young's Modulus X"]
239-
E_y = parameter["Young's Modulus Y"]
240-
E_z = parameter["Young's Modulus Z"]
241-
nu_xy = parameter["Poisson's Ratio XY"]
242-
nu_yz = parameter["Poisson's Ratio YZ"]
243-
nu_zx = parameter["Poisson's Ratio ZX"]
244-
g_xy = parameter["Shear Modulus XY"]
245-
g_yz = parameter["Shear Modulus YZ"]
246-
g_zx = parameter["Shear Modulus ZX"]
249+
E_x = get_dependent_value(datamanager, "Young's Modulus X", parameter, ID)
250+
E_y = get_dependent_value(datamanager, "Young's Modulus Y", parameter, ID)
251+
E_z = get_dependent_value(datamanager, "Young's Modulus Z", parameter, ID)
252+
nu_xy = get_dependent_value(datamanager, "Poisson's Ratio XY", parameter, ID)
253+
nu_yz = get_dependent_value(datamanager, "Poisson's Ratio YZ", parameter, ID)
254+
nu_zx = get_dependent_value(datamanager, "Poisson's Ratio ZX", parameter, ID)
255+
g_xy = get_dependent_value(datamanager, "Shear Modulus XY", parameter, ID)
256+
g_yz = get_dependent_value(datamanager, "Shear Modulus YZ", parameter, ID)
257+
g_zx = get_dependent_value(datamanager, "Shear Modulus ZX", parameter, ID)
247258

248259
nu_yx = nu_xy * E_y / E_x
249260
nu_xz = nu_zx * E_x / E_z

src/Models/Material/Material_Models/Correspondence/Correspondence.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ function init_model(
5959
datamanager.create_constant_node_field("Strain Increment", Float64, "Matrix", dof)
6060
datamanager.create_node_field("Cauchy Stress", Float64, "Matrix", dof)
6161
datamanager.create_node_field("von Mises Stress", Float64, 1)
62-
datamanager.create_constant_node_field("Angles", Float64, dof)
6362
rotation::Bool = datamanager.get_rotation()
6463
material_models = split(material_parameter["Material Model"], "+")
6564
material_models = map(r -> strip(r), material_models)

src/Models/Material/Material_Models/Correspondence/Correspondence_Elastic.jl

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,13 @@ function compute_stresses(
137137

138138
#@views mapping = get_mapping(dof)
139139
for iID in nodes
140-
@views hookeMatrix =
141-
get_Hooke_matrix(material_parameter, material_parameter["Symmetry"], dof, iID)
140+
@views hookeMatrix = get_Hooke_matrix(
141+
datamanager,
142+
material_parameter,
143+
material_parameter["Symmetry"],
144+
dof,
145+
iID,
146+
)
142147
@views fast_mul!(
143148
stress_NP1[iID, :, :],
144149
hookeMatrix,
@@ -166,8 +171,13 @@ function compute_stresses_ba(
166171

167172
@views mapping = get_mapping(dof)
168173
for iID in nodes
169-
@views hookeMatrix =
170-
get_Hooke_matrix(material_parameter, material_parameter["Symmetry"], dof, iID)
174+
@views hookeMatrix = get_Hooke_matrix(
175+
datamanager,
176+
material_parameter,
177+
material_parameter["Symmetry"],
178+
dof,
179+
iID,
180+
)
171181
@views for jID in eachindex(nlist[iID])
172182
@views sNP1 = stress_NP1[iID][jID, :, :]
173183
@views sInc = strain_increment[iID][jID, :, :]
@@ -211,7 +221,12 @@ function compute_stresses(
211221
stress_NP1::Vector{Float64},
212222
)
213223

214-
hookeMatrix = get_Hooke_matrix(material_parameter, material_parameter["Symmetry"], dof)
224+
hookeMatrix = get_Hooke_matrix(
225+
datamanager,
226+
material_parameter,
227+
material_parameter["Symmetry"],
228+
dof,
229+
)
215230

216231
return hookeMatrix * strain_increment + stress_N, datamanager
217232
end

0 commit comments

Comments
 (0)