[FElupe v.4.0.0] Non-homogenous shear loadcase on a cube with a nearly-incompressible non-affine micro-sphere model #134
adtzlr
started this conversation in
Show and tell
Replies: 3 comments
-
And here is another version with incremental prescribed displacements on the boundary import numpy as np
import matplotlib.pyplot as plt
import felupe
import matadi
# create a hexahedron-region on a cube
mesh = felupe.Cube(b=(20, 20, 10), n=(17, 17, 9))
region = felupe.RegionHexahedron(mesh)
# add displacement, pressure and volume-ratio fields
fields = felupe.FieldsMixed(region)
# define the constitutive material behavior
mat = matadi.MaterialHyperelastic(
fun=matadi.models.miehe_goektepe_lulei,
bulk=5000.0,
mu=0.1475,
N=3.273,
p=9.31,
U=9.94,
q=0.567,
)
# plot material behavior on homogenous loadcases
lab = matadi.Lab(mat)
data = lab.run(stretch_max=2.0)
lab.plot(data)
umat = matadi.ThreeFieldVariation(mat)
body = felupe.SolidBody(umat, fields)
# apply a non-homogenous shear on the cube
boundaries, dof0, dof1, ext0 = felupe.dof.shear(fields, top=20)
Move = np.linspace(0, 15, 6)
Force = np.zeros((len(Move), 3))
for increment, move in enumerate(Move):
print("\nStart of increment %d" % (increment + 1))
print("=====================")
print("\nprescribed values on boundary `move` = %1.4g \n" % move)
boundaries["move"].value = move
ext0 = felupe.dof.apply(fields, boundaries, dof0)
# newton-rhapson procedure
res = felupe.newtonrhapson(
fields,
bodies=[body],
dof1=dof1,
dof0=dof0,
ext0=ext0,
kwargs={"parallel": True},
tol=1e-3,
)
# update fields
fields -= fields
fields += res.x
# get reaction force on boundary "move"
Force[increment] = felupe.tools.force(fields, res.fun, boundaries["move"])
# save result
felupe.save(region, res.x, filename="result_%d.vtk" % (1 + increment))
felupe.save(region, res.x, filename="result.vtk")
# plot force-displacement curve
plt.figure()
plt.plot(Move, Force[:,0], "C0o-")
plt.xlabel("Displacement X")
plt.ylabel("Reaction Force X")
plt.title("Non-homogenous shear loading")
plt.grid() |
Beta Was this translation helpful? Give feedback.
0 replies
-
The output of the above script gives:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions