Hi All,
I’m trying to run MercuryCG on simulation data from various other solvers, which necessitates me converting that data into the mercury format of .data, .fstat and .restart files. I’ve based my converter on the documentation: MercuryDPM: Visualising Your Results, although there seems to be nothing on .restart files so I just copied the format of a simulation output for that.
For a simple case, with just one type of sphere and a few simple triangulated walls, this all works fine. However, for a more complex simulation with multiple different particle types in it, my converted data seems to be incorrect.
I get the following message from the terminal when attempting to run on these files:
Message MercuryKernel:
Species type LinearViscoelasticSpecies not understood in restart file: You need to add this species to SpeciesHandler::readMixedObject.
Message MercuryKernel:
Species type Walls not understood in restart file: You need to add this species to SpeciesHandler::readObject.
Message MercuryKernel:
Species type TriangleWall not understood in restart file: You need to add this species to SpeciesHandler::readMixedObject.
Message MercuryKernel:
Species type TriangleWall not understood in restart file: You need to add this species to SpeciesHandler::readMixedObject.
An error has occured
Module : MercuryKernel
Message: DPMBase::read(is): Error during restart: 'Walls' argument could not be found.:
The start of my .restart file looks like this:
MercuryDPM 1.0 name Polydisperse_Multispheres_Cylinder_NoGravity_00000000 revision 8a6674c8 repository https://bitbucket.org/mercurydpm/mercurydpm.git
dataFile fileType ONE_FILE saveCount 1 counter 1 lastSavedTimeStep 1
fStatFile fileType ONE_FILE saveCount 1 counter 1 lastSavedTimeStep 1
eneFile fileType ONE_FILE saveCount 1 counter 0 lastSavedTimeStep 0
restartFile fileType ONE_FILE saveCount 1 counter 1 lastSavedTimeStep 1
statFile fileType ONE_FILE saveCount 1 counter 0
interactionFile fileType NO_FILE saveCount 0 counter 0
xMin -0.405 xMax 0.405 yMin -0.405 yMax 0.405 zMin -0.002 zMax 0.8565
timeStep 0.01 time 0 ntimeSteps 1 timeMax 0
systemDimensions 3 particleDimensions 3 gravity 0 0 0 backgroundDrag 0 writeVTK 0 NO_FILE NO_FILE 0 0 0 0 0 random 0 1103515245 12345 1073741824 607 273 784607267
Species 3
LinearViscoelasticSpecies id 0 density 2200 stiffness 75857.5125578 dissipation 230.258509299
LinearViscoelasticSpecies id 1 density 2200 stiffness 75857.5125578 dissipation 230.258509299
LinearViscoelasticSpecies id 2 density 2200 stiffness 75857.5125578 dissipation 230.258509299
Walls 104
TriangleWall id 12 groupID 1 indSpecies 0 position 0 0 0 orientation 1 0 0 0 velocity 0 0 0 angularVelocity 0 0 0 force 0.00090954189321 0.00476798557892 0 torque 0 0 0 vertexInLabFrame 0.0689332784604 0.545663085723 0 0.0689332784604 0.545663085723 1.2 0.136779437941 0.532720738621 0
TriangleWall id 13 groupID 1 indSpecies 0 position 0 0 0 orientation 1 0 0 0 velocity 0 0 0 angularVelocity 0 0 0 force 0.00361603947021 0.0189559427394 0 torque 0 0 0 vertexInLabFrame 0.0689332784604 0.545663085723 1.2 0.136779437941 0.532720738621 1.2 0.136779437941 0.532720738621 0
TriangleWall id 14 groupID 1 indSpecies 0 position 0 0 0 orientation 1 0 0 0 velocity 0 0 0 angularVelocity 0 0 0 force 0.00170160390044 0.00523699831117 0 torque 0 0 0 vertexInLabFrame 0.136779437941 0.532720738621 0 0.136779437941 0.532720738621 1.2 0.202468503977 0.511377067239 0
TriangleWall id 15 groupID 1 indSpecies 0 position 0 0 0 orientation 1 0 0 0 velocity 0 0 0 angularVelocity 0 0 0 force 0.00452073182467 0.0139133819128 0 torque 0 0 0 vertexInLabFrame 0.136779437941 0.532720738621 1.2 0.202468503977 0.511377067239 1.2 0.202468503977 0.511377067239 0
TriangleWall id 16 groupID 1 indSpecies 0 position 0 0 0 orientation 1 0 0 0 velocity 0 0 0 angularVelocity 0 0 0 force 0.00290464284195 0.00617268024352 0 torque 0 0 0 vertexInLabFrame 0.202468503977 0.511377067239 0 0.202468503977 0.511377067239 1.2 0.264964520756 0.481968674024 0
TriangleWall id 17 groupID 1 indSpecies 0 position 0 0 0 orientation 1 0 0 0 velocity 0 0 0 angularVelocity 0 0 0 force 0.00666693632175 0.0141679608673 0 torque 0 0 0 vertexInLabFrame 0.202468503977 0.511377067239 1.2 0.264964520756 0.481968674024 1.2 0.264964520756 0.481968674024 0
TriangleWall id 18 groupID 1 indSpecies 0 position 0 0 0 orientation 1 0 0 0 velocity 0 0 0 angularVelocity 0 0 0 force 0.00390452370204 0.00615254486769 0 torque 0 0 0 vertexInLabFrame 0.264964520756 0.481968674024 0 0.264964520756 0.481968674024 1.2 0.323281888761 0.444959346906 0
...
This format is identical to the case that works for a single particle type which I created, except for the species part:
Species 1
LinearViscoelasticSpecies id 0 density 2500 stiffness 75857.5125578 dissipation 230.258509299
So I assume that I’m not correctly creating the species part of the restart file correctly when there are multiple particle types and therefore it never gets to the Walls section which should be correct.
And for clarity, I just want to coarse-grain the data, I’m not actually worried about restarting in MercuryDPM at the moment, although If I provided the correct contact model and contact parameters, it sure that would work, but not actually my concern at the moment.
If the full dataset is required, I can share via link because it’s a bit large to dump here on the forum.
@antRthorn or @TiPlath, any idea what I’ve messed up?