On 03/03/2015 01:16 PM, Ronghai Wu wrote:
Hi Robert Cimrman,
Thanks, it helps a lot. But I still have some questions listed below. Taking the example of a 2D square domain with a circular hole at center, under tensile traction along x-axis(please see attached codes"elasticity-periodic BC2"). (1) If the traction stress components are placed in this way? Material('traction', val=[ [sigma11, sigma12], [sigma21, sigma22] ])
No, it uses the symmetric storage vector: sigma11, sigma22, sigma12. I will update the term docstring.
(2) I would like to have tensile traction along x-axis, if the following codes are correct.
omega = domain.create_region('Omega', 'all')
lef = domain.create_region('Lef', 'vertices in x < %f' % (min_x + eps), 'facet')
rig = domain.create_region('Rig', 'vertices in x > %f' % (max_x - eps), 'facet')
traction_left = Material('traction_left', val=[[1.,0.], [0.,0.]])
traction_right = Material('traction_right', val=[[1.,0.], [0.,0.]])
So this should be:
traction_lef = Material('traction_lef', val=[[1.], [0.], [0.]]) traction_rig = Material('traction_rig', val=[[1.], [0.], [0.]])
integral = Integral('i', order=3)
t1 = Term.new('dw_lin_elastic(m.function, v, u )', integral, omega, m=m, v=v, u=u)
t2 = Term.new('dw_lin_prestress(prestress.function, v )',integral, omega, prestress=prestress, v=v)
t3 = Term.new('dw_surface_ltr(traction_left.val, v)', integral, lef, traction_left=traction_left, v=v)
t4 = Term.new('dw_surface_ltr(traction_right.val, v)', integral, rig, traction_right=traction_right, v=v)
fem_eq = Equation('balance', t1 - t2 - t3 - t4 )
Note here: t3 acts on a boundary, that is completely fixed, so it can be safely removed.
Or, I would use the following minimal BC:
#stress free BC pb.time_update(ebcs=Conditions([fix_u_lef_corner, fix_u_rig_corner]))
#top-bottom periodic BC pb.time_update(ebcs=Conditions([fix_u_lef_corner, fix_u_rig_corner]), epbcs=Conditions([periodic_y]), functions=functions_y)
with:
fix_u_lef_corner = EssentialBC('fix_u_lef_corner', lef_corner, {'u.all' : 0.0}) fix_u_rig_corner = EssentialBC('fix_u_rig_corner', rig_corner, {'u.1' : 0.0})
i.e. no fix_u_lef.
(3) For the boundary condition at top-bottom boundaries, the results are very different between stress-free and periodic BC(please see attached pictures"sfepy stress-free BC" and "sfepy periodic BC"). I also attach the analytical solution for periodic BC case(see "Analytical solution for periodic BC"). However, I found that the sfepy result of stress-free BC agrees well with analytical periodic BC, but sfepy result of periodic BC does not agree with them. This is the situation I do not understand. And I am wondering, do you have other examples with analytical solution which can benchmark the stress-free and periodic BC.
IMHO the results correspond well to the boundary conditions: by imposing the periodic BC on top and bottom, you in fact prevent the narrowing of the domain in the y direction, so sigma_22 has to be positive. Is the analytical result really for the boundary conditions you assume?
Stress is plotted in this way. A line along x-axis(or y-axis) across the center of hole, plot from the center of hole to boundary, distance(r) is normalized by hole radius(R).
BTW. you can get the stress by using the ev_cauchy_stress term, just like the strain... also check the primer for data probes.
(4) If I would like to run it in parallel. How should I modify the codes?
This is work in very slow progress. Not currently possible.
r.
Regards Ronghai
在 2015年2月26日星期四 UTC+1上午10:54:05,Robert Cimrman写道:
Hi Ronghai,
On 02/24/2015 07:29 PM, Ronghai Wu wrote:
Dear Robert Cimrman,
I am trying to implement elastic inclusion problem. It is a 2D mesh with an inclusion(and therefore eigenstrain) at mesh centre. I developed my codes(as attached) based on following two previous issues.
https://groups.google.com/forum/#!searchin/sfepy-devel/Ronghai/sfepy-devel/r...
But I have troubles with the boundary conditions. I would like to try
two
kinds of boundary conditions: (1) Top and bottom boundaries: uniaxial loading(or surface traction). Left and Right boundaries: periodic. I used "dw_tl_surface_traction" but some errors come out.
Everything is small deformations, right? Then the term to use for tractions is dw_surface_ltr (as in [1]). The term dw_tl_surface_traction is meant for large deformations and is not linear (depends on the actual displacement).
(2) Periodic at all boundaries. I think there must be a easy way for this, but failed to find out in SfePy documentation and mailing list.
What you did works for me (after fixing the term names above). You have the periodic BC on the left and right sides. If you want also top and bottom displacements to be periodic, add an analogous condition.
Also add some Dirichlet BC, so that the matrix is not singular. Anyway, umfpack complains but solves. :) I guess what you need is to have periodic BC left<->right and top<->bottom, and fixed corner nodes, as in [2] (old long syntax...).
Let me know how it goes.
r.
[1]
http://sfepy.org/doc-devel/examples/linear_elasticity/linear_elastic_tractio... [2]
http://sfepy.org/doc-devel/examples/standalone/homogenized_elasticity/rs_cor...