Skip to content

Commit

Permalink
Fixing failing tests. Adding non-overlapping cylinder example, which I
Browse files Browse the repository at this point in the history
forgot to check in earlier.
  • Loading branch information
ikalash committed Jan 29, 2025
1 parent c563bfb commit 7e80331
Show file tree
Hide file tree
Showing 12 changed files with 175 additions and 12 deletions.
39 changes: 39 additions & 0 deletions examples/nonoverlap/static-same-time-step/cylinder/cylinder-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
type: single
input mesh file: cylinder-1.g
output mesh file: cylinder-1.e
model:
type: solid mechanics
material:
blocks:
fine: hyperelastic
hyperelastic:
model: Saint-Venant Kirchhoff
elastic modulus: 1440.0
Poisson's ratio: 0.25
density: 1000.0
time integrator:
type: quasi static
boundary conditions:
Dirichlet:
- node set: -X_bottom
component: x
function: "0.0"
- node set: -Y_bottom
component: y
function: "0.0"
- node set: -Z_bottom
component: z
function: "0.0"
Schwarz nonoverlap:
- side set: +Z_bottomSS
source: cylinder-2.yaml
source block: coarse
source side set: -Z_topSS
search tolerance: 5.0e-02
solver:
type: Hessian minimizer
step: full Newton
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-10
absolute tolerance: 1.0e-06
38 changes: 38 additions & 0 deletions examples/nonoverlap/static-same-time-step/cylinder/cylinder-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
type: single
input mesh file: cylinder-2.g
output mesh file: cylinder-2.e
model:
type: solid mechanics
material:
blocks:
coarse: hyperelastic
hyperelastic:
model: Saint-Venant Kirchhoff
elastic modulus: 1440.0
Poisson's ratio: 0.25
density: 1000.0
time integrator:
type: quasi static
boundary conditions:
Dirichlet:
- node set: -X_top
component: x
function: "0.0"
- node set: -Y_top
component: y
function: "0.0"
- node set: +Z_top
component: z
function: "0.64 * t"
Schwarz nonoverlap:
- side set: -Z_topSS
source: cylinder-1.yaml
source side set: +Z_bottomSS
source block: fine
solver:
type: Hessian minimizer
step: full Newton
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-10
absolute tolerance: 1.0e-06
73 changes: 73 additions & 0 deletions examples/nonoverlap/static-same-time-step/cylinder/cylinder.jou
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
reset
logging off
${set_warning_count(0)}

${radius = 0.5}
${height = 1.0}
${domain_height = height / 2.0}
${offset = abs(domain_height) / 2.0}
${h_fine = 0.025}
${h_coarse = h_fine}
${intervals = 16}
${refinement_level = 1}

# bottom cylinder
create cylinder radius {radius} z {domain_height}
move volume 1 z {-offset}
#top cylinder
create cylinder radius {radius} z {domain_height}
move volume 2 z {offset} include_merged
webcut volume 1 2 with plane xplane
delete volume 3 4
webcut volume 1 2 with plane yplane
delete volume 1 2
surface 41 size {h_fine}
surface 41 scheme pave
surface 41 smooth scheme laplacian
mesh surface 41
curve 55 53 19 interval {intervals}
mesh volume 6
surface 29 size {h_coarse}
surface 29 scheme pave
surface 29 smooth scheme laplacian
mesh surface 29
curve 37 7 39 interval {intervals}
mesh volume 5
nodeset 1 surface 29 #bottom of bottom domain
nodeset 1 name "-Z_bottom"
nodeset 2 surface 31 #top of bottom domain
nodeset 2 name "+Z_bottom"
nodeset 3 surface 28 #parallel in x, bottom domain
nodeset 3 name "-Y_bottom"
nodeset 4 surface 30 #parallel in y, bottom domain
nodeset 4 name "-X_bottom"
nodeset 5 surface 39 #bottom of top domain
nodeset 5 name "-Z_top"
nodeset 6 surface 41 #top of top domain
nodeset 6 name "+Z_top"
nodeset 7 surface 40 #parallel in y, top domain
nodeset 7 name "-X_top"
nodeset 8 surface 38 #parallel in x, top domain
nodeset 8 name "-Y_top"
sideset 1 surface 29 #bottom of bottom domain
sideset 1 name "-Z_bottomSS"
sideset 2 surface 31 #top of bottom domain
sideset 2 name "+Z_bottomSS"
sideset 5 surface 39 #bottom of top domain
sideset 5 name "-Z_topSS"
sideset 6 surface 41 #top of top domain
sideset 6 name "+Z_topSS"
set large exodus file off
set duplicate block elements on
block 1 volume 5
block 1 name "fine"
block 2 volume 6
block 2 name "coarse"
export mesh "cylinder-1.g" block 1 overwrite
export mesh "cylinder-2.g" block 2 overwrite






13 changes: 13 additions & 0 deletions examples/nonoverlap/static-same-time-step/cylinder/cylinder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type: multi
domains: ["cylinder-1.yaml", "cylinder-2.yaml"]
Exodus output interval: 1
CSV output interval: 0
initial time: 0.0
final time: 0.5
time step: 0.05
same time step for domains: true
minimum iterations: 1
maximum iterations: 64
relative tolerance: 1.0e-06
absolute tolerance: 1.0e-04
relaxation parameter: 0.5
12 changes: 6 additions & 6 deletions test/schwarz-nonoverlap-static-cuboid-hex8.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# is released under the BSD license detailed in the file license.txt in the
# top-level Norma.jl directory.
@testset "schwarz-nonoverlap-static-cuboid-hex8-same-step" begin
cp("../examples/nonoverlap/static-same-time-step/cuboids.yaml", "cuboids.yaml", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboid-1.yaml", "cuboid-1.yaml", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboid-2.yaml", "cuboid-2.yaml", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboid-1.g", "cuboid-1.g", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboid-2.g", "cuboid-2.g", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboids/cuboids.yaml", "cuboids.yaml", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboids/cuboid-1.yaml", "cuboid-1.yaml", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboids/cuboid-2.yaml", "cuboid-2.yaml", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboids/cuboid-1.g", "cuboid-1.g", force=true)
cp("../examples/nonoverlap/static-same-time-step/cuboids/cuboid-2.g", "cuboid-2.g", force=true)
sim = Norma.run("cuboids.yaml")
subsims = sim.subsims
model_fine = subsims[1].model
Expand Down Expand Up @@ -91,4 +91,4 @@ end
# @test avg_stress_coarse[4] ≈ 0.0 atol = 1.0e-01
# @test avg_stress_coarse[5] ≈ 0.0 atol = 1.0e-01
# @test avg_stress_coarse[6] ≈ 0.0 atol = 1.0e-01
# end
# end
12 changes: 6 additions & 6 deletions test/schwarz-overlap-static-cuboid-hex8.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# is released under the BSD license detailed in the file license.txt in the
# top-level Norma.jl directory.
@testset "schwarz-overlap-static-cuboid-hex8-same-step" begin
cp("../examples/overlap/static-same-time-step/cuboids.yaml", "cuboids.yaml", force=true)
cp("../examples/overlap/static-same-time-step/cuboid-1.yaml", "cuboid-1.yaml", force=true)
cp("../examples/overlap/static-same-time-step/cuboid-2.yaml", "cuboid-2.yaml", force=true)
cp("../examples/overlap/static-same-time-step/cuboid-1.g", "cuboid-1.g", force=true)
cp("../examples/overlap/static-same-time-step/cuboid-2.g", "cuboid-2.g", force=true)
cp("../examples/overlap/static-same-time-step/cuboids/cuboids.yaml", "cuboids.yaml", force=true)
cp("../examples/overlap/static-same-time-step/cuboids/cuboid-1.yaml", "cuboid-1.yaml", force=true)
cp("../examples/overlap/static-same-time-step/cuboids/cuboid-2.yaml", "cuboid-2.yaml", force=true)
cp("../examples/overlap/static-same-time-step/cuboids/cuboid-1.g", "cuboid-1.g", force=true)
cp("../examples/overlap/static-same-time-step/cuboids/cuboid-2.g", "cuboid-2.g", force=true)
sim = Norma.run("cuboids.yaml")
subsims = sim.subsims
model_fine = subsims[1].model
Expand Down Expand Up @@ -91,4 +91,4 @@ end
@test avg_stress_coarse[4] 0.0 atol = 1.0e-01
@test avg_stress_coarse[5] 0.0 atol = 1.0e-01
@test avg_stress_coarse[6] 0.0 atol = 1.0e-01
end
end

0 comments on commit 7e80331

Please sign in to comment.