Skip to content

rvcristiand/pymas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pymas

Model and analyse framed structures with Python.

Table of Contents

Background

Implementación del método directo de rigideces en Python.

Install

pymas usa Python y varias librerias científicas (véase Scipy). La recomendación es instalar Ananconda.

Manual

Puede obtener una copia de pymas descargándola de la página del repositorio, o puede clonar este repositorio con git.

git clone https://github.com/rvcristiand/pymas.git

Para importar pymas en otros proyectos, incluya la ruta del código fuente de la librería en la lista sys.path.

sys.path.append('.../pymas/src/')

Usage

Puede analizar estructuras con la clase Structure.

from pymas import Structure

# model simplest beam

b = 0.5  # m
h = 1  # m

L = 10  # m
E = 4700*28**0.5*1000  # kN /m2

A = b * h  # m2
w = 24*A  # kN/m

# create the model
model = Structure(uy=True, rz=True)

# add materials
model.add_material('concrete', E, E / (2*(1+0.2)))

# add sections
rect_sect = model.add_rectangular_section('V0.5x1.0', width=b, height=h)

# add joints
model.add_joint('a', x=0)
model.add_joint('b', x=L)

# add frame
model.add_frame('1', 'a', 'b', 'concrete', 'V0.5x1.0')

# add supports
model.add_support('a', ux=True)
model.add_support('b', ux=True)

# add load patterns
loadPattern = model.add_load_pattern('self weight')

# add distributed loads
model.add_distributed_load('self weight', '1', fy=-w)

# solve the model
model.solve()
model.export('simplest_beam.json')

print(model.reactions['self weight']['a'].fy)  # 60 kN
print(max(model.internal_forces['self weight']['1'].mz)) # 150 kN m

Contributing

Puede contribuir en este proyecto creando un issue o haciendo pull requests.

License

MIT