Can this simulation sequence be achieved
Hello
I want to achieve this simulation sequence with particle replacement API please tell me if it's possible to achieve this
I have a particle p1 generated at position x0 y0 z0
This particle is moving downward in a direction.
Now after the bond time t1 is reached the particle diameter will change from d to 0.9d
And another particle p2 with diameter d will be generated at t1 position x0 y0 z0 and this will be moving downward
Now as 2*t1 is reached the diameter of particle p1 will become 0.8d
For particle p2 also as 3*t1 is reached the diameter will be 0.9d and for particle p1 the diameter will be 0.7d.
Similarly I will keep generating 5 particles of diameter d at position x0 y0 z0 as bond times t1, 2*t1 , 3*t1....5*t1 are reached. And as it moves downward I want to reduce the diameter of the particle.
Please tell me how I can achieve this with particle replacement API or is there any other better method than this API?
Answers
-
I forgot to add earlier the particles need to be bonded with each other too. Please see the image below to get a visual representation of what i am trying to ask above.
0 -
Image of the type of simulation that i am trying to do
0 -
Hi,
The particle replacement API it's self doesn't allow for this but the methods in this API model and others should help with the implementation. You would need a combination of conditions:
Custom factory allows you to place the particles at the required positions
Custom bond model likely required to trigger bonds at the specified conditions
Particle manager API allows for growing and shrinking particles
Factory API
Bond model API
Growing and shrinking example
0 -
Hey
Thank you for suggesting the particle growth API. I am now able to expand or shrink the particle. (for the time being lets say i want the particles to expand and bond with each other)
let's say I give it a fixed bond instead of a variable bond for now.
I still do not see that the particles are bonding to each other.
For the time being, I will not use API for bonds. I will use an inbuilt bonding V2 model
I have defined some parameters.
I have given a big contact radius so that the particles at least bond with each other.
So what is happening is the particles grow and collide with each other and not bond.
Please tell me why such a thing would happen.
I am under the impression that as the particles contact each other, a bond will form when they expand.
How can I set up a bond between the particles as they come close enough inside the contact radius?
0 -
Hi,
The bonding V2 model creates a bond at a fixed bond time or dynamic bonding:
Fixed bond - bonds created if the partilces are in contact at the specified bond time. This is a global parameter and happens once per simulation.
Dynamic bonding - bonds created if the particles are in contact when created. Both particles have to be created at the same point in time.
I don't think either scenario works for you so you would have to change the criteria. The API version only bond at 1 point in time and at that time sets the custom property bond status to be 1.
/************************************************************************/
/* Making / obtaining bonds from records */
/************************************************************************/
//only particle-particle
if (true == element2.isSphere)
{
//create bonds if:
if (timeStepData.time > m_requestedBondTime)
{
if (timeStepData.time <= (m_requestedBondTime + timeStepData.timeStep))
{
if (m_BondStatus[0] == 0.0)
{
//change bond status to set that it exists
m_BondStatusDelta[0] += 1.0;
//this is only recorded once, can later be used to check if bond is in compression or tension
double* m_BondRandDelta = contactCustomProperties->getDelta(iBOND_RANDOM_COEF);
double random_number = rand() % 101; //creates random number between 0 and 100
random_number = (random_number - 50) / 50; //number between -1 and 1
m_BondRandDelta[0] = random_number;
tangentialPhysicalOverlap = CSimple3DVector();
}
}
}
}You could remove the time requirement and just bond on contact, but it would bond to multiple particles if there is multiple contacts.
Regards
Stephen
0 -
Yes that's a problem I don't want them all to be bonded.. I will start using the API version of bond model instead of static or dynamic.
Here is a idea which I am thinking... what if I set the bond based on particle ID.
Say currently I am looking at particle ID 3. It will bond with particle ID 4 and particle ID 2. This way I can set up the bonds independent of time.
Do you think I can do this?
0 -
Hello Stephen
Please tell me if that idea of bonding particles based on particle id can be tried on bonding API or not?
also
I am trying to create particles in sequence, but I am not able to do so. it creates all particles at one instant.
How can I create particles in sequence in creating particles API?
say i have this point [x0,y0,z0]
I want to create one particle in that spot in a time interval of 1e-7s. In total, I want to create five particles.
How can i give this condition in create particles API?
0 -
Hi Sptephen,
I did not understand how we can implement dynamic bonding you said. I want to create a bond between two particle as soon as they touch each other. Should I use Bonding API? Because you said we can have dynamic bonding with Bonding V2 model which is a built in model.
Thank you.
0 -
Hello Stephen,
I have applied the Bonding API but I am confused about how to understand the bond status
I have 5 particles that keep falling downwards (in absence of gravity)
When i check the bond status it does not exist untill the particles contact the ground. (Time is past bond time, bond time is at 1s and the time of simulation is 2s
What i am confused about is at 1.2s when i check the bond status on gui everything is blank
The moment first two particles hit the ground the bond status is 2
So that means the bonds got broken already?
This is what i see after some time
I am not able to understand how to visualise the existence of bond
(These above visualizations were created based on the understanding of how the bonding visualization is done in particle-replacement tutorial of altair )
How is this possible?
(I have not made any changes to bonding api (3.1) I am using it as is what i found in Altair website.
Please tell me how an i check if the bond has been formed or not?
0 -
Hello Stephen
Bond is being created now.
But I want to point out a very important thing. This should not happen to any user in the future. Please put a comment or a note in bonding API page stating that the name of the particle in the text file should be same as that of the name of the particle in the GUI. Because that was the problem and that's why bond was not being seen earlier. If you had that comment in the bonding page we would not have had the trouble like this.
Also wanted to let you know the idea of creating bond for consecutive id is working. There are no irregular bonds being created. Consecutive particles have bonds.
Now there's still one question that remains. How can I create particles with snooker factory api at different time's? I don't want to create all particles at once. Please tell me how could this be achieved?
0 -
Hi,
To create particles at different times you need to make use of the two bool's
particleCreatedand
additionalParticleRequired
In your code.
Set particleCreated = true if you have created a particle at the current times-step and set additionalParticleRequired to be true or false if you want to create another one.
For example the code below will allow 1 particle to be created at time = 1 s and one particle to be created at time = 2 s.
if (time==1.0) { particleCreated == true; additionalParticleRequired == false; //particle details go here } else if (time==2.0) { particleCreated == true; additionalParticleRequired == false; //particle details go here } else { particleCreated == false; additionalParticleRequired == false; }
The createParticle code block will be run at the start of the time-step and will keep running until additionalParticleRequired == false, so you need to make sure that this is set or EDEM will never exit the factory and continue simulating.
Regards
Stephen
0 -
It looks like you have the definition correct. Bond status of 2 means bonds have been formed and broken.
I don't know what the save data time is but it could be that the bond formation was done and if broken straight away the next save interval would just show the bonds broken.
0 -
I do not think save data time is the issue.
My only intention in mentioning the particle name issue is that if you put this in your bonding API post, it will help all users.
"Note: The particle names in the text file and the GUI should be identical. Otherwise, bonds won't be formed."
Please see this
0