salida adaptada a .mdb

This commit is contained in:
Oscar Suescun Elizalde 2025-03-26 16:05:11 +01:00
parent db1e0817bc
commit ffef95e977
3 changed files with 6190 additions and 10 deletions

72
curva.mdb Normal file
View File

@ -0,0 +1,72 @@
[PLACOND]
Type=Fixed_Solid
Solid Type=Steel
Thermal Conductivity=28
Specific Heat=460
Density=7800
Notes=
ElectricalResistivity=5.2E-7
TempCoefElectricalResistivity=0
PoissonsRatio=0
YoungsCoefficient=0
YieldStress=0
BValue[0]=1.0
HValue[0]=0
BValue[1]=1.001256637061436
HValue[1]=1000
BValue[2]=1.002513274122872
HValue[2]=2000
BValue[3]=1.0037699111843077
HValue[3]=3000
BValue[4]=1.0050265482457437
HValue[4]=4000
BValue[5]=1.0062831853071796
HValue[5]=5000
BValue[6]=1.0075398223686156
HValue[6]=6000
BValue[7]=1.0087964594300514
HValue[7]=7000
BValue[8]=1.0100530964914873
HValue[8]=8000
BValue[9]=1.0113097335529233
HValue[9]=9000
BValue[10]=1.0125663706143593
HValue[10]=10000
BValue[11]=1.013823007675795
HValue[11]=11000
BValue[12]=1.015079644737231
HValue[12]=12000
BValue[13]=1.016336281798667
HValue[13]=13000
BValue[14]=1.017592918860103
HValue[14]=14000
BValue[15]=1.0188495559215387
HValue[15]=15000
BValue[16]=1.0201061929829747
HValue[16]=16000
BValue[17]=1.0213628300444106
HValue[17]=17000
BValue[18]=1.0226194671058466
HValue[18]=18000
BValue[19]=1.0238761041672824
HValue[19]=19000
BValue[20]=1.0251327412287183
HValue[20]=20000
BValue[21]=1.0263893782901543
HValue[21]=21000
BValue[22]=1.0276460153515903
HValue[22]=22000
BValue[23]=1.028902652413026
HValue[23]=23000
BValue[24]=1.030159289474462
HValue[24]=24000
BValue[25]=1.031415926535898
HValue[25]=25000
BValue[26]=1.032672563597334
HValue[26]=26000
BValue[27]=1.0339292006587697
HValue[27]=27000
BValue[28]=1.0351858377202057
HValue[28]=28000
BValue[29]=1.0364424747816416
HValue[29]=29000

View File

@ -12,20 +12,30 @@ def valores_objetivo(archivo, material):
return E, I, f
def generar_curva(offset):
def generar_curva(offset, ruta):
muVacio = 4 * np.pi * 1e-7
h = np.arange(0,30000,1000)
b = muVacio * h + offset
hPos = np.arange(1,5001,1)
hNeg = np.arange(-5000,0,1)
bPos = muVacio*hPos + offset
bNeg = muVacio*hNeg - offset
with open(ruta, "w") as f:
f.write('[PLACOND]\n')
f.write('Type=Fixed_Solid\n')
f.write('Solid Type=Steel\n')
f.write('Thermal Conductivity=28\n')
f.write('Specific Heat=460\n')
f.write('Density=7800\n')
f.write('Notes=\n')
f.write('ElectricalResistivity=5.2E-7\n')
f.write('TempCoefElectricalResistivity=0\n')
f.write('PoissonsRatio=0\n')
f.write('YoungsCoefficient=0\n')
f.write('YieldStress=0\n')
h = np.concatenate((hNeg, hPos))
b = np.concatenate((bNeg, bPos))
for i in np.arange(len(h)):
f.write(f'BValue[{i}]={b[i]}\n')
f.write(f'HValue[{i}]={h[i]}\n')
datos = np.column_stack((h,b))
np.savetxt('curva.csv', datos, delimiter=',')
def logica_offset(offset, error, errorObjetivo):
@ -55,5 +65,11 @@ def logica_offset(offset, error, errorObjetivo):
if __name__ == '__main__':
directorio = ''
nombre = "curva.mdb"
ruta = f'{directorio}{nombre}'
generar_curva(1,ruta)

6092
solids.mdb Normal file

File diff suppressed because it is too large Load Diff