On Thursday, July 31, 2014 6:56:46 PM UTC+8, Robert Cimrman wrote:
Hi Robert,
- how to output principal stresses in sfepy? I can calculate
On 07/31/2014 12:12 PM, Ouyang wrote: principal
stresses based on \sigma_{ij} in svar below. But I guess it is not straightforward for the task in my question 2. ... sfield = Field.from_args('stress', nm.float64, (6,), pb.domain.regions['Omega']) svar = FieldVariable('sigma', 'parameter', sfield,primary_var_name='(set-to-None)') svar.set_data_from_qp(stress, ivn) ...
I guess you do not need to interpolate the stresses into a field variable
you can work with the element-averaged values, no?
I want to evaluate the stresses at center of the block which point load
is applied. For brittle materials, rock, we concern its tensile stress (normally minimum stress defined in rock mechanics) at the block center to see if it reaches its tensile strength. So, principal stresses is normally easy to be used in a failure criteria in engineering. I guess the current element types available in sfepy are constant-strain or constant-stress in a element. So my understanding is that the constant-strain or constant-stress is element-averaged values.
BTW. a function for computing principal stresses would be a nice addition to sfepy.mechanics.tensors.
I am not sure I am good enough for this addition. I can try it when I have time.
- are there any function to output just a single component of u_i (displacements) or \sigma_{ij} into vtk file?
Not per se, but it's really easy - just add that to the output dictionary:
from sfepy.mechanics.tensors import get_full_indices s2f = nm.array(get_full_indices(3)) ii = s2f[0, 1] out['cauchy_stress_01'] = Struct(name='output_data', mode='cell', data=stress[..., ii:ii+1, :]) out['u_0'] = Struct(name='output_data', mode='vertex', data = out['u'].data[:, 0:1])
Thanks for this. I will test it.
- how to output global coordinates for \sigma_{ij} in svar at qp?
You mean how to get the physical coordinates of all the qp in the whole domain? Or something else?
Yes, the physical coordinates associated with the stresses/strains/displacements in the whole domain. It could be the qp or some other points. If so, probably more things we can do in the postprocessing.
Sorry. I have too many questions.
No problem :) But you will have to explain more what are you trying to do.
r.
Thanks again. ouyang