Skip to content

Commit

Permalink
Merge pull request #40 from brianphung/sch_contact_inc_sup
Browse files Browse the repository at this point in the history
quasi-static schwarz contact + inclined support implementation and tests
  • Loading branch information
brianphung authored Jan 23, 2025
2 parents 342211e + b96954f commit 9600664
Show file tree
Hide file tree
Showing 49 changed files with 1,446 additions and 16 deletions.
Binary file added examples/contact/static/cubes_30_deg/cube-1.g
Binary file not shown.
48 changes: 48 additions & 0 deletions examples/contact/static/cubes_30_deg/cube-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: single
input mesh file: cube-1.g
output mesh file: cube-1.e
model:
type: solid mechanics
material:
blocks:
fine: elastic
elastic:
model: linear elastic
elastic modulus: 1.0e+09
Poisson's ratio: 0.25
density: 1000.0
time integrator:
type: quasi static
time step: 0.5
initial equilibrium: true
initial conditions:
displacement:
- node set: nsall
component: x
function: "0.8660254037844387 * 0.1 * (1.0 - abs(t))"
- node set: nsall
component: y
function: "0.5 * 0.1 * (1.0 - abs(t))"
boundary conditions:
Dirichlet:
- node set: nsx-
component: x
function: "0.8660254037844387 * 0.1 * (1.0 - abs(t))"
- node set: nsy-
component: y
function: "0.5 * 0.1 * (1.0 - abs(t))"
- node set: nsz-
component: z
function: "0.0"
Schwarz contact:
- side set: ssx+
source: "cube-2.yaml"
source block: coarse
source side set: ssx-
solver:
type: Hessian minimizer
step: full Newton
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-10
absolute tolerance: 1.0e-06
Binary file added examples/contact/static/cubes_30_deg/cube-2.g
Binary file not shown.
48 changes: 48 additions & 0 deletions examples/contact/static/cubes_30_deg/cube-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: single
input mesh file: cube-2.g
output mesh file: cube-2.e
model:
type: solid mechanics
material:
blocks:
coarse: elastic
elastic:
model: linear elastic
elastic modulus: 1.0e+09
Poisson's ratio: 0.25
density: 1000.0
time integrator:
type: quasi static
time step: 0.5
initial equilibrium: true
initial conditions:
displacement:
- node set: nsall
component: x
function: "0.8660254037844387 * 0.1 * (abs(t) - 1.0)"
- node set: nsall
component: y
function: "0.5 * 0.1 * (abs(t) - 1.0)"
boundary conditions:
Dirichlet:
- node set: nsx+
component: x
function: "0.8660254037844387 * 0.1 * (abs(t) - 1.0)"
- node set: nsy-
component: y
function: "0.5 * 0.1 * (abs(t) - 1.0)"
- node set: nsz-
component: z
function: "0.0"
Schwarz contact:
- side set: ssx-
source: "cube-1.yaml"
source block: fine
source side set: ssx+
solver:
type: Hessian minimizer
step: full Newton
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-10
absolute tolerance: 1.0e-06
85 changes: 85 additions & 0 deletions examples/contact/static/cubes_30_deg/cubes.jou
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
${side = 1.0}
${length = 1.0}
${separation = 0.0}
${nel_fine = 2}
${nel_coarse = 1}
${h_fine = length / nel_fine}
${h_coarse = length / nel_coarse}

${area = side * side}
${offset = (length + separation) / 2.0}

create brick x {length} y {side} z {side}
rotate volume 1 about z angle 30
move volume 1 x {-offset*0.8660254037844387} y {-offset*0.5} include_merged

#volume 1 scheme tetmesh
volume 1 size {h_fine}
mesh volume 1
block 1 volume 1
#block 1 element type tetra4
block 1 name "fine"
nodeset 1 surface 4
nodeset 1 name "nsx-"
nodeset 2 surface 6
nodeset 2 name "nsx+"
nodeset 3 surface 3
nodeset 3 name "nsy-"
nodeset 4 surface 5
nodeset 4 name "nsy+"
nodeset 5 surface 2
nodeset 5 name "nsz-"
nodeset 6 surface 1
nodeset 6 name "nsz+"
nodeset 7 volume all
nodeset 7 name "nsall"
sideset 1 surface 4
sideset 1 name "ssx-"
sideset 2 surface 6
sideset 2 name "ssx+"
sideset 3 surface 3
sideset 3 name "ssy-"
sideset 4 surface 5
sideset 4 name "ssy+"
sideset 5 surface 2
sideset 5 name "ssz-"
sideset 6 surface 1
sideset 6 name "ssz+"
set large exodus file off
export mesh "cube-1.g" overwrite
delete mesh
move volume 1 x {2 * offset*0.8660254037844387} y {2 * offset * 0.5} include_merged
#volume 1 scheme tetmesh
volume 1 size {h_coarse}
mesh volume 1
block 1 volume 1
#block 1 element type tetra4
block 1 name "coarse"
nodeset 1 surface 4
nodeset 1 name "nsx-"
nodeset 2 surface 6
nodeset 2 name "nsx+"
nodeset 3 surface 3
nodeset 3 name "nsy-"
nodeset 4 surface 5
nodeset 4 name "nsy+"
nodeset 5 surface 2
nodeset 5 name "nsz-"
nodeset 6 surface 1
nodeset 6 name "nsz+"
nodeset 7 volume all
nodeset 7 name "nsall"
sideset 1 surface 4
sideset 1 name "ssx-"
sideset 2 surface 6
sideset 2 name "ssx+"
sideset 3 surface 3
sideset 3 name "ssy-"
sideset 4 surface 5
sideset 4 name "ssy+"
sideset 5 surface 2
sideset 5 name "ssz-"
sideset 6 surface 1
sideset 6 name "ssz+"
set large exodus file off
export mesh "cube-2.g" overwrite
11 changes: 11 additions & 0 deletions examples/contact/static/cubes_30_deg/cubes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
type: multi
domains: ["cube-1.yaml", "cube-2.yaml"]
initial time: -4.0
final time: 4.0
time step: 1.0
same time step for domains: false
relaxation parameter: 0.5
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-12
absolute tolerance: 1.0e-08
Binary file not shown.
48 changes: 48 additions & 0 deletions examples/contact/static/inclined_cubes/cube-test1-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: single
input mesh file: cube-test1-1.g
output mesh file: cube-test1-1.e
model:
type: solid mechanics
material:
blocks:
fine: elastic
elastic:
model: linear elastic
elastic modulus: 1.0e+09
Poisson's ratio: 0.25
density: 1000.0
time integrator:
type: quasi static
time step: 0.5
initial equilibrium: true
initial conditions:
displacement:
- node set: nsall
component: x
function: "1.0 * 0.1 * (1.0 - abs(t))"
- node set: nsall
component: y
function: "0.0 * 0.1 * (1.0 - abs(t))"
boundary conditions:
Dirichlet:
- node set: nsx-
component: x
function: "1.0 * 0.1 * (1.0 - abs(t))"
- node set: nsx-
component: y
function: "0.0 * 0.1 * (1.0 - abs(t))"
- node set: nsz-
component: z
function: "0.0"
Schwarz contact:
- side set: ssx+
source: "cube-test1-2.yaml"
source block: coarse
source side set: ssx-
solver:
type: Hessian minimizer
step: full Newton
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-10
absolute tolerance: 1.0e-06
Binary file not shown.
48 changes: 48 additions & 0 deletions examples/contact/static/inclined_cubes/cube-test1-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: single
input mesh file: cube-test1-2.g
output mesh file: cube-test1-2.e
model:
type: solid mechanics
material:
blocks:
coarse: elastic
elastic:
model: linear elastic
elastic modulus: 1.0e+09
Poisson's ratio: 0.25
density: 1000.0
time integrator:
type: quasi static
time step: 0.5
initial equilibrium: true
initial conditions:
displacement:
- node set: nsall
component: x
function: "1.0 * 0.1 * (abs(t) - 1.0)"
- node set: nsall
component: y
function: "0.0 * 0.1 * (abs(t) - 1.0)"
boundary conditions:
Dirichlet:
- node set: nsx+
component: x
function: "1.0 * 0.1 * (abs(t) - 1.0)"
- node set: nsx+
component: y
function: "0.0 * 0.1 * (abs(t) - 1.0)"
- node set: nsz-
component: z
function: "0.0"
Schwarz contact:
- side set: ssx-
source: "cube-test1-1.yaml"
source block: fine
source side set: ssx+
solver:
type: Hessian minimizer
step: full Newton
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-10
absolute tolerance: 1.0e-06
Binary file not shown.
48 changes: 48 additions & 0 deletions examples/contact/static/inclined_cubes/cube-test2-1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: single
input mesh file: cube-test2-1.g
output mesh file: cube-test2-1.e
model:
type: solid mechanics
material:
blocks:
fine: elastic
elastic:
model: linear elastic
elastic modulus: 1.0e+09
Poisson's ratio: 0.25
density: 1000.0
time integrator:
type: quasi static
time step: 0.5
initial equilibrium: true
initial conditions:
displacement:
- node set: nsall
component: x
function: "0.9238795325112867 * 0.1 * (1.0 - abs(t))"
- node set: nsall
component: y
function: "0.3826834323650898 * 0.1 * (1.0 - abs(t))"
boundary conditions:
Dirichlet:
- node set: nsx-
component: x
function: "0.9238795325112867 * 0.1 * (1.0 - abs(t))"
- node set: nsx-
component: y
function: "0.3826834323650898 * 0.1 * (1.0 - abs(t))"
- node set: nsz-
component: z
function: "0.0"
Schwarz contact:
- side set: ssx+
source: "cube-test2-2.yaml"
source block: coarse
source side set: ssx-
solver:
type: Hessian minimizer
step: full Newton
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-10
absolute tolerance: 1.0e-06
Binary file not shown.
48 changes: 48 additions & 0 deletions examples/contact/static/inclined_cubes/cube-test2-2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
type: single
input mesh file: cube-test2-2.g
output mesh file: cube-test2-2.e
model:
type: solid mechanics
material:
blocks:
coarse: elastic
elastic:
model: linear elastic
elastic modulus: 1.0e+09
Poisson's ratio: 0.25
density: 1000.0
time integrator:
type: quasi static
time step: 0.5
initial equilibrium: true
initial conditions:
displacement:
- node set: nsall
component: x
function: "0.9238795325112867 * 0.1 * (abs(t) - 1.0)"
- node set: nsall
component: y
function: "0.3826834323650898 * 0.1 * (abs(t) - 1.0)"
boundary conditions:
Dirichlet:
- node set: nsx+
component: x
function: "0.9238795325112867 * 0.1 * (abs(t) - 1.0)"
- node set: nsx+
component: y
function: "0.3826834323650898 * 0.1 * (abs(t) - 1.0)"
- node set: nsz-
component: z
function: "0.0"
Schwarz contact:
- side set: ssx-
source: "cube-test2-1.yaml"
source block: fine
source side set: ssx+
solver:
type: Hessian minimizer
step: full Newton
minimum iterations: 1
maximum iterations: 16
relative tolerance: 1.0e-10
absolute tolerance: 1.0e-06
Binary file not shown.
Loading

0 comments on commit 9600664

Please sign in to comment.