Hi PrzemoF,...
To get the eigenfrequency values in GUI we have to write .dat file reader first. It's not hard, but it takes time (I can help if someone is willing to code it)
I tried to write a small function/definiton to read in the eigenfrequency values stored in the .dat file.
Maybe it is usefull but do not expect to much I am no computer scientist.
BR Howil
Code: Select all
# -*- coding: utf-8 -*-
import numpy as np
def dat_ef_reader(foldername, filename, freecad_fem_mesh_fn, skh=7, nr_ef=10):
#==============================================================================
# Data readin
#==============================================================================
f = open(foldername+filename) # opening the input file
# skipping the header
for n in np.arange(skh):
text2 = f.readline()
# output list
ef_data = []
# reading the eigenfrequencies
for n in np.arange(nr_ef):
ef_data.append(np.fromstring(f.readline(), dtype=float, sep=' '))
f.close() # closing the input file
return ef_data
#==============================================================================
# Setting default parameter
#==============================================================================
# foldername of .dat file has to be adopted for windows !!!!!!!
foldername = '/tmp/'
# filename of Freecad FEM mesh name
freecad_fem_mesh_fn = 'Pad_Mesh'
filename = freecad_fem_mesh_fn+'.dat'
# setting skip_header and skip_footer
skh = 7
# number of eigenfrequencies to readin
nr_ef = 10
ef_data = dat_ef_reader(foldername, filename, freecad_fem_mesh_fn, skh, nr_ef)
#==============================================================================
# Testing the found data
#==============================================================================
ef_counter = 3
print(" Eigenfrequency nr "+str(ef_counter)+" : "+str(ef_data[ef_counter][3])+" Hz (CYCLES/TIME)")