elset='elset_lines')) # Displacements boundary = network.leaves() mdl.add(PinnedDisplacement(name='disp', nodes=boundary)) # Loads mdl.add(PointLoad(name='load_weights', nodes='load_pts', z=-100)) # Steps mdl.add([ GeneralStep(name='step_bc', displacements=['disp']), GeneralStep(name='step_load', loads='load_weights'), ]) mdl.steps_order = ['step_bc', 'step_load'] # Summary # mdl.summary() # Run exe = '/Applications/OpenSees3.2.1/OpenSees' mdl.write_input_file('opensees', fields='u') mdl.analyse('opensees', exe=exe, cpus=4, license='research') mdl.extract_data('opensees', fields='u', steps='all', exe=exe) mdl.analyse_and_extract(software='opensees', exe=exe, fields=['u']) # print(mdl.results['step_load']['nodal']['um'][0])
s.add_load(GravityLoad(name='load_gravity', elements=['shell'])) # add steps -------------------------------------------------------------------- step = GeneralStep(name='gravity_step', nlgeom=False, displacements=['supports'], loads=['load_gravity'], type='static') s.add_steps([step]) s.steps_order = ['gravity_step'] # analyse ---------------------------------------------------------------------- fields = 'all' s.write_input_file(software='ansys', fields=fields) s.analyse(software='ansys', cpus=4, delete=True) s.extract_data(software='ansys', fields=fields, steps='last') # visualise results ------------------------------------------------------------ rhino.plot_data(s, step='gravity_step', field='uz', scale=100, colorbar_size=0.3) rhino.plot_reaction_forces(s, step='gravity_step', scale=.001)
mdl.add_loads([ PointLoad(name='load_h', nodes='nset_load_h', x=4000), PointLoad(name='load_v', nodes='nset_load_v', z=-6000), ]) # Steps mdl.add_steps([ GeneralStep(name='step_bc', displacements=['disp_pins', 'disp_rollers']), GeneralStep(name='step_loads', loads=['load_h', 'load_v'], iterations=50)]) mdl.steps_order = ['step_bc', 'step_loads'] # Summary mdl.summary() # Run (Sofistik) mdl.write_input_file(software='sofistik') # Run (Abaqus/OpenSees) #mdl.analyse_and_extract(software='abaqus', fields=['u', 'ur', 'rf']) mdl.analyse_and_extract(software='opensees', fields=['u', 'ur', 'rf']) rhino.plot_data(mdl, step='step_loads', field='um', scale=50) rhino.plot_data(mdl, step='step_loads', field='urm', scale=50) print(mdl.get_nodal_results(step='step_loads', field='rfx', nodes='nset_pins')) print(mdl.get_nodal_results(step='step_loads', field='rfz', nodes='nset_pins'))
GravityLoad(name='load_gravity', elements='elset_beams'), ]) # print('load_point components: ', mdl.loads['load_point'].components) # Add displacements mdl.add(PinnedDisplacement(name='disp_pinned', nodes='nset_base')) # print('disp_pinned components: ', mdl.displacements['disp_pinned'].components) # Add steps mdl.add([ GeneralStep(name='step_bc', displacements=['disp_pinned']), GeneralStep(name='step_loads', loads=['load_point', 'load_gravity']), ]) mdl.steps_order = ['step_bc', 'step_loads'] # Structure summary mdl.summary() # Generate input files mdl.write_input_file(software='abaqus', fields=['s', 'u']) # # Launch App # mdl.view()