Пример #1
0
# in big simulation files, it's not always easy to find the right parameter 
# or variable
sim.exist('q_flow')

time = sim.get_value('Time')
Q = sim.get_value(u'r.heatPort_a.Q_flow')
Q_sum = np.trapz(Q, time)
print "The total energy that flowed through the resistance is %.1f J" %Q_sum

for p,v in zip(sim.parameters, sim.parametervalues):
    print ''.join([p, ' = ', str(v)])


# there are different ways to create a simdex

s1 = Simdex() # an empty simdex object
s1.scan() # scan current folder and add all found simulation files to the simdex

    
print s1

# now, let's look at some attributes
s1.get_filenames() # method, so add ()
s1.get_filenames('path')
s1.parameters # attribute, so no ()
s1.parametermap
s1.parametervalues
s1.variables
s1.variablemap
s1.h5_path
Пример #2
0
# in big simulation files, it's not always easy to find the right parameter
# or variable
sim.exist('q_flow')

time = sim.get_value('Time')
Q = sim.get_value(u'r.heatPort_a.Q_flow')
Q_sum = np.trapz(Q, time)
print "The total energy that flowed through the resistance is %.1f J" % Q_sum

for p, v in zip(sim.parameters, sim.parametervalues):
    print ''.join([p, ' = ', str(v)])

# there are different ways to create a simdex

s1 = Simdex()  # an empty simdex object
s1.scan(
)  # scan current folder and add all found simulation files to the simdex

print s1

# now, let's look at some attributes
s1.get_filenames()  # method, so add ()
s1.get_filenames('path')
s1.parameters  # attribute, so no ()
s1.parametermap
s1.parametervalues
s1.variables
s1.variablemap
s1.h5_path