Skip to content

Commit

Permalink
BBO:WIP: example 2 WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Bartman-Szwarc committed Nov 15, 2024
1 parent 2d80ada commit 73e0a0e
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions examples/Bagirrov_Bartman_Ochal_2024.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
from conmech.simulations.problem_solver import StaticSolver
from examples.Makela_et_al_1998 import loss_value, plot_losses

cc = 1.5
mesh_density = 8
kN = 1000
mm = 0.001
E = 1.378e8 * kN
kappa = 0.3
surface = 5 * mm * 80 * mm
E = cc * 1.378e8 * kN
kappa = 0.4
surface = 10 * mm * 100 * mm


def make_composite_contact_law(layers, alpha, beta):
Expand Down Expand Up @@ -94,7 +95,7 @@ def sub2derivative_normal_direction(
@dataclass()
class StaticSetup(StaticDisplacementProblem):
grid_height: ... = 10 * mm
elements_number: ... = (mesh_density, 8 * mesh_density)
elements_number: ... = (mesh_density, 6 * mesh_density)
mu_coef: ... = (E * surface) / (2 * (1 + kappa))
la_coef: ... = ((E * surface) * kappa) / ((1 + kappa) * (1 - 2 * kappa))
contact_law: ... = None
Expand Down Expand Up @@ -140,7 +141,7 @@ def main(config: Config, methods, forces, contact, prefix=""):
mesh_descr = RectangleMeshDescription(
initial_position=None,
max_element_perimeter=0.25 * 10 * mm,
scale=[8 * 10 * mm, 10 * mm],
scale=[4 * 10 * mm, 10 * mm],
)

if to_simulate:
Expand Down Expand Up @@ -223,7 +224,7 @@ def bottom(x):
def top(x):
# if x >= thickness:
# return 0.0
return 15.0 / mm + (x / mm) / mm
return (15.0 / mm + (x / mm) / mm) * surface / 400 / mm**2 * cc

contact = make_composite_contact_law(layers_limits, alpha=bottom, beta=top)

Expand All @@ -247,28 +248,28 @@ def top(x):
def survey(config):
methods = (
"gradiented BFGS",
"gradiented CG",
# "gradiented CG",
"BFGS",
"CG",
# "CG",
"Powell",
# "qsm",
"qsm",
# "globqsm",
"dc qsm",
# "dc qsm",
"dc globqsm"
)[:]
forces = (
23e3 * kN,
forces = np.asarray((
# 23e3 * kN,
24e3 * kN,
25e3 * kN,
# 25e3 * kN,
# 25.5e3 * kN,
26e3 * kN,
# 26.5e3 * kN,
27e3 * kN,
# 27e3 * kN,
28e3 * kN,
29e3 * kN,
# 29e3 * kN,
30e3 * kN,
)[:]
for i in [0, 1, 2, 3, 4, 5, 6, 7, 8][::2]: #range(1, 10 + 1, 2):
)) * cc
for i in [0, 1, 2, 3, 4, 5, 6, 7, 8][4::2]: #range(1, 10 + 1, 2):
thickness = 3 * mm
layers_num = i
# layers_limits = np.logspace(0, thickness, layers_num + 1)
Expand Down

0 comments on commit 73e0a0e

Please sign in to comment.