diff --git a/src/IO/mesh_data.jl b/src/IO/mesh_data.jl index 99430dd9f..2664dd026 100644 --- a/src/IO/mesh_data.jl +++ b/src/IO/mesh_data.jl @@ -1074,6 +1074,7 @@ function create_consistent_neighborhoodlist( for i_el = 1:number_of_elements push!(topology, collect(skipmissing(external_topology[i_el, :]))) end + # creates a field of length highest point number occuring in finite element nodes_to_element = [Any[] for _ = 1:maximum(maximum(topology))] fe_nodes = Vector{Int64}() for (el_id, topo) in enumerate(topology) diff --git a/test/fullscale_tests/test_FEM_coupling/FEM_2d_coupled.yaml b/test/fullscale_tests/test_FEM_coupling/FEM_2d_coupled.yaml new file mode 100644 index 000000000..afaa3b1fc --- /dev/null +++ b/test/fullscale_tests/test_FEM_coupling/FEM_2d_coupled.yaml @@ -0,0 +1,63 @@ +# SPDX-FileCopyrightText: 2023 Christian Willberg , Jan-Timo Hesse +# +# SPDX-License-Identifier: BSD-3-Clause + +PeriLab: + Discretization: + Node Sets: + Node Set 1: 1 12 23 + Node Set 2: 11 22 33 + Input Mesh File: "mesh.txt" + Type: Text File + Input External Topology: + File: "topo.txt" + Add Neighbor Search: true + FEM: + Element Type: "Lagrange" + Degree: 1 1 + Material Model: "Mat_1" + Models: + Material Models: + Mat_1: + Material Model: "Correspondence Elastic" + Symmetry: "isotropic plane strain" + Zero Energy Control: "Global" + Bulk Modulus: 2.5e+3 + Shear Modulus: 1.15e3 + Blocks: + block_1: + Material Model: "Mat_1" + Density: 2000 + Horizon: 1.1005 + FEM: true + block_2: + Material Model: "Mat_1" + Density: 2000 + Horizon: 1.1005 + Boundary Conditions: + BC_1: + Variable: "Displacements" + Node Set: "Node Set 1" + Coordinate: "x" + Value: "-0.001*t" + BC_2: + Variable: "Displacements" + Node Set: "Node Set 2" + Coordinate: "x" + Value: "0.0" + Solver: + Initial Time: 0.0 + Final Time: 1.0e-4 + Numerical Damping: 0e-0 + Verlet: + Safety Factor: 1.00 + Fixed dt: 1e-8 + Outputs: + Output1: + Output Filename: "FEM" + Output File Type: Exodus + Output Frequency: 100 + Output Variables: + Cauchy Stress: True + Displacements: True + Number of Neighbors: True diff --git a/test/fullscale_tests/test_FEM_coupling/mesh.txt b/test/fullscale_tests/test_FEM_coupling/mesh.txt new file mode 100644 index 000000000..cae323afd --- /dev/null +++ b/test/fullscale_tests/test_FEM_coupling/mesh.txt @@ -0,0 +1,38 @@ +# SPDX-FileCopyrightText: 2023 Christian Willberg , Jan-Timo Hesse +# +# SPDX-License-Identifier: BSD-3-Clause + +header: x y block_id volume +0 0 1 1.0e-6 +0.001 0 1 1.0e-6 +0.002 0 1 1.0e-6 +0.003 0 1 1.0e-6 +0.004 0 1 1.0e-6 +0.005 0 1 1.0e-6 +0.006 0 2 1.0e-6 +0.007 0 2 1.0e-6 +0.008 0 2 1.0e-6 +0.009000000000000001 0 2 1.0e-6 +0.010000000000000002 0 2 1.0e-6 +0 0.001 1 1.0e-6 +0.001 0.001 1 1.0e-6 +0.002 0.001 1 1.0e-6 +0.003 0.001 1 1.0e-6 +0.004 0.001 1 1.0e-6 +0.005 0.001 1 1.0e-6 +0.006 0.001 2 1.0e-6 +0.007 0.001 2 1.0e-6 +0.008 0.001 2 1.0e-6 +0.009000000000000001 0.001 2 1.0e-6 +0.010000000000000002 0.001 2 1.0e-6 +0 0.002 1 1.0e-6 +0.001 0.002 1 1.0e-6 +0.002 0.002 1 1.0e-6 +0.003 0.002 1 1.0e-6 +0.004 0.002 1 1.0e-6 +0.005 0.002 1 1.0e-6 +0.006 0.002 2 1.0e-6 +0.007 0.002 2 1.0e-6 +0.008 0.002 2 1.0e-6 +0.009000000000000001 0.002 2 1.0e-6 +0.010000000000000002 0.002 2 1.0e-6 diff --git a/test/fullscale_tests/test_FEM_coupling/topo.txt b/test/fullscale_tests/test_FEM_coupling/topo.txt new file mode 100644 index 000000000..96226e24b --- /dev/null +++ b/test/fullscale_tests/test_FEM_coupling/topo.txt @@ -0,0 +1,15 @@ +# SPDX-FileCopyrightText: 2023 Christian Willberg , Jan-Timo Hesse +# +# SPDX-License-Identifier: BSD-3-Clause + +header: +1 2 12 13 +2 3 13 14 +3 4 14 15 +4 5 15 16 +5 6 16 17 +12 13 23 24 +13 14 24 25 +14 15 25 26 +15 16 26 27 +16 17 27 28