Esempio n. 1
0
#init_printing()
import numpy as np
from os import sys
sys.path.append('../CALCULATOR/')
import elasticity as ela
import plotter as plo
import generategeo as geo
import interfaces as gui
"""
Creates mesh files.
"""
gui.boussi_hlp()
c, ietype, order = gui.mesh_gui()
l, h, P, nu, E = gui.boussi_prs()
var = geo.boussinesq(l, h, c, ietype)
geo.create_mesh(order, var)
nodes, elements, nn = geo.writefiles(ietype, var)
#
coords = np.zeros([nn, 2])
SOLS = np.zeros([nn])
SOLU = np.zeros([nn, 2])
SOLC = np.zeros([nn, 3])
coords[:, 0] = nodes[:, 1]
coords[:, 1] = nodes[:, 2]
"""
Computes the solution
"""
height = np.amax(coords[:, 1])
for i in range(0, nn):
    x = coords[i, 0]
    y = coords[i, 1]
Esempio n. 2
0
import generategeo as geo
import interfaces as gui
import elasticity as ela
from sympy import init_printing
init_printing()
"""
Creates model.
"""
gui.box_hlp()
c , ietype , order =gui.mesh_gui()
b , a , beta , m , n , ninc , Tt = gui.modal_prs()
dt = Tt / ninc
N = 10
M = 10
var = geo.memb(b , a , c , ietype)
geo.create_mesh(order , var  , seemesh = True)
nodes , elements , nn = geo.writefiles(ietype , var)
plo.viewmesh(nodes , elements , True)
"""
Define solution arrays
"""
coords=np.zeros([nn,2])
SOL = np.zeros([nn,ninc])
coords[:,0]=nodes[:,1]
coords[:,1]=nodes[:,2]
"""
Computes the solution
"""
for i in range(nn):
    x = coords[i,0]
    y = coords[i,1]