40 lines
802 B
Python
40 lines
802 B
Python
import os
|
|
import genCurvas as gc
|
|
import motorcad as mc
|
|
import extraerH
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
archivoEnsayos = "Ensayos.xlsx"
|
|
archivoCurvas = "PLACond.mdb"
|
|
material = "PLACond"
|
|
|
|
E_obj, I_obj, f_obj = gc.valores_objetivo(archivoEnsayos, material)
|
|
|
|
offset = 0
|
|
|
|
gc.generar_curva(offset, archivoCurvas)
|
|
|
|
B = 1e-2 # Esto no debería ser E????
|
|
BObjetivo = 2e-2
|
|
|
|
errorObjetivo = 0.01
|
|
|
|
flag = False
|
|
i = 0
|
|
|
|
while flag == False:
|
|
os.system('cls')
|
|
|
|
mc.simularMCAD(material, i)
|
|
|
|
B = B + offset # Esto no debería ser E????
|
|
|
|
error = B/BObjetivo # Esto no debería ser E????
|
|
|
|
print(B)
|
|
print(error)
|
|
|
|
flag, offset = gc.logica_offset(offset, error, errorObjetivo)
|
|
i = i + 1 |