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)