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

Multiphase Solid Particle Tracking

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 3, 2017, 06:28
Default
  #101
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 225
Rep Power: 12
vonboett is on a distinguished road
I would use salome to create a tet mesh and convert to OpenFOAM (some nice tutorials on youtube).
However, I use hex mesh and snappyHexMesh so I can't help you here.

Good Luck!
vishwesh likes this.
vonboett is offline   Reply With Quote

Old   November 3, 2017, 06:30
Default
  #102
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 4
vishwesh is on a distinguished road
Quote:
Originally Posted by vonboett View Post
I would use salome to create a tet mesh and convert to OpenFOAM (some nice tutorials on youtube).
However, I use hex mesh and snappyHexMesh so I can't help you here.

Good Luck!
Thanks for the help! That's what I am planning to do
vishwesh is offline   Reply With Quote

Old   November 7, 2017, 01:39
Default
  #103
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 4
vishwesh is on a distinguished road
Hi!

I was able to make a tet mesh using SALOME. I have another doubt regarding the solver technique proposed by Aurelia in her thesis.

The inject function that we are using, can it be used multiple times to inject multiple particles at different time instances? Also what happens to the particles that have been injected earlier...
vishwesh is offline   Reply With Quote

Old   November 17, 2017, 00:11
Default Interpolation not progressing
  #104
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 4
vishwesh is on a distinguished road
Hi!

Thanks to the help, I was able to make changes to the solver and now it's working fine. I have one problem where I am stuck, following Aurelia's work and adding rhoInterp, UInterp, etc. in solidParticleCloud.C file (move function), when I run the solver, it gets stuck as soon as it reaches the interpolation part. I don't know why that is happening. I left the solver working for a whole day on 32 processors but it didn't proceed further than that.

Here is the relevant solidParticleCloud.C section:

Code:
    Info<<"Function called"<<endl;
    const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
    Info<<"rho: "<<rho<<endl;
    const volVectorField& U = mesh_.lookupObject<const volVectorField>("U");
    const volScalarField& nu = mesh_.lookupObject<const volScalarField>("nu");
    const volScalarField& alphaW = mesh_.lookupObject<const volScalarField>("alpha.water");
    const volScalarField& p = mesh_.lookupObject<const volScalarField>("p");

    Info<<"lookup object worked"<<endl;

    Info<<"rho interpolation"<<endl;
    interpolationCellPoint<scalar> rhoInterp(rho);
    Info<<"U interpolation"<<endl;
    interpolationCellPoint<vector> UInterp(U);
    Info<<"nu interpolation"<<endl;
    interpolationCellPoint<scalar> nuInterp(nu);
    Info<<"alpha.water interpolation"<<endl;
    interpolationCell<scalar> alphaWInterp(alphaW);
    Info<<"p interpolation"<<endl;
    interpolationCellPoint<scalar> pInterp(p);

    Info<<"Interpolation complete"<<endl;
And the results:

Code:
Injecting particle with diameter: 0.0301191m, center position: (0.153843 0.0928162 0.102841)m, velocity: (0 -2 0)m/s
Function called
rho: dimensions      [1 -3 0 0 0 0 0];

internalField   uniform 1;

boundaryField
{
    inlet
    {
        type            symmetry;
    }
    outlet
    {
        type            symmetry;
    }
    walls
    {
        type            symmetry;
    }
    procBoundary0to1
    {
        type            processor;
        value           uniform 1;
    }
    procBoundary0to2
    {
        type            processor;
        value           uniform 1;
    }
    procBoundary0to3
    {
        type            processor;
        value           uniform 1;
    }
}

lookup object worked
rho interpolation
vishwesh is offline   Reply With Quote

Old   March 6, 2018, 02:49
Default
  #105
New Member
 
liyuan
Join Date: Jul 2015
Posts: 8
Rep Power: 6
yuanlee2011 is on a distinguished road
Quote:
Originally Posted by alexlupo View Post
I am not sure if I understood your question properly, but the solidParticle class should not give any problems relating phase migration. The issues you can experience (and by the way that I am experiencing) are related to the particles going out of the boundaries, thus showing unexpected behavior, or simulations crashing in parallel due to the injection of particles in more than one processor boundary.
If your question is related to particles moving from one phase to another, I guess that could eventually happen, but from my point of view that could also have a physical explanation, taking into account the difference of density between both particles and fluids.
I guess if both phases are clearly separated, you could just create a boundary in between so that you would not allow the particles to move from phase to the other.
Let me know if this was what you intend to do and if not, could you explain it further?
Cheers,
The simulation could perform smoothly when run in serial, while crashed in parallel,what‘s the reasons?
yuanlee2011 is offline   Reply With Quote

Old   April 10, 2018, 18:51
Default erroneous interpolation in solidParticle class and 2D issue
  #106
New Member
 
soroush amd
Join Date: Oct 2011
Posts: 3
Rep Power: 10
soroush.amd is on a distinguished road
Hello all,

I am using OpenFoam 4.1 and have coupled solidParticle class with icoFoam for particle tracking. It seems to work fine except for two issues that I just came across.
1. I have noticed that sometimes the interpolation looks unreasonable and trapped in a very long loop. this only happens when my particle is on a face. something like below:

Code:
Time = 3.028 trackTime = 0.001 tEnd = 0.001 steptFraction() = 0
in solidParticle, position = (0.0381269 0.095 0.000327212), dt = 0.001, U = (0.685765 0.0165633 0)
U_ = (0.685765 0.0165633 0)
1moving in solidParticle.C
Time = 3.028 trackTime = 0.001 tEnd = 0.000999879 steptFraction() = 0.000120856
in solidParticle, position = (0.038127 0.095 0.000327212), dt = 0.000999879, U = (0.685766 0.0165632 0)
U_ = (0 -0.0165632 0)
1moving in solidParticle.C
Time = 3.028 trackTime = 0.001 tEnd = 0.000999879 steptFraction() = 0.000120856
in solidParticle, position = (0.038127 0.095 0.000327281), dt = 0.000999879, U = (1 0 0)
U_ = (1 0 0)
1moving in solidParticle.C
Time = 3.028 trackTime = 0.001 tEnd = 0.000999879 steptFraction() = 0.000120856
in solidParticle, position = (0.038127 0.095 0.000327315), dt = 0.000999879, U = (0.685766 0.0165632 0)
U_ = (0.685766 0.0165632 0)
1moving in solidParticle.C
Time = 3.028 trackTime = 0.001 tEnd = 0.000999124 steptFraction() = 0.000875538
in solidParticle, position = (0.0381275 0.095 0.000327315), dt = 0.000999124, U = (0.685768 0.0165623 0)
U_ = (0 -0.0165623 0)
1moving in solidParticle.C
Time = 3.028 trackTime = 0.001 tEnd = 0.000999124 steptFraction() = 0.000875538
in solidParticle, position = (0.0381275 0.095 0.000327383), dt = 0.000999124, U = (1 0 0)
U_ = (1 0 0)
1moving in solidParticle.C
Time = 3.028 trackTime = 0.001 tEnd = 0.000999124 steptFraction() = 0.000875538
in solidParticle, position = (0.0381275 0.095 0.000327417), dt = 0.000999124, U = (0.685768 0.0165623 0)
U_ = (0.685768 0.0165623 0)
1moving in solidParticle.C
Time = 3.028 trackTime = 0.001 tEnd = 0.00099837 steptFraction() = 0.00163026
in solidParticle, position = (0.038128 0.095 0.000327417), dt = 0.00099837, U = (0.685771 0.0165615 0)
........ and it goes on for much longer

It is a cavity case with structured grid, and (0.0381269 0.095 0.000327212) falls on a face. One thing to note is that the interpolated velocity does not make sense at all as it fluctuates between (0.685768 0.0165623 0) and (1 0 0).

2. The second issue that I have noticed is that although my case is 2D and there is no z-velocity component, my final particle position depends on its initial z-coordinate which is not physical. I have noticed that the code itself change the particle z-coordinate sometimes but not sure why this happens, its definitely not due to z-velocity component as its always zero and I have confirmed it. So the solidParticle library is doing something under the hood which I do not know and whatever it is it does not seem correct to me.

I was wondering if anyone has faced such issues? I have heard in other threads that solidParticle library has bugs and should not be used, should I use something else such as intermediate library instead?

Thank you for your help,
soroush.amd is offline   Reply With Quote

Old   April 11, 2018, 05:48
Default
  #107
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 225
Rep Power: 12
vonboett is on a distinguished road
have you tried in 3D?
I recommend DPMFoam as a good Lagrangian coupled solver, or IcoUncoupledKinematicParcelFoam if you only need particles as trackers.
If your particle is larger then the cell size at the face, your particle will stick to the wall, it will "sink into it" and cause pressure oscillatios.
vonboett is offline   Reply With Quote

Old   April 16, 2018, 12:16
Default
  #108
New Member
 
soroush amd
Join Date: Oct 2011
Posts: 3
Rep Power: 10
soroush.amd is on a distinguished road
Thank you for your reply. Yes I have also tried it in 3D, although I did not try to reproduce this error because I am interested in 2D problems only. I found solidParticle library somehow immature because in intermediate library there are some functionally specifically for 2D to restrain the particle within the mesh and its interpolated velocity, also to make sure particle are injected via one processor only which is a problem in solidParticle library if your injection occurs on a processor patch. So I have moved to intermediate library as its more mature and reliable.

Quote:
Originally Posted by vonboett View Post
have you tried in 3D?
I recommend DPMFoam as a good Lagrangian coupled solver, or IcoUncoupledKinematicParcelFoam if you only need particles as trackers.
If your particle is larger then the cell size at the face, your particle will stick to the wall, it will "sink into it" and cause pressure oscillatios.
soroush.amd is offline   Reply With Quote

Old   October 1, 2018, 18:59
Default
  #109
New Member
 
Nilay Kulkarni
Join Date: May 2018
Posts: 24
Rep Power: 3
neilk is on a distinguished road
Quote:
Originally Posted by houwy View Post
Hi! I still have some problem with it.
code:

Code:
void Foam::solidParticleCloud::inject(solidParticle::trackingData &td)
{
  label cellI = 1;
  label tetFaceI = 1;
  label tetPtI = 1;
  mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI);
  solidParticle* ptr1=new solidParticle(*this,td.cloud().posP1_,cellI,tetFaceI, tetPtI,
  td.cloud().dP1_,td.cloud().UP1_);
  Cloud<solidParticle>::addParticle(ptr1);
  mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI);
  solidParticle* ptr2=new solidParticle(*this,td.cloud().posP2_,cellI,tetFaceI, tetPtI,
  td.cloud().dP2_,td.cloud().UP2_);
  Cloud<solidParticle>::addParticle(ptr2);
}


when I compile it , There are still some errors.


Code:
solidParticleCloud.C: In member function ‘void Foam::solidParticleCloud::inject(Foam::solidParticle::trackingData&)’:
solidParticleCloud.C:81:34: error: no matching function for call to ‘Foam::solidParticle::solidParticle(Foam::solidParticleCloud&, Foam::vector&, Foam::label&, Foam::label&, Foam::label&, Foam::scalar&, Foam::vector&)’
solidParticleCloud.C:81:34: note: candidates are:
solidParticle.H:135:9: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, Foam::Istream&, bool)
solidParticle.H:135:9: note:   candidate expects 3 arguments, 7 provided
solidParticleI.H:47:8: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, const vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const vector&)
solidParticleI.H:47:8: note:   no known conversion for argument 1 from ‘Foam::solidParticleCloud’ to ‘const Foam::polyMesh&’
solidParticle.H:58:7: note: Foam::solidParticle::solidParticle(const Foam::solidParticle&)
solidParticle.H:58:7: note:   candidate expects 1 argument, 7 provided
solidParticleCloud.C:85:34: error: no matching function for call to ‘Foam::solidParticle::solidParticle(Foam::solidParticleCloud&, Foam::vector&, Foam::label&, Foam::label&, Foam::label&, Foam::scalar&, Foam::vector&)’
solidParticleCloud.C:85:34: note: candidates are:
solidParticle.H:135:9: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, Foam::Istream&, bool)
solidParticle.H:135:9: note:   candidate expects 3 arguments, 7 provided
solidParticleI.H:47:8: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, const vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const vector&)
solidParticleI.H:47:8: note:   no known conversion for argument 1 from ‘Foam::solidParticleCloud’ to ‘const Foam::polyMesh&’
solidParticle.H:58:7: note: Foam::solidParticle::solidParticle(const Foam::solidParticle&)
solidParticle.H:58:7: note:   candidate expects 1 argument, 7 provided 
Hello,

Were you able to solve this problem? I am trying to compile the same solver and it's giving me the same error.

Thank you

Nilay
neilk is offline   Reply With Quote

Old   October 1, 2018, 19:01
Default
  #110
New Member
 
Nilay Kulkarni
Join Date: May 2018
Posts: 24
Rep Power: 3
neilk is on a distinguished road
Quote:
Originally Posted by houwy View Post
Hi! I still have some problem with it.
code:

Code:
void Foam::solidParticleCloud::inject(solidParticle::trackingData &td)
{
  label cellI = 1;
  label tetFaceI = 1;
  label tetPtI = 1;
  mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI);
  solidParticle* ptr1=new solidParticle(*this,td.cloud().posP1_,cellI,tetFaceI, tetPtI,
  td.cloud().dP1_,td.cloud().UP1_);
  Cloud<solidParticle>::addParticle(ptr1);
  mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI);
  solidParticle* ptr2=new solidParticle(*this,td.cloud().posP2_,cellI,tetFaceI, tetPtI,
  td.cloud().dP2_,td.cloud().UP2_);
  Cloud<solidParticle>::addParticle(ptr2);
}


when I compile it , There are still some errors.


Code:
solidParticleCloud.C: In member function ‘void Foam::solidParticleCloud::inject(Foam::solidParticle::trackingData&)’:
solidParticleCloud.C:81:34: error: no matching function for call to ‘Foam::solidParticle::solidParticle(Foam::solidParticleCloud&, Foam::vector&, Foam::label&, Foam::label&, Foam::label&, Foam::scalar&, Foam::vector&)’
solidParticleCloud.C:81:34: note: candidates are:
solidParticle.H:135:9: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, Foam::Istream&, bool)
solidParticle.H:135:9: note:   candidate expects 3 arguments, 7 provided
solidParticleI.H:47:8: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, const vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const vector&)
solidParticleI.H:47:8: note:   no known conversion for argument 1 from ‘Foam::solidParticleCloud’ to ‘const Foam::polyMesh&’
solidParticle.H:58:7: note: Foam::solidParticle::solidParticle(const Foam::solidParticle&)
solidParticle.H:58:7: note:   candidate expects 1 argument, 7 provided
solidParticleCloud.C:85:34: error: no matching function for call to ‘Foam::solidParticle::solidParticle(Foam::solidParticleCloud&, Foam::vector&, Foam::label&, Foam::label&, Foam::label&, Foam::scalar&, Foam::vector&)’
solidParticleCloud.C:85:34: note: candidates are:
solidParticle.H:135:9: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, Foam::Istream&, bool)
solidParticle.H:135:9: note:   candidate expects 3 arguments, 7 provided
solidParticleI.H:47:8: note: Foam::solidParticle::solidParticle(const Foam::polyMesh&, const vector&, Foam::label, Foam::label, Foam::label, Foam::scalar, const vector&)
solidParticleI.H:47:8: note:   no known conversion for argument 1 from ‘Foam::solidParticleCloud’ to ‘const Foam::polyMesh&’
solidParticle.H:58:7: note: Foam::solidParticle::solidParticle(const Foam::solidParticle&)
solidParticle.H:58:7: note:   candidate expects 1 argument, 7 provided 
Hello,
Were you able to solve this problem? I am trying to compile the same solver and I am stuck at this point. Could you please help me out?

Thank you

Nilay
neilk is offline   Reply With Quote

Old   April 4, 2019, 22:09
Default
  #111
New Member
 
John
Join Date: Mar 2019
Posts: 24
Rep Power: 2
thintn222 is on a distinguished road
Thank you so much for this post !

Last edited by thintn222; April 8, 2019 at 05:24. Reason: Delete
thintn222 is offline   Reply With Quote

Old   July 1, 2019, 06:36
Default
  #112
Member
 
krishna kant
Join Date: Feb 2016
Location: Hyderabad, India
Posts: 97
Rep Power: 5
kk415 is on a distinguished road
hello All


I am also working in coupling of interFoam with lagrangian particle. I still don't understand what is the meaning of tetFacei and tetPtI. If I need to define a particle I need its position, diameter and velocity. what is importance of tetFaceI and tetPtI. If I want to create a particle at position X which lies inside cellI then physically what is tetFaceI and tetPtI ???
kk415 is offline   Reply With Quote

Reply

Tags
interfoam, lagrangian, move, solidparticle

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
lagrangian solid particle tracking - OFv2.1 PelusDadidus OpenFOAM Programming & Development 7 August 21, 2015 10:05
Questions regarding Particle Tracking and Rotating Frame of reference Maxime Gauthier CFX 1 May 9, 2011 16:07
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 02:29
Particle tracking - Domain interface / FrozenRotor mohanrao CFX 4 January 23, 2008 04:39
restarting lagrange (particle tracking) simulation dbdias CFX 0 September 22, 2007 20:26


All times are GMT -4. The time now is 09:37.