Dear developers,
First of all, thank you for the useful data extraction tool!
I am currently investigating the behaviour of individual particle trajectories and quantities. I have written a function that finds the (x y z) position of a particle from class small roundwood with its tag particle_id:
sim = fds.Simulation("..")
def getPositions(particle_id):
quant = sim.particles['small roundwood'].positions
partquant = np.zeros((len(quant),3))
for i in range(len(quant)):
index = np.where(sim.particles['small roundwood'].tags[i]==particle_id)
if len(index[0])==1:
partquant[i] = quant[i][index[0][0]]
else:
print('particle left simulation at i=%i'%i)
return partquant,i
break
return partquant, -1
This seems to work properly, as the trajectories are continuous and similar to Smokeview. However, I am having trouble with the particle quantities, which I obtain through a similar function:
def getQuantity(particle_id, quantity):
quant = sim.particles['small roundwood'].data[quantity]
partquant = np.zeros(len(quant))
for i in range(len(quant)):
index = np.where(sim.particles['small roundwood'].tags[i]==particle_id)
if len(index[0])==1:
partquant[i] = quant[i][index[0][0]]
else:
print('particle left simulation at i=%i'%i)
break
return partquant
The returned data (e.g. 'PARTICLE TEMPERATURE') displays discontinuous behaviour and differs from what is observed with Smokeview. Furthermore, other quantities such as 'PARTICLE DIAMETER' seem to load temperature data, as the values are in the same range as those from the temperature, while they should be orders of magnitude different. It should be noted that Smokeview does properly load the other particle quantities. I have tested this for FDS version 6.7.7 and 6.8.0. Also, I have not altered the storage format, so they should be 4-byte and therefore the default FDSReader settings should work.
I am not sure whether I have simply made a mistake in my code, or if there is a bug in the FDSReader module. The example particle file did not give me any new insights, and although the Fire Simulation lecture notes were helpful, I was still not able to fix it. Hopefully, you could help me resolve the issue.
Any help is much appreciated!
Dear developers,
First of all, thank you for the useful data extraction tool!
I am currently investigating the behaviour of individual particle trajectories and quantities. I have written a function that finds the (x y z) position of a particle from class small roundwood with its tag particle_id:
This seems to work properly, as the trajectories are continuous and similar to Smokeview. However, I am having trouble with the particle quantities, which I obtain through a similar function:
The returned data (e.g. 'PARTICLE TEMPERATURE') displays discontinuous behaviour and differs from what is observed with Smokeview. Furthermore, other quantities such as 'PARTICLE DIAMETER' seem to load temperature data, as the values are in the same range as those from the temperature, while they should be orders of magnitude different. It should be noted that Smokeview does properly load the other particle quantities. I have tested this for FDS version 6.7.7 and 6.8.0. Also, I have not altered the storage format, so they should be 4-byte and therefore the default FDSReader settings should work.
I am not sure whether I have simply made a mistake in my code, or if there is a bug in the FDSReader module. The example particle file did not give me any new insights, and although the Fire Simulation lecture notes were helpful, I was still not able to fix it. Hopefully, you could help me resolve the issue.
Any help is much appreciated!