CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Lagrangian particle tracking with a transient carrier flow

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By joshwilliams

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 21, 2017, 13:38
Default Lagrangian particle tracking with a transient carrier flow
  #1
New Member
 
Join Date: Dec 2016
Posts: 9
Rep Power: 9
Armin.Sh is on a distinguished road
Hi dear FOAMers,

I'm going to run a Lagrangian particle tracking after running a transient simulation for the continuous phase, which means the carrier flow velocity changes in each time step.

On the other hand, it seems that the current particle tracking in OpenFOAM has only been considered for the steady carrier flows (with fixed, i.e. "frozen" velocity). In other words, it reads the data from the start time and doesn't consider the changes of the continuous phase flow velocity in the next time steps.

I tried to solve this issue by entering the following part into the solver code:

Code:
Info<< "Reading field U\n" << endl;
    volVectorField U
    (
        IOobject
        (
          "U",
          runTime.timeName(),
          mesh,
          IOobject::MUST_READ,
          IOobject::NO_WRITE
        ),
        mesh
    );
It reads now the velocity in each time step, but apparently still doesn't apply it to the solving equations, because the results are as before. In conclusion, it seems that I should now change the code, where the velocity is applied to the particle tracking equations.

I'd like to know if somebody knows, how to overcome this issue or at least where the code containing main equations for the Lagrangian particle tracking is.

Thanks in advance!
Armin
Armin.Sh is offline   Reply With Quote

Old   April 16, 2019, 01:05
Default Interpolation of carrier phase velocity time points
  #2
New Member
 
Andrew Kuprat
Join Date: Jan 2016
Posts: 3
Rep Power: 10
kuprat is on a distinguished road
Hi, it looks like as of 2017 there was no capability of releasing particles into a time-dependent velocity field obtained by interpolation of pre-computed velocity field stored in multiple time directories.
https://bugs.openfoam.org/view.php?id=2681
Now it is 2019, has someone done this? I am working on deposition of particles in human respiratory tract where we can reasonably assume periodic breathing. If we could re-use velocity field over multiple breaths it would be perfect.
kuprat is offline   Reply With Quote

Old   October 21, 2020, 11:44
Default
  #3
New Member
 
Simon
Join Date: Jan 2014
Location: Freiburg, Germany
Posts: 15
Rep Power: 12
Nomis is on a distinguished road
Dear kuprat,



I am also interested in simulating droplet in a transient velocity field.

How did you solve the issue?


Greetings Simon
Nomis is offline   Reply With Quote

Old   October 21, 2020, 18:24
Default Re: particles in precomputed velocity field
  #4
New Member
 
Andrew Kuprat
Join Date: Jan 2016
Posts: 3
Rep Power: 10
kuprat is on a distinguished road
Hi Simon,
After getting no response, I assumed no one had injected particles into a precomputed TRANSIENT velocity field. So I ended up using MPPICFoam which meant that I had to redundantly compute the velocity field over several periodic breaths and inject particles into the field. It's possible nobody has actually tried to inject into a precomputed transient velocity field because if the field varies on a fine time scale you would have to store a massive number of timesteps to limit time interpolation error. What I mean is that you may be used to outputting answers every 1.e-2 seconds which is ok for graphics, but if you want the particle tracking to be accurate you might want to interpolate pre-computed velocities every 1.e-3 seconds and it would take too much disk space to store that.
Andrew
kuprat is offline   Reply With Quote

Old   October 22, 2020, 04:10
Default
  #5
Member
 
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16
oswald is on a distinguished road
Hi all,


I actually did use precomputed velocity fields in multiple time folders for a transient particle simulation. But you have to loop over the existing time folders and you have to read in the new/changed fields for every time step.


oswald
oswald is offline   Reply With Quote

Old   October 22, 2020, 04:11
Default
  #6
New Member
 
Simon
Join Date: Jan 2014
Location: Freiburg, Germany
Posts: 15
Rep Power: 12
Nomis is on a distinguished road
Hi Andrew, thanks for the quick reply.
Nomis is offline   Reply With Quote

Old   October 23, 2020, 07:23
Default
  #7
Member
 
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16
oswald is on a distinguished road
Hi Simon,


just in case you missed it as we were writing at almost the same time: Lagrangian particle tracking with a transient carrier flow


oswald
oswald is offline   Reply With Quote

Old   January 9, 2022, 01:28
Default
  #8
New Member
 
Reid
Join Date: Jun 2021
Location: New Zealand
Posts: 3
Rep Power: 5
reidwill is on a distinguished road
Hi all,

I was wondering if anyone has successfully done this?

I am currently trying to complete this with a looping transient U field which correlates to a rotational MRF motion in my model.

I currently have the "volVectorField U" being pulled each timestep similar to Armin's initial post but the solver still seems to be ignoring this and continuing to use the initial U field in createFields.H.

Oswald could you possibly go into more detail about how you achieved it?

Cheers,
Reid

Last edited by reidwill; January 9, 2022 at 07:44.
reidwill is offline   Reply With Quote

Old   January 10, 2022, 13:54
Default
  #9
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5
joshwilliams is on a distinguished road
Hi Reid,


If I understand correctly, I have had this problem before and solved it as follows. To read a pre-computed velocity field at each timestep, one must modify the solver to read the pre-computed field and load this as a different variable name (say you declare the variable "U" in createFields, you set a variable "newU" at each time step). Then U = newU, should work.



Code:
// get header file for pre-computed velocity
IOobject newUHeader
(
 "U",
 runTime.timeName(),
 mesh,
 IOobject::MUST_READ,
 IOobject::NO_WRITE
);


// check field exists
if (newUHeader.typeHeaderOk<volVectorField>(true))
{
    Info << "new U field found" << endl;
    volVectorField newU
    (
         newUHeader,
         mesh
    );
    // set velocity declared in createFields.H to the pre-computed velocity
    U = newU;
}

Hope this helps.
Best,
Josh
oswald likes this.
joshwilliams is offline   Reply With Quote

Old   January 17, 2022, 04:22
Default
  #10
Member
 
Join Date: Sep 2010
Location: Leipzig, Germany
Posts: 96
Rep Power: 16
oswald is on a distinguished road
Hi Reid,


I think Josh's solution should do the trick? Have you tried it yet?
oswald is offline   Reply With Quote

Old   January 17, 2022, 05:55
Default
  #11
Senior Member
 
Josh Williams
Join Date: Feb 2021
Location: Scotland
Posts: 113
Rep Power: 5
joshwilliams is on a distinguished road
There was a similar discussion here. The icoUncoupledKinematicParcelFoam solver is a good starting point for modification. If you just add the code given in my previous post, it should work.



Linking a velocity field to particles using icouncoupledKinematicParcelFoam
joshwilliams is offline   Reply With Quote

Reply

Tags
lagrangian, particle tracking, transient flow


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
dispersion model with lagragian particle tracking model for incompressible flows eelcovv OpenFOAM Running, Solving & CFD 54 April 10, 2018 10:36
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 02:27
Lagrangian Particle Tracking Initial step Bruce Hartley OpenFOAM Programming & Development 4 September 2, 2015 06:32
particle tracking in unsteady flow peterchen FLUENT 1 July 22, 2010 23:18
Particle Tracking in Multiphase Flow Paul CFX 0 December 15, 2003 12:32


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