You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using mixed-field formulation solid bodies with multiple solid bodies is possible, but tricky. This is a working example which should be added to the How-To section.
importfelupeasfem# create three meshes and a merged containermeshes= [
fem.Rectangle(n=(4, 10)),
fem.Rectangle(n=(6, 10)).translate(1, axis=0),
fem.Rectangle(n=(10, 10)).translate(2, axis=0),
]
container=fem.MeshContainer(meshes, merge=True)
ax=container.imshow()
# stack a top-level mesh, create a region and a field# the dual-mesh must be created for the dual submesh(es) of the mixed-fields# the offsets must match between the top-level mixed-field and the mixed sub-fieldmesh=container.stack()
region=fem.RegionQuad(mesh)
field=fem.FieldsMixed(
region,
n=3,
axisymmetric=True,
mesh=fem.MeshContainer(meshes[1:], merge=True).stack().dual(points_per_cell=1),
)
# sub regions and first sub-field (displacements as single-field container)regions= [fem.RegionQuad(m) formincontainer.meshes]
field1=fem.FieldContainer([fem.FieldPlaneStrain(regions[0], dim=2)])
# mixed sub-fields: the dual meshes must be created manually# the number of points must be taken from the top-level mixed-field# the offsets must match for the mixed-fields and their dual meshesfield2=fem.FieldsMixed(
regions[1],
n=3,
axisymmetric=True,
offset=0,
mesh=meshes[1].dual(
points_per_cell=1,
offset=0, # first dual mesh, no offsetnpoints=field[1].region.mesh.npoints, # must match top-level dual-mesh
),
)
field3=fem.FieldsMixed(
regions[2],
n=3,
axisymmetric=True,
offset=meshes[1].ncells,
mesh=meshes[2].dual(
points_per_cell=1,
offset=meshes[1].ncells, # second dual mesh, offset necessarynpoints=field[1].region.mesh.npoints, # must match top-level dual-mesh
),
)
fields= [field1, field2, field3]
# load caseboundaries, loadcase=fem.dof.uniaxial(field, move=-0.8, clamped=True)
# constitutive material formulations and solid bodies# a) (u)-formulation) on large-strain extended linear-elasticity# b) (u-p-J)-formulation on large-strain extended linear-elasticity# c) (u-p-J)-formulation for a nearly-incompressible hyperelastic materialumats= [
fem.LinearElasticLargeStrain(E=10, nu=0.3),
fem.ThreeFieldVariation(fem.LinearElasticLargeStrain(E=3, nu=0.3)),
fem.NearlyIncompressible(fem.NeoHooke(mu=1), bulk=5000),
]
solids= [fem.SolidBody(umat, f) forumat, finzip(umats, fields)]
# add the step to the job and pass the top-level field as x0-argument+step=fem.Step(items=solids, boundaries=boundaries)
job=fem.Job([step]).evaluate(x0=field)
ax=field.imshow("Principal Values of Logarithmic Strain")
The text was updated successfully, but these errors were encountered:
Using mixed-field formulation solid bodies with multiple solid bodies is possible, but tricky. This is a working example which should be added to the How-To section.
The text was updated successfully, but these errors were encountered: