Ask for help about running the example of collidingBubbles3d

Hello everyone:
I’m a newbie to learn the Palabos, now I have some problems about this example

First, I don’t know how to input the parametes, is this right?
:~/Desktop/Palabos/examples/showCases/collidingBubbles3d$ ./twoBubbles 1.e-4 5 15 tmp

If this right, I run this example, but I can’t get what I want. This information just appeared on the screen
terminate called after throwing an instance of ‘std::bad_alloc’
what(): std::bad_alloc
Aborted (core dumped)

what should I do?

Hello,

the way you give the parameters on the command-line is correct. You might also want to run your code in parallel, with, say 4 processes, like:

mpirun -np 4 ./twoBubbles 1.e-4 5 15 tmp

The “std::bad_alloc” exception means that you do not have enough memory to run the example as it is currently configured. Maybe if you lower the resolution (one or all of the variables nx, ny, nz) then you would be able to run it at the same computer, but you have to try.

Best,
Dimitris

Thank you very much~~ I really appreciate for you reply~~

Hi Dimitris, I am a beginner to Palabos. Could you kindly explain what are the meanings of the parameters after “./twoBubbles”? Or you can refer to some document I have access to read.

Thanks,

Jay

dimitris@flowkit Wrote:

Hello,

the way you give the parameters on the
command-line is correct. You might also want to
run your code in parallel, with, say 4 processes,
like:

mpirun -np 4 ./twoBubbles 1.e-4 5 15 tmp

The “std::bad_alloc” exception means that you do
not have enough memory to run the example as it is
currently configured. Maybe if you lower the
resolution (one or all of the variables nx, ny,
nz) then you would be able to run it at the same
computer, but you have to try.

Best,
Dimitris

Dear Jay,

You need to edit the source code twoBubbles.cpp to get your answers. On the top comments, you shall find relative literature, and in the function “readCommandLine” you shall see the meaning of the command line parameters.

Best Regards,
Dimitris

Dimitris,

Thanks, I got it.
global::argv(1).read(sigma);
global::argv(2).read(delta);
global::argv(3).read(radius);
global::argv(4).read(fNameOut);

So the command varies from cases? And another question, which I have asked somewhere else but no one replied, is how Palabos controls the running time, such as the start time and end time. I have been using OpenFOAM for years so I expect the structure of Palabos might be similar to OpenFOAM.

Best,

Jay

Dear Jay,

the structure of Palabos is totally different from more or less everything you know from OpenFOAM.

You can vary three physical parameters via the command line, and also you can specify a location for your results to be stored. All the other parametes are hardcoded in twoBubbles.cpp. The main loop is

[code=“cpp”]

for (plint iter=0; iter<max_iter; ++iter) {
// some commands
}


(line 436 and after) and max_iter is set to 20000 in line 102.

Hope this helps you

best
Philippe

Thanks for your reply! It is very helpful!

Jay

Hello can anyone please tell how can I run colliding bubbles code in windows 10 . I am having problem putting the density surface tension and file path in readcommandline function