CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Lagrangian Particel as POST-Processing (https://www.cfd-online.com/Forums/openfoam/73182-lagrangian-particel-post-processing.html)

sven82 March 1, 2010 12:27

Lagrangian Particel as POST-Processing
 
Hi Foamers,

At the moment I will try to generate a Lagrancian Particle cloud as Postprocessor.
The first step for me was a llok at the solver icoLacrancianFoam (1.5-dev) and uncoupledKinematicParcelFoam(1.6). The first Solver works fine for a calculation of the particle clout for each time step. The next Solver,uncoupledKinematicParcelFoam(1.6) exist unfortunately no tutorial. But I try to read the code and add the missing dicts (g,thermophysicalProperties,kinematicCloudProperti es,kinematicCloudPositions) to the rhoPisoFoam Tutorial and its look like fine. But dont move the particle only the gravity works :-( . A other curious think is that the code overwrite the existen velocity , pressure ...., fileds for the timesteps? Thats bad !

My first question is now is uncoupledKinematicParcelFoam a solver for a postprocessing particle move? The code looks like, with the only part:
kinematicCloud.evolved()

The second question is, its possible to use the icoLagrancianSolver as PostProcessing Tool?

Thanks for any help

Sven



RDanks September 19, 2011 15:37

I'm having an identical problem in OF1.7.x.

I've got everything set up correctly (I think), but when I run uncoupleKinematicParcelFoam, it appears that the utility overwrites the internal field data at the current time step. It then calculates the forces on the parcels. Thus the parcels never "feel" the correct flow field and only fall under the force of gravity.

I really have no clue what is going wrong. Did this issue ever get resolved?

Jens September 20, 2011 02:48

Did u "activate" the Drag Force in the "CloudDict" (DragModel) and changed the "coupled"-entry "true"?

On the other hand ... if u calculate a tutorial for "uncoupleKinematicParcelFoam" maybe there is no velocity-field. I think u compute an uncoupled case which means only gravity acting on the particles.

Just my two cents.

Regards,
Jens

preichl September 20, 2011 04:16

While I have never used this solver (uncoupledKinematicParcelFoam), I would imagine that the flow specified at time 0 would be the flow field used (but I could be wrong).
Looking at the source files for uncoupledKinematicParcelFoam indicates that it only does one way coupling. i.e. only the fluids influence on the particles is considered and I think you may probably need to have the coupled entry as true.

icoLagrangianFoam can do two way coupling (i.e. the fluids influence on the particles momentum and the particles influence on the fluids momentum is considered). While I have not tried it I suspect that setting coupling to false here should do one way coupling and hence may be what you are after for post processing (i.e. I am guessing that you are only interested in tracking the particles positions and not their influence on the flow).
If you are using OF 1.6-ext it is in tutorials/lagrangian/icoLagrangianFoam (you will need to compile it with wmake) and there is a channelParticles example.

RDanks September 20, 2011 11:54

Jens,

Yes, I did set the active flag. With that flag turned off the particles do not move at all (i.e. they are inactive like when they hit a boundary with the "stick" condition).

The coupled flag also has no effect, my understanding is that the coupled flag will take into account the perturbations in the existing flow field caused by the particles (which I suppose explains why the utility writes out the U field). Thanks for the input though.

preichl,
Thanks for the tip on icoLagrangianFoam, I knew about it but I was really hoping for a post processing utility rather than having to re run my case with a different solver. I'll check out the example for the set up perhaps.

RDanks September 20, 2011 16:45

So upon a closer look, it seems that my particles are gaining velocity in the x and y directions, however they are 2 orders of magnitude smaller than the z direction velocity.

I've purposely introduced a high flow velocity around the droplets (on the order of a couple metres per second) and my particles are designed to be similar to rain drops (rho0 = 1000 kg/m3, d = 0.0025m) so those air speeds should be inducing a much greater change in x and y velocity.

I'm completely stumped....

preichl September 21, 2011 04:45

The drag coefficient on the particles will be something like (from SphereDrag.C).

scalar Cd;
if (Re < SMALL)
{
Cd = GREAT;
}
else if (Re > 1000.0)
{
Cd = 0.424;
}
else
{
Cd = 24.0/Re*(1.0 + 1.0/6.0*pow(Re, 2.0/3.0));
}
Re will be calculated using air density

So you can estimate the drag force on your particles as something like 0.5*rho_air*v^2 *Cross_sectional_area_of_particle * Cd

If you divide this by the particle mass you should be able to estimate the acceleration on the particles due to the flow and you can compare this with the acceleration due to gravity.

RDanks September 21, 2011 10:44

preichl,

I checked the accelerations and they were pretty small, I ran another test with the airspeed turned way up and set the particles up to drop right through a jet of high speed (>15m/s) air. They still have practically no force applied to them.

I'm also trying the uncoupledKinematicparcelFoam in OF2.0.x and am having similar results.

I definitely feel that there's something off about the U field, since when it writes the field out the entire internal field is 0. It reads in the existing field just fine, but somewhere along the way things get zeroed out....

preichl September 23, 2011 03:21

It may pay to use something like icoLagrangianFoam with the coupling flag set to false. I just ran a test case in which I have a moving particle in air and I compared this with the result one would expect by modelling the trajectory equations directly (i.e. a sphere with and initial velocity and with only drag acting on it) and the speeds all look very close.
With the coupling flag set to false only the carrier fluid acts an the particles and the particles have no impact on the carrier fluid (I think this may be what you are after).
If the coupled flag is set to true both the carrier fluid and the particles influence one another.

I have never really used uncoupledKinematicparcelFoam so I can't comment on what it is doing with the velocity field (it may well be doing something strange). Maybe try using icoLagrangianFoam and see if you get different results.

I have a modified version of icoLagrangianFoam that seems to work in OF 2, but I need to do a few more tests to be sure. (So far it has passed the simple trajectory speed test).

mksingh September 23, 2011 11:43

Regarding IcoLagrangianFoam
 
Hi preichl,
I am new to the particle tracking in OF. Could you please send me the IcoLagrangianFoam for OF 2.0.X. to test some cases of bubble columns where two way coupling is required. I have used lagrangian as well as Euler approach in ANSYS-CFX to validate two pahse flow simulations with experiemnts and I would like to compare using OF2.0.X. My email id is as follows:
mrityunjay111@gmail.com
Thanks in advance.
M K

RDanks September 26, 2011 09:28

Well I seem to have it working. It seems that there was something off about the mesh I was using. (It was imported from Star-CCM) because the simpler box case I created works perfectly.

The only thing I can't figure out is the "PatchPostProcessing" option. It generates a "postProcessing" folder with .post files for each selected patch for each timestep. I have no clue what to do with these .post files.
Thanks for all the assistance preichl et al.

preichl September 28, 2011 20:51

Hi mksingh,

I have posted the solver and an example at http://www.cfd-online.com/Forums/ope...ds-number.html

This is still very preliminary and you should use it at your own risk (i.e. as the post at the link states it is my first pass at converting icoLagrangianFoam to OF 2).
If you find any bugs / issues please let me know.

Cheers,

Paul.


All times are GMT -4. The time now is 12:27.