Data format of the particle history file


User can write out particles' information to a .phs file in a DPM simulation using panel:

File->Write-> Start Particle History...
File->Write-> Stop Particle History

users may want to extract out particles' information from that file. The format of the particle history file is described below.


The .phs file has the following format:
--------------------------------------------
(n1
(value1 value2 ........valueN))
(n2
(value1 value2 ........valueN))
.
.
------------------------------------------

If you have N particles in the domain, you will have N values in the second parenthesis. The integers "n1" "n2" .. represent corresponding variable names. Please check the attached list to learn the integer v.s. variable 1:1 correspondence. Once you know that correspondence, everything becomes clear. For example, the following lines in a .phs file are for particles' x-velocity information ("10" stands for x-velocity). I have 7 particles in my test case, that is why I only have 7 values in the second line.
----------------------
(10
(-2.51698351e+00 -1.28997886e+00 -1.07652485e+00 -7.24809170e-01 -3.50349522e+00 -1.50012469e+00 -1.14353359e+00 ))
-----------------------

////////////////////////////////////////////////////////////////////

/* particle data subsection ids */
enum {
XF_RF_PARTICLE_NULL=0,
XF_RF_PARTICLE_ID=1,
XF_RF_PARTICLE_TYPE=2,
XF_RF_PARTICLE_STREAM_INDEX=3,
XF_RF_PARTICLE_LAW_INDEX=4,
XF_RF_PARTICLE_BIRTH_TIME=5,
XF_RF_PARTICLE_FLOW_RATE=6,
XF_RF_PARTICLE_XPOS=7,
XF_RF_PARTICLE_YPOS=8,
XF_RF_PARTICLE_ZPOS=9,
XF_RF_PARTICLE_XVEL=10,
XF_RF_PARTICLE_YVEL=11,
XF_RF_PARTICLE_ZVEL=12,
XF_RF_PARTICLE_DIAM=13,
XF_RF_PARTICLE_DENSITY=14,
XF_RF_PARTICLE_MASS=15,
XF_RF_PARTICLE_TEMPERATURE=16,
XF_RF_PARTICLE_TIME=17,
XF_RF_PARTICLE_VFF=18,
XF_RF_PARTICLE_LIQUID_FRACTION=19,
XF_RF_PARTICLE_INIT_XPOS=20,
XF_RF_PARTICLE_INIT_YPOS=21,
XF_RF_PARTICLE_INIT_ZPOS=22,
XF_RF_PARTICLE_INIT_XVEL=23,
XF_RF_PARTICLE_INIT_YVEL=24,
XF_RF_PARTICLE_INIT_ZVEL=25,
XF_RF_PARTICLE_INIT_DIAM=26,
XF_RF_PARTICLE_INIT_DENSITY=27,
XF_RF_PARTICLE_INIT_MASS=28,
XF_RF_PARTICLE_INIT_TEMPERATURE=29,
XF_RF_PARTICLE_INIT_TIME=30,
XF_RF_PARTICLE_INIT_LIQUID_FRACTION=31,
XF_RF_PARTICLE_XV_PRIME=32,
XF_RF_PARTICLE_YV_PRIME=33,
XF_RF_PARTICLE_ZV_PRIME=34,
XF_RF_PARTICLE_EDDY_TIME=35,
XF_RF_PARTICLE_OLD_TKE=36,
XF_RF_PARTICLE_OLD_TED=37,
XF_RF_PARTICLE_VARIANCE1=38,
XF_RF_PARTICLE_VARIANCE2=39,
XF_RF_PARTICLE_RP1=40,
XF_RF_PARTICLE_RP2=41,
XF_RF_PARTICLE_DSIG_DT1=42,
XF_RF_PARTICLE_DSIG_DT2=43,
XF_RF_PARTICLE_RP_TIME=44,
XF_RF_PARTICLE_TIME_STEP_BIRTH=45,
XF_RF_PARTICLE_USER=46,
XF_RF_PARTICLE_IN_PARCEL=47,
XF_RF_PARTICLE_CELL_THREAD_ID=48,
XF_RF_PARTICLE_CELL_INDEX=49,
XF_RF_PARTICLE_SCALAR=50,

XF_RF_PARTICLE_CELL_XVEL=101,
XF_RF_PARTICLE_CELL_YVEL=102,
XF_RF_PARTICLE_CELL_ZVEL=103,
XF_RF_PARTICLE_CELL_DUDX=104,
XF_RF_PARTICLE_CELL_DUDY=105,
XF_RF_PARTICLE_CELL_DUDZ=106,
XF_RF_PARTICLE_CELL_DVDX=107,
XF_RF_PARTICLE_CELL_DVDY=108,
XF_RF_PARTICLE_CELL_DVDZ=109,
XF_RF_PARTICLE_CELL_DWDX=110,
XF_RF_PARTICLE_CELL_DWDY=111,
XF_RF_PARTICLE_CELL_DWDZ=112,
XF_RF_PARTICLE_CELL_TEMPERATURE=113,
XF_RF_PARTICLE_CELL_DENSITY=114,
XF_RF_PARTICLE_CELL_VISCOSITY_LAM=115,

XF_RF_PARTICLE_ON_WALL_FLAG=116,
XF_RF_PARTICLE_WALL_FILM_FACE=117,
XF_RF_PARTICLE_WALL_FILM_THREAD_ID=118

};





Show Form
No comments yet. Be the first to add a comment!