How are the heights of the SQP particles created, are determined?

Hello,

I hope you’re doing well.

While I am generating random particles of SQP, I am unable to determine the height of individual particles to calculate volume and other parameters. Does the software scale it up or down based on the diameter of individual particles?
Or am I missing something simple? I am attaching a particle_input.dat file for reference.
I would
particle_input.dat (13.4 KB)
be super grateful to hear from you soon.

Thanks.
Sincerely,
Sumanth

What exactly do you mean by “height”? SQP particles are specified by 3 semi-axes which are 1/2 of the size in each of the x,y,z directions (parameters a,b, and c) and 2 shape parameters which determine roundness m and n)

As you can see from my particle_input.dat file, my a,b, and c are fixed, but only the diameters are varying. In my Domain, I see particles with varied heights. I was wondering how this is happening.

Where did this particle_input.dat come from?

I have created it from version specified by MFiX Documentation for 24.1.1

I don’t understand what it means to have fixed semi-axes and varying diameter. These definitions seem to be in conflict. The diameter is determined as a function of a,b,c,m,n. And I still don’t know what you mean by ‘varied heights’

We just discussed this issue and this is how scaling works for SQP particles.

If you want to have SQP particles of different sizes, one way is to specify a,b,c for each of them. But in your case you have specified the semiaxes in the fixed-data section of the file

SQP_semi-axis:   F          0.003 0.003 0.016

and then in the datafile you vary the diameter.

In this case, given a,b,c,m,n we compute a bounding diameter d_p0 which, for the values you specified, comes out to 0.0321377 (this value is shown in the “Superquadric designer” popup)

Now we take the value specified in the diameter column, and compute a scaling ratio d/d_p0, which is then internally applied to the a,b,c you specified for the semiaxes. So if you specify diameter 0.0321377, no scaling is applied. Any diameter above or below that should result in a scaled particle, which still has the aspect ratio of the original particle you specified.

Is this consistent with what you are observing?

Other diameter values, e.g. using a particle size distribution, or particle_input.dat, can specify a diameter, say, d This in turn determines a scaling ratio d/d_p0 which should internally

1 Like

Hello,
Thank you so much for your prompt responses; I am just trying to understand more clearly with an example that I am attaching as a couple of images(since I can’t upload a pdf)

Can you please check it and let me know if my calculations make sense and are correct?
Just to be clear, my whole purpose of finding the “height” is to calculate the volume of each particle and then calculate the mass of it. (if that makes any of my queries more understandable if I am unable to explain properly)
Also, did I take the wrong dp0(reference diameter?)
Please let me know if there’s any mistake that I made.

Thank you once again for your patience, and I am looking forward to hearing from you soon.

Sincerely,
Sumanth

Hi @Sumanth_Penmetcha . I just modified the settings on the forum to allow .pdf uploads. The calculations in your image look correct to me. It was not clear to me that by “height” you meant z-axis since the particles could be oriented differently, but now I know what you mean.

Note that the volume will scale as the cube of the scaling ratio, so if you know the volume V of the original particle, you can just compute r**3 * V for the volume of the scaled particle (where r is the scaling ratio d/d_p0).

You can get the d_p0 value from the Superquadric Designer popup, or you can use the functions in mfixgui/tools/sqp_funcs.py:

from math import floor, log10, hypot
from math import pi as 𝜋, gamma as 𝛤

def sqp_d0(a,b,c,m,n):
    # Diameter of bounding sphere of superquadric
    a,b = max(a,b), min(a,b)
    if m == n == 2:
        return 2*max(a,c)
    if n == 2:
        return 2*hypot(a,c)
    if n < 2.1:
        n = 2.1
    if m == 2:
        𝛼 = 0
    else:
        if abs(m-2) < 0.1:
            m = 2.1 if m>2 else 1.9
        𝛼 = (b/a)**(2/(m-2))

    𝛾 = (1+𝛼**m)**(n/m-1)
    𝛽 = (𝛾*c**2 / a**2)**(1/(n-2))
    𝜁 = 1 / ((1+𝛼**m)**(n/m)+𝛽**n)**(1/n)
    x = a*𝜁
    y = b*𝛼*𝜁
    z = c*𝛽*𝜁
    return 2*hypot(x,y,z)

def sqp_volume(a,b,c,m,n):
    e1, e2 = 2/n, 2/m
    def B(a,b): return  𝛤(a)*𝛤(b)/𝛤(a+b) # Beta function
    #Jaklič, A., Leonardis, A., Solina, F. (2000). Superquadrics and Their Geometric Properties.
    # formula 2.60 https://cse.buffalo.edu/~jryde/cse673/files/superquadrics.pdf
    V = 2 * a*b*c * e1*e2 * B(e1/2 + 1, e1) * B(e2/2, e2/2)
    return V
1 Like

Hello,

Thanks a lot for allowing to upload the pdf documents. I just did some sample volume calculation of the particles, I was wondering if they make sense or not?
Also if these particles were to have a certain density, and now that we know the volume, we can calculate the mass, do you think we can calculate terminal velocity of these particles, and if so how can we do that? Is that possible to do inside MFiX?

Thank you so much for your assistance so far, I really appreciate it.
Have a good rest of your day.

Sincerely,
Sumanth

So
SQP Volume.pdf (29.9 KB)

The calculation you uploaded looks reasonable, however, it might be easier to just compute the volume of the unscaled particle and then scale that by r**3 where r is the scaling radius d/d_p0. If you do it that way, you don’t have to compute as many gamma functions.

MFiX does not have a way to compute terminal velocities, but you should be able to simulate dropping the particles and then look at the velocities in a region near the bottom of the domain - if the domain is tall enough this should be the terminal velocity. You could use monitors for this.

To be clear, if you are computing the volume from a,b,c, you need to scale a and b by the same ratio you scale c.

But since

 V = 8abc * (Γ(1/m + 1)^2 * Γ(1/n + 1)) / Γ(2/m + 1)

and the gamma-function terms don’t change (m and n are fixed), really all the scaling is in the 8abc term. Since a,b and c all scale by the same ratio r, this results in an overall scaling of r**3. Of course, this is true in general of any 3-dimensional shape - if you scale all axes by the same ratio, then the volume scales by the cube of that ratio, regardless of the shape.

Also note that in MFiX we use the expression

   V = 2 * a*b*c * e1*e2 * B(e1/2 + 1, e1) * B(e2/2, e2/2)

where B is the beta function, e1=2/n and e2=2/m.

I’m not sure if this is equivalent to the expression you are using, in terms of the gamma function - it may be, but I haven’t taken the time to check it.

The simplest thing is to take the volume of the unscaled particle (either computed by you or reported by MFiX) and scale by r**3

1 Like

Thank you so much for your responses, Charles; I appreciate it.

I will look into what you suggested and get back to you if I have any further questions.
I hope you have a great Friday and Weekend.

Sincerely,
Sumanth

Hello,

Regarding your last response, In the Monitor pane, I see under Particle data, MFiX can give a sum of all the particle’s volume, but not of each individual particle right? But to calculate the terminal velocity of individual particle I guess I need volume for each particle individually, so I would have to go with the the former process that we discussed which is, computing it myself by scaling it individually right?

Thanks,
Sumanth

That sounds correct. Do you have an equation for terminal velocity? The other way to derive it would be to just drop single particles in a simulation of a tall column and measure the velocity they reach.

I do have an equation for terminal velocity, but they are an implicit equation for Cd and Re, and had to calculate until the values converge iteratively.

Also, if you see the image that I uploaded earlier with the data of about 10 particles’ diameter, scaling_ratio, scaled_c, and “height”; coincidentally, the diameter to height ratio is exactly or very close to equal for all the particles. Do you think there might be a mistake in my calculation?
Or is scaled_c the height that I have to consider, to calculate the volume of the cylinder particle?

For your suggestion of measuring the terminal velocity in MFiX itself, do you think it will work even with disabling the fluid solver?

Thanks for your prompt responses.

I still don’t understand what you are trying to do and what you mean by “height”. If it is the z-semiaxis (c) just call it that. If the particles scale linearly, then a,b,c are all scaled, and it is expected that the ratio of the z-axis to the bounding diameter will be constant - it’s all linear. What are you expecting?

Without the fluid solver enabled, there will be no drag, and therefore no limit to the accelaration due to gravity, and no terminal velocity.

Sorry for the confusion.

To explain it again, I am trying to generate random cylindrical particles with different orientations, heights, and diameters.
But at first, as my diameter is the only variable in my particle_input.dat file and my SQP semi-axes (a,b,c) are fixed, I still see that some particles are longer or shorter. Hence, I contacted you to discover why this is “scaling.” I need to calculate the volume of each cylindrical particle, which requires me to know the height of each individual particle. (Vol of cylinder- pi*((dia/2)**2)*height.
So my question is how do I find this height?
Also for reference, I am attaching an image from the superquadric designer, which also has a volume, may I please know how is this volume being calculated? and is it the same volume(cylindrical particle in picture) that I am talking about?
So all I need is the height and diameter that are being used to calculate the volume of SQP particle(which is cylinder in this case)?

Also, I am using a monitor to verify my calculations with MFiX itself and I have received this csv file, may I please know how the pvol is calculated and what’s the sum over region Volume?
IC_1.csv (2.0 KB)

Thank you so much for your patience.
I am looking forward to hearing from you.
Have a good day.

Please use x,y,z axis terminology instead of ‘height’.
Do you want the particles to have different aspect ratios? In that case, you cannot get them from scaling the same basic particle. If you take a single SQP particle and scale it, all 3 axes are scaled by the same proportion. If you want them to have different proportions, they need to be different phases with different a,b,c parameters. Or use a particle_input.dat file where each particle can have different a,b,c.

The code used to calculate both the bounding diameter and volume is in the file sqp_funcs.py which I already posted earlier in this thread.

Thank you so much, I think I understand what you were saying.
I do not specifically want particles with different aspect ratios, but I want to know the lengths of all three axes. And I am assuming I can get that by multiplying the a,b,c with the scaling ratio.

Thank you for your time and patience.