Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F104718367
README.rst
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Mar 11, 19:26
Size
2 KB
Mime Type
text/x-python
Expires
Thu, Mar 13, 19:26 (2 d)
Engine
blob
Format
Raw Data
Handle
24789277
Attached To
rAKA akantu
README.rst
View Options
plate_hole (2D)
'''''''''''''''
:Sources:
..
collapse
::
plate.py (click to expand)
..
literalinclude
::
examples/python/solid_mechanics_model/plate-hole/plate.py
:language: python
:lines:
9-
..
collapse
::
material.dat (click to expand)
..
literalinclude
::
examples/python/solid_mechanics_model/plate-hole/material.dat
:language: text
:Location:
``examples/python/solid_mechanics_model/``
`plate-hole
<https://gitlab.com/akantu/akantu/-/blob/master/examples/python/solid_mechanics_model/plate-hole/>
`_
In
``plate_hole``
, an example of a static solution of a loaded plate with a hole. Because of the symmetries, only a quarter of the problem is modeled. The corresponding domain and boundary conditions is shown in
:numref:
`fig-ex-plate_hole`
.
The static solver is initialized with:
..
code-block
::
python
model.initFull(_analysis_method=aka._static)
Boundary conditions are applied with:
..
code-block
::
python
model.applyBC(aka.FixedValue(0.0, aka._x), "XBlocked")
model.applyBC(aka.FixedValue(0.0, aka._y), "YBlocked")
model.applyBC(aka.FromTraction(trac), "Traction")
where
``trac``
is a numpy array of size
``spatial_dimension``
.
Additionally, the simulation can be run in parallel. To do so, the following lines are added:
..
code-block
::
python
try:
from mpi4py import MPI
comm = MPI.COMM_WORLD
prank = comm.Get_rank()
except ImportError:
prank = 0
Similarly to C++, the mesh has to be distributed between the processors with
::
mesh.distribute()
.. _fig-ex-plate_hole:
..
figure
::
examples/python/solid_mechanics_model/plate-hole/images/plate_hole.svg
:align:
center
:width:
30%
Plate with a hole geometry.
The displacement magnitude is displayed in
:numref:
`fig-ex-plate_hole_displ`
.
.. _fig-ex-plate_hole_displ:
..
figure
::
examples/python/solid_mechanics_model/plate-hole/images/plate_hole_displ_mag.png
:align:
center
:width:
40%
Displacement magnitude.
Event Timeline
Log In to Comment