from compas_fea.cad import rhino
from compas_fea.structure import ElementProperties as Properties
from compas_fea.structure import GeneralStep
from compas_fea.structure import PinnedDisplacement
from compas_fea.structure import PipeSection
from compas_fea.structure import PointLoad
from compas_fea.structure import RollerDisplacementXZ
from compas_fea.structure import Steel
from compas_fea.structure import Structure
Author(s): Andrew Liew (github.com/andrewliew)
Structure
mdl = Structure(name=‘beam_frame’, path=‘C:/Temp/’)
Elements
rhino.add_nodes_elements_from_layers(mdl, line_type=‘BeamElement’, layers=‘elset_beams’)
Sets
rhino.add_sets_from_layers(mdl, layers=[‘nset_pins’, ‘nset_load_v’, ‘nset_load_h’, ‘nset_rollers’])
Materials
mdl.add(Steel(name=‘mat_steel’))
Sections
mdl.add(PipeSection(name=‘sec_pipe’, r=0.100, t=0.005))
Properties
mdl.add(Properties(name=‘ep_beam’, material=‘mat_steel’, section=‘sec_pipe’, elset=‘elset_beams’))
Displacements
mdl.add([
PinnedDisplacement(name=‘disp_pins’, nodes=‘nset_pins’),
RollerDisplacementXZ(name=‘disp_rollers’, nodes=‘nset_rollers’),
])
Loads
mdl.add([
PointLoad(name=‘load_h’, nodes=‘nset_load_h’, x=+4000),
PointLoad(name=‘load_v’, nodes=‘nset_load_v’, z=-6000),
])
Steps
mdl.add([
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
mdl.analyse_and_extract(software=‘abaqus’, fields=[‘u’, ‘rf’, ‘sf’, ‘sm’])
rhino.plot_data(mdl, step=‘step_loads’, field=‘um’, scale=50)
rhino.plot_data(mdl, step=‘step_loads’, field=‘sf1’)
rhino.plot_data(mdl, step=‘step_loads’, field=‘sf2’)
rhino.plot_data(mdl, step=‘step_loads’, field=‘sm1’)
rhino.plot_reaction_forces(mdl, step=‘step_loads’, scale=0.5)
print(mdl.get_nodal_results(step=‘step_loads’, field=‘rfm’, nodes=‘nset_pins’))
print(mdl.get_nodal_results(step=‘step_loads’, field=‘um’, nodes=‘nset_load_v’))
Message: step_loads
Traceback:
line 918, in plot_data, “C:\Users\msi\AppData\Roaming\McNeel\Rhinoceros\6.0\Plug-ins\IronPython (814d908a-e25c-493d-97e9-ee3861957f49)\settings\lib\compas_fea\cad\rhino.py”
line 69, in , “C:\Users\msi\AppData\Local\Temp\TempScript.py”
***** Error writing boundary conditions, check Step exists in structure.steps_order[0] *****
***** Abaqus input file generated: C:/Temp/beam_frame.inp *****
Abaqus JOB beam_frame
Abaqus 6.14-4
Begin Analysis Input File Processor
2020/4/9 16:36:26
Run pre.exe
2020/4/9 16:36:39
Abaqus Error: Analysis Input File Processor exited with an error.
Abaqus/Analysis exited with errors
Abaqus Error: cae exited with an error.
Abaqus License Manager checked out the following license:
“cae” release 6.14 from Flexnet server pc180031
<1023 out of 1024 licenses remain available>.
Abaqus License Manager checked out the following licenses:
Abaqus/Standard checked out 8 tokens from Flexnet server pc180031.
<1016 out of 1024 licenses remain available>.
Abaqus/Analysis exited with error.
***** Analysis failed *****