# add material - - - - - -
material = ElasticIsotropic('concrete', E=30e9, v=.2, p=2400)

s.add(material)
# add element properties - - - - - - - - -
el_prop = ElementProperties('concrete_shell',
                            material='concrete',
                            section='shell_sec',
                            elset='shell')
s.add(el_prop)

# add analysis frequencies - - - - - - - -
freq_list = range(20, 200, 2)

num_modes = 25
# analyze - - - -
s.analyze_harmonic_super(num_modes, freq_list, fields=['u'], backend='ansys')

# # save results - - - - - -
s.to_obj()

v = HarmonicViewer(s)
v.show()

for k in s.results['harmonic']:
    print(s.results['harmonic'][k].frequency)
    print(s.results['harmonic'][k].modal_coordinates['f'])
    print(s.results['harmonic'][k].modal_coordinates)
    print('')
Esempio n. 2
0
                             elset='fins',
                             is_rad=False)
s.add(el_prop1)

el_prop2 = ElementProperties('concrete_shell_thick',
                             material='concrete',
                             section='thick_sec',
                             elset='no_fins',
                             is_rad=True)
s.add(el_prop2)

# add loads - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

freq_list = range(20, 300, 2)
waves = generate_uniform_waves_numpy()
fields = compute_pressure_fields_structure(waves, s, freq_list, center=True)

load = HarmonicPressureFieldsLoad('uniform_field', fields=fields)
s.add(load)

# analyze - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
num_modes = 20
s.analyze_harmonic_field(num_modes,
                         freq_list,
                         fields=['u'],
                         damping=.02,
                         backend='ansys')
s.compute_rad_power()
s.to_obj(name='ok')

print(s.results['harmonic_field'][0].displacements)