Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
CWillberg committed Dec 9, 2024
1 parent 538e109 commit dfefef0
Showing 6 changed files with 25 additions and 24 deletions.
Binary file modified test/fullscale_tests/test_DCB/Reference/DCBmodel_unified_bb.e
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ PeriLab:
Safety Factor: 1.0
Outputs:
Output1:
Output Filename: "test_unified_bond_based_elastic_3D"
Output Filename: "test_bond_based_elastic_3D"
Output Frequency: 1
Output Variables:
Displacements: True
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -9,9 +9,9 @@ using .Bondbased_Elastic
using Test
using TimerOutputs
#include("../../../../../../src/PeriLab.jl")
#using .PeriLab
using .PeriLab

# const to = TimerOutput()
#const to = TimerOutput()

@testset "material_name" begin
@test Bondbased_Elastic.material_name() == "Bond-based Elastic"
@@ -60,16 +60,16 @@ end
@test isapprox(
bf[1],
[
[-0.13641852265019597, -0.13641852265019597, -0.13641852265019597],
[-0.13641852265019597, -0.13641852265019597, -0.13641852265019597],
[-0.21220659078919374, -0.21220659078919374, -0.21220659078919374],
[-0.21220659078919374, -0.21220659078919374, -0.21220659078919374],
],
)
@test isapprox(
bf[2],
[
[0.006975947180975936, 0.006975947180975936, 0.006975947180975936],
[0.006975947180975936, 0.006975947180975936, 0.006975947180975936],
[0.006975947180975936, 0.006975947180975936, 0.006975947180975936],
[0.010851473392629237, 0.010851473392629237, 0.010851473392629237],
[0.010851473392629237, 0.010851473392629237, 0.010851473392629237],
[0.010851473392629237, 0.010851473392629237, 0.010851473392629237],
],
)

@@ -107,16 +107,16 @@ end
@test isapprox(
bf[1],
[
[-0.13641852265019597, -0.13641852265019597, -0.13641852265019597],
[-0.13641852265019597, -0.13641852265019597, -0.13641852265019597],
[-0.21220659078919374, -0.21220659078919374, -0.21220659078919374],
[-0.21220659078919374, -0.21220659078919374, -0.21220659078919374],
],
)
@test isapprox(
bf[2],
[
[0.006975947180975936, 0.006975947180975936, 0.006975947180975936],
[0.006975947180975936, 0.006975947180975936, 0.006975947180975936],
[0.006975947180975936, 0.006975947180975936, 0.006975947180975936],
[0.010851473392629237, 0.010851473392629237, 0.010851473392629237],
[0.010851473392629237, 0.010851473392629237, 0.010851473392629237],
[0.010851473392629237, 0.010851473392629237, 0.010851473392629237],
],
)

@@ -146,16 +146,16 @@ end
@test isapprox(
bf[1],
[
[-0.13058867125488846, -0.13058867125488846, -0.13058867125488846],
[-0.13058867125488846, -0.13058867125488846, -0.13058867125488846],
[-0.16976527263135502, -0.16976527263135502, -0.16976527263135502],
[-0.16976527263135502, -0.16976527263135502, -0.16976527263135502],
],
)
@test isapprox(
bf[2],
[
[0.01335565956015906, 0.01335565956015906, 0.01335565956015906],
[0.01335565956015906, 0.01335565956015906, 0.01335565956015906],
[0.01335565956015906, 0.01335565956015906, 0.01335565956015906],
[0.01736235742820678, 0.01736235742820678, 0.01736235742820678],
[0.01736235742820678, 0.01736235742820678, 0.01736235742820678],
[0.01736235742820678, 0.01736235742820678, 0.01736235742820678],
],
)

13 changes: 7 additions & 6 deletions test/unit_tests/Models/Material/ut_material_basis.jl
Original file line number Diff line number Diff line change
@@ -18,8 +18,8 @@ using .Material_Basis:
get_strain,
compute_Piola_Kirchhoff_stress,
apply_pointwise_E
#include("../../../../src/PeriLab.jl")
#using .PeriLab
include("../../../../src/PeriLab.jl")
using .PeriLab

@testset "ut_apply_pointwise_E" begin
nodes = 2:3
@@ -326,10 +326,11 @@ end
"Poisson's Ratio" => 0.125,
)
get_all_elastic_moduli(test_data_manager, parameter)
@test parameter["Bulk Modulus"] / 2.2222222222222223e+0 - 1 < 1e-7
@test parameter["Shear Modulus"] / 2.2222222222222223e+0 - 1 < 1e-7
@test parameter["Poisson's Ratio"] == Float64(0.125)
@test parameter["Young's Modulus"] == 5

@test parameter["Young's Modulus"] == [22.5, 22.5, 22.5]
@test parameter["Poisson's Ratio"] == [0.125, 0.125, 0.125]
@test parameter["Bulk Modulus"] == [10, 10, 10]
@test parameter["Shear Modulus"] == [10, 10, 10]
end

@testset "get_Hooke_matrix" begin

0 comments on commit dfefef0

Please sign in to comment.