11
22from compas_fea .cad import rhino
3+ from compas_fea .structure import GeneralStep
34from compas_fea .structure import CircularSection
45from compas_fea .structure import ElasticIsotropic
56from compas_fea .structure import ElementProperties as Properties
6- from compas_fea .structure import GeneralDisplacement
7- from compas_fea .structure import GeneralStep
7+ from compas_fea .structure import FixedDisplacement
88from compas_fea .structure import PinnedDisplacement
99from compas_fea .structure import PointLoad
10+ from compas_fea .structure import GravityLoad
1011from compas_fea .structure import Structure
1112
12- from math import pi
13-
1413
1514# Author(s): Tomas Mendez Echenagucia (github.com/tmsmendez)
1615
4645# Displacements
4746
4847mdl .add ([
49- PinnedDisplacement (name = 'disp_left' , nodes = 'nset_left' ),
50- GeneralDisplacement (name = 'disp_right' , nodes = 'nset_right' , y = 0 , z = 0 , xx = 0 ),
51- GeneralDisplacement (name = 'disp_rotate' , nodes = 'nset_left' , yy = 30 * pi / 180 ),
48+ FixedDisplacement (name = 'disp_left' , nodes = 'nset_left' ),
49+ PinnedDisplacement (name = 'disp_right' , nodes = 'nset_right' ),
5250])
5351
5452# Loads
5553
56- mdl .add (PointLoad (name = 'load_weights ' , nodes = 'nset_weights' , z = - 100 ))
57-
54+ mdl .add (GravityLoad (name = 'gravity ' , elements = 'all' ))
55+ mdl . add ( PointLoad ( name = 'load_weights' , nodes = 'nset_weights' , z = - 1000 ))
5856
5957# Steps
6058
6159mdl .add ([
6260 GeneralStep (name = 'step_bc' , displacements = ['disp_left' , 'disp_right' ]),
63- GeneralStep (name = 'step_load' , loads = 'load_weights' , displacements = 'disp_rotate' ),
61+ GeneralStep (name = 'step_load' , loads = [ 'load_weights' , 'gravity' ] ),
6462])
6563mdl .steps_order = ['step_bc' , 'step_load' ]
6664
7068
7169# Run
7270
73- mdl .analyse_and_extract (software = 'ansys' , fields = ['u' , 'rf' , 's' ], license = 'introductory' )
71+ mdl .analyse_and_extract (software = 'ansys' ,
72+ fields = ['u' , 's' , 'sp' , 'e' , 'ss' , 'rf' ],
73+ license = 'introductory' )
7474
75- rhino .plot_data (mdl , step = 'step_load' , field = 'um' , radius = 0.01 , cbar_size = 0.3 )
76- rhino .plot_reaction_forces (mdl , step = 'step_load' , layer = None , scale = .1 )
77- #rhino.plot_data(mdl, step='step_load', field='s', radius=0.01, cbar_size=0.3)
78- #rhino.plot_data(mdl, step='step_load', field='sf2', radius=0.01, cbar_size=0.3)
79- #rhino.plot_data(mdl, step='step_load', field='sm1', radius=0.01, cbar_size=0.3)
75+ rhino .plot_data (mdl , step = 'step_load' , field = 'um' , scale = 1e2 )
76+ rhino .plot_data (mdl , step = 'step_load' , field = 'szt' )
77+ rhino .plot_data (mdl , step = 'step_load' , field = 'ps1t' )
78+ rhino .plot_data (mdl , step = 'step_load' , field = 'sxzt' )
79+ rhino .plot_data (mdl , step = 'step_load' , field = 'e1t' )
80+ rhino .plot_reaction_forces (mdl , step = 'step_load' , layer = None , scale = 1 )
0 commit comments