FEM: beam section: use circle if width is not given

This commit is contained in:
Bernd Hahnebach 2016-05-23 20:52:59 +02:00
parent 7b195eb21d
commit 960191677b

View File

@ -173,8 +173,15 @@ class FemInputWriterCcx(FemInputWriter.FemInputWriter):
beamsec_obj = ccx_elset['beamsection_obj']
elsetdef = 'ELSET=' + ccx_elset['ccx_elset_name'] + ', '
material = 'MATERIAL=' + ccx_elset['mat_obj_name']
setion_def = '*BEAM SECTION, ' + elsetdef + material + ', SECTION=RECT\n'
setion_geo = str(beamsec_obj.Height.getValueAs('mm')) + ', ' + str(beamsec_obj.Width.getValueAs('mm')) + '\n'
height = beamsec_obj.Height.getValueAs('mm')
width = beamsec_obj.Width.getValueAs('mm')
if width == 0:
section_type = ', SECTION=CIRC'
setion_geo = str(height) + '\n'
else:
section_type = ', SECTION=RECT'
setion_geo = str(height) + ', ' + str(width) + '\n'
setion_def = '*BEAM SECTION, ' + elsetdef + material + section_type + '\n'
f.write(setion_def)
f.write(setion_geo)
elif 'shellthickness_obj'in ccx_elset: # shell mesh