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 Community New Posts Updated Threads Search

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 25, 2017, 10:09
Default
  #81
New Member
 
Laura Sumner
Join Date: Mar 2017
Posts: 13
Rep Power: 9
LauraSumner is on a distinguished road
Hey Tom,

Thanks for the reply! Yeh i have done everything you said already.... the only difference between your code and mine is the inclusion of smom_ which I don't have... Also did you mean the .C file rather than .H? as that's where the original move member function was declared.

I added some comments into solidParticle.C and these do not appear at any point during the run, so it's as if that code is never being run. Is that supposed to be the case?

Laura
LauraSumner is offline   Reply With Quote

Old   April 25, 2017, 10:17
Default
  #82
Member
 
Thomas Flint
Join Date: Jan 2016
Posts: 60
Rep Power: 10
tom_flint2012 is on a distinguished road
The code I posted should definitely be in the solidparticlecloud.C file. If you have declared the functions in the .H file but not got them in the .C file then that's probably why there are no particles being injected. If you post your solidparticlecloud.h and .c files that would help me see your problem probably.

All the best
tom_flint2012 is offline   Reply With Quote

Old   April 25, 2017, 11:28
Default
  #83
New Member
 
Laura Sumner
Join Date: Mar 2017
Posts: 13
Rep Power: 9
LauraSumner is on a distinguished road
I think we agree, I was just clarifying because I think you made a typo in your previous comment
Attached Files
File Type: c solidParticleCloud.C (4.1 KB, 33 views)
File Type: h solidParticleCloud.H (3.5 KB, 13 views)
LauraSumner is offline   Reply With Quote

Old   April 26, 2017, 10:05
Default
  #84
Member
 
Thomas Flint
Join Date: Jan 2016
Posts: 60
Rep Power: 10
tom_flint2012 is on a distinguished road
They look fine to me. I wonder if youre including the unedited versions by mistake. Do you have all the cloud .H and .C files in your main solver directory? Sorry I'm all out of ideas.
tom_flint2012 is offline   Reply With Quote

Old   July 7, 2017, 15:47
Default
  #85
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
Hey guys
i am also trying to couple lagrangian eulerian approach. my problem is air-water system flowing in cylinder [annular two phase flow] now DROPLETS OF WATER which come into air must CONVERT TO LAGRANGIAN PARTICLE. next when these particle come into contact with water again they MUST CONVERT INTO EULERIAN form. so i guess i need two way coupling
i am trying to do this aurelia valor code. but can't understand how to convert water droplet which detaches from water film to droplet [liq droplet to particle]
saddy is offline   Reply With Quote

Old   July 7, 2017, 16:26
Default
  #86
Member
 
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14
Mahdi2010 is on a distinguished road
Quote:
Originally Posted by saddy View Post
Hey guys
i am also trying to couple lagrangian eulerian approach. my problem is air-water system flowing in cylinder [annular two phase flow] now DROPLETS OF WATER which come into air must CONVERT TO LAGRANGIAN PARTICLE. next when these particle come into contact with water again they MUST CONVERT INTO EULERIAN form. so i guess i need two way coupling
i am trying to do this aurelia valor code. but can't understand how to convert water droplet which detaches from water film to droplet [liq droplet to particle]
You would need a spatial criterion based on resolution of
Your VoF simulation. This should determine where and when the interface is poorly resolved. Then you would identify those cells as a droplet/liquid structure
And simply replace them by Lagrangian particle.

The concept is rather simple but it needs an accurate implementation.
Mahdi2010 is offline   Reply With Quote

Old   July 9, 2017, 13:12
Question
  #87
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
Quote:
Originally Posted by Mahdi2010 View Post
You would need a spatial criterion based on resolution of
Your VoF simulation. This should determine where and when the interface is poorly resolved. Then you would identify those cells as a droplet/liquid structure
And simply replace them by Lagrangian particle.

The concept is rather simple but it needs an accurate implementation.
thanks mahdi.
but what do you mean spatial criterion based on vof resolution? i am thinking of implementing following algorithm
1. check all mesh cells and their vicinity for air, alpha=0, if yes, check volume?
2 set the volume criterion, Vcutoff
3 , if V<Vcutoff, delete volume from eulerian phase and replace with particle of same volume and calculate dia according to 4/3pi r^3
is this algorithm good enough??
i already have reverse algorithm from aurelia vallier's tutorial
saddy is offline   Reply With Quote

Old   July 9, 2017, 14:01
Default
  #88
Member
 
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14
Mahdi2010 is on a distinguished road
Quote:
Originally Posted by saddy View Post
thanks mahdi.
but what do you mean spatial criterion based on vof resolution? i am thinking of implementing following algorithm
1. check all mesh cells and their vicinity for air, alpha=0, if yes, check volume?
2 set the volume criterion, Vcutoff
3 , if V<Vcutoff, delete volume from eulerian phase and replace with particle of same volume and calculate dia according to 4/3pi r^3
is this algorithm good enough??
i already have reverse algorithm from aurelia vallier's tutorial

This sound reasonable. By spatial resolution, I meant the something similar. Because the V_cutoff may depend on your grid resolution. But there is something else you should take care of: Imagine you check 3 cells in row with the same criterion, and you replace 3 droplets with the same volume in those cells, but in the actual situation, they may be one larger droplet/liquid structure connected to each other. In this case, you would replace one larger droplet with 3 smaller which in unphysical. I guess you would need a search algorithm to find all the droplet with their correct volume first, then replace them.
saddy likes this.
Mahdi2010 is offline   Reply With Quote

Old   July 9, 2017, 15:17
Default
  #89
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
Wow. i didn't thought of case where droplet includes no of cell volumes. i have to change algorithm
so i am thinking how do i accomplish this droplet size? how to find the extent of droplet and total no cells it comprises and then do the rest??
u got any ideas?
saddy is offline   Reply With Quote

Old   July 9, 2017, 15:26
Default
  #90
Member
 
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14
Mahdi2010 is on a distinguished road
Quote:
Originally Posted by saddy View Post
Wow. i didn't thought of case where droplet includes no of cell volumes. i have to change algorithm
so i am thinking how do i accomplish this droplet size? how to find the extent of droplet and total no cells it comprises and then do the rest??
u got any ideas?
you may find some remarks if you check the Vallier's PhD thesis. The topic is for bubble formation due to cavitation (similar problem with different application) There is a search algorithm in that. However, you first should get sure if this is a the right way for your
problem or not! then go for in-detail coding and implementation (which seems very costy).
Mahdi2010 is offline   Reply With Quote

Old   July 10, 2017, 03:32
Default
  #91
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
thanks i got the thesis and there is algorithm defined for 2 way coupling.
and about bubbles?? right. yeah actually she is defining bubbles by solid particles bcz this is her initial work and later she has used Rayleigh plesset equation to account for varying bubble radius, so i'm quite sure she has implemented what i need for my work.
thanks mahdi!!!
saddy is offline   Reply With Quote

Old   November 3, 2017, 03:17
Default Problem in findCellFacePt OF-3.0.x
  #92
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9
vishwesh is on a distinguished road
Hi!

Sorry for jumping in the discussion. I am also working on something similar based on Aurelia's work. I have modified the inject and move functions though.

Instead of reading the positions, diameter, and velocity of Bubbles from particleProperties, I send them from interFoam as follows:

Code:
        Info<< "Evolving cloud" << endl;
        Info<<"g: " << g << " posP: " << posP << " dP: " << dP << " UP: " << UP << endl;
        particles.move(g,posP,dP,UP);
        Info<< "Cloud size = " << particles.size() << endl;
Code:
// Inject Function:
void Foam::solidParticleCloud::inject(solidParticle::trackingData &td, vector posP, scalar dP, vector UP)
{
    Info<<"Inject function called"<<endl;
    label cellI=1;
    label tetFaceI=1;
    label tetPtI=1;

    Info<<"findCellFacePt starting"<<endl;
    mesh_.findCellFacePt(posP, cellI, tetFaceI, tetPtI);
    Info<<"findCellFacePt ended"<<endl;
    Info<<"Adding a new particle"<<endl;
    solidParticle* ptr1 = new solidParticle(mesh_, posP, cellI, tetFaceI, tetPtI, dP, UP);
    Info<<"New particle added"<<endl;
    Info<<"Initial equilibrium radius"<<endl;
    ptr1->initialEquilibriumRadius(td);
    Info<<"Finally add particle"<<endl;
    Cloud<solidParticle>::addParticle(ptr1);
}
Code:
void Foam::solidParticleCloud::move(const dimensionedVector& g, vector posP, scalar dP, vector UP)
{

    Info<<"Move function called"<<endl;
    const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
    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");

    interpolationCellPoint<scalar> rhoInterp(rho);
    interpolationCellPoint<vector> UInterp(U);
    interpolationCellPoint<scalar> nuInterp(nu);

    interpolationCell<scalar> alphaWInterp(alphaW);

    interpolationCellPoint<scalar> pInterp(p);

    smom_ = vector::zero;
    correctalphaW_=0;
    correctU_=vector::zero;

    solidParticle::trackingData
     td(*this, rhoInterp, UInterp, nuInterp, alphaWInterp, pInterp, g.value());
    Cloud<solidParticle>::move(td, mesh_.time().deltaTValue());

// Inject

    this->inject(td, posP, dP, UP);
}
My solver is compiling successfully, but when I run it, this is what I get:

Code:
Evolving cloud
g: g [0 1 -2 0 0 0 0] (0 -9.81 0) posP: (0.00407471 0.00956261 -0.00510405) dP: 2 UP: (0 0 0)
Move function called
Inject function called
findCellFacePt starting
[1] #0  Foam::error::printStack(Foam::Ostream&)findCellFacePt ended
Adding a new particle
New particle added
Initial equilibrium radius
Finally add particle
Cloud size = 1
ExecutionTime = 314.7 s  ClockTime = 315 s

 in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #1  Foam::sigSegv::sigHandler(int) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #2  ? at sigaction.c:0
[1] #3  Foam::polyMeshTetDecomposition::cellTetIndices(Foam::polyMesh const&, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #4  Foam::cellPointWeight::findTetrahedron(Foam::polyMesh const&, Foam::Vector<double> const&, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so"
[1] #5  Foam::cellPointWeight::cellPointWeight(Foam::polyMesh const&, Foam::Vector<double> const&, long, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so"
[1] #6  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #7  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #8  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #9  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #10  __libc_start_main in "/lib64/libc.so.6"
[1] #11  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[cgscd000ggb3t92:38581] *** Process received signal ***
[cgscd000ggb3t92:38581] Signal: Segmentation fault (11)
[cgscd000ggb3t92:38581] Signal code:  (-6)
[cgscd000ggb3t92:38581] Failing at address: 0x11e7d000096b5
[cgscd000ggb3t92:38581] [ 0] /lib64/libc.so.6[0x3eb7c32510]
[cgscd000ggb3t92:38581] [ 1] /lib64/libc.so.6(gsignal+0x35)[0x3eb7c32495]
[cgscd000ggb3t92:38581] [ 2] /lib64/libc.so.6[0x3eb7c32510]
[cgscd000ggb3t92:38581] [ 3] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so(_ZN4Foam24polyMeshTetDecomposition14cellTetIndicesERKNS_8polyMeshEl+0x60)[0x7f5fb43689a0]
[cgscd000ggb3t92:38581] [ 4] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so(_ZN4Foam15cellPointWeight15findTetrahedronERKNS_8polyMeshERKNS_6VectorIdEEl+0x52)[0x7f5fb63a6052]
[cgscd000ggb3t92:38581] [ 5] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so(_ZN4Foam15cellPointWeightC2ERKNS_8polyMeshERKNS_6VectorIdEEll+0x89)[0x7f5fb63a77a9]
[cgscd000ggb3t92:38581] [ 6] VOF2LPT_basic_revised[0x4d7c0d]
[cgscd000ggb3t92:38581] [ 7] VOF2LPT_basic_revised[0x4e4204]
[cgscd000ggb3t92:38581] [ 8] VOF2LPT_basic_revised[0x4e622e]
[cgscd000ggb3t92:38581] [ 9] VOF2LPT_basic_revised[0x447e21]
[cgscd000ggb3t92:38581] [10] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3eb7c1ed1d]
[cgscd000ggb3t92:38581] [11] VOF2LPT_basic_revised[0x43a759]
[cgscd000ggb3t92:38581] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 1 with PID 38581 on node cgscd000ggb3t92 exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
So as you can see, the position, diameter, velocity etc. being supplied to the move and inject functions are correct. Also, the findCellFacePt is being called properly. I guess there is some problem in the implementation of findCellFacePt only.

Can anyone please help me out with this?
vishwesh is offline   Reply With Quote

Old   November 3, 2017, 03:31
Default
  #93
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9
vishwesh is on a distinguished road
Quote:
Originally Posted by vishwesh View Post
Hi!

Sorry for jumping in the discussion. I am also working on something similar based on Aurelia's work. I have modified the inject and move functions though.

Instead of reading the positions, diameter, and velocity of Bubbles from particleProperties, I send them from interFoam as follows:

Code:
        Info<< "Evolving cloud" << endl;
        Info<<"g: " << g << " posP: " << posP << " dP: " << dP << " UP: " << UP << endl;
        particles.move(g,posP,dP,UP);
        Info<< "Cloud size = " << particles.size() << endl;
Code:
// Inject Function:
void Foam::solidParticleCloud::inject(solidParticle::trackingData &td, vector posP, scalar dP, vector UP)
{
    Info<<"Inject function called"<<endl;
    label cellI=1;
    label tetFaceI=1;
    label tetPtI=1;

    Info<<"findCellFacePt starting"<<endl;
    mesh_.findCellFacePt(posP, cellI, tetFaceI, tetPtI);
    Info<<"findCellFacePt ended"<<endl;
    Info<<"Adding a new particle"<<endl;
    solidParticle* ptr1 = new solidParticle(mesh_, posP, cellI, tetFaceI, tetPtI, dP, UP);
    Info<<"New particle added"<<endl;
    Info<<"Initial equilibrium radius"<<endl;
    ptr1->initialEquilibriumRadius(td);
    Info<<"Finally add particle"<<endl;
    Cloud<solidParticle>::addParticle(ptr1);
}
Code:
void Foam::solidParticleCloud::move(const dimensionedVector& g, vector posP, scalar dP, vector UP)
{

    Info<<"Move function called"<<endl;
    const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
    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");

    interpolationCellPoint<scalar> rhoInterp(rho);
    interpolationCellPoint<vector> UInterp(U);
    interpolationCellPoint<scalar> nuInterp(nu);

    interpolationCell<scalar> alphaWInterp(alphaW);

    interpolationCellPoint<scalar> pInterp(p);

    smom_ = vector::zero;
    correctalphaW_=0;
    correctU_=vector::zero;

    solidParticle::trackingData
     td(*this, rhoInterp, UInterp, nuInterp, alphaWInterp, pInterp, g.value());
    Cloud<solidParticle>::move(td, mesh_.time().deltaTValue());

// Inject

    this->inject(td, posP, dP, UP);
}
My solver is compiling successfully, but when I run it, this is what I get:

Code:
Evolving cloud
g: g [0 1 -2 0 0 0 0] (0 -9.81 0) posP: (0.00407471 0.00956261 -0.00510405) dP: 2 UP: (0 0 0)
Move function called
Inject function called
findCellFacePt starting
[1] #0  Foam::error::printStack(Foam::Ostream&)findCellFacePt ended
Adding a new particle
New particle added
Initial equilibrium radius
Finally add particle
Cloud size = 1
ExecutionTime = 314.7 s  ClockTime = 315 s

 in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #1  Foam::sigSegv::sigHandler(int) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #2  ? at sigaction.c:0
[1] #3  Foam::polyMeshTetDecomposition::cellTetIndices(Foam::polyMesh const&, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #4  Foam::cellPointWeight::findTetrahedron(Foam::polyMesh const&, Foam::Vector<double> const&, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so"
[1] #5  Foam::cellPointWeight::cellPointWeight(Foam::polyMesh const&, Foam::Vector<double> const&, long, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so"
[1] #6  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #7  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #8  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #9  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #10  __libc_start_main in "/lib64/libc.so.6"
[1] #11  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[cgscd000ggb3t92:38581] *** Process received signal ***
[cgscd000ggb3t92:38581] Signal: Segmentation fault (11)
[cgscd000ggb3t92:38581] Signal code:  (-6)
[cgscd000ggb3t92:38581] Failing at address: 0x11e7d000096b5
[cgscd000ggb3t92:38581] [ 0] /lib64/libc.so.6[0x3eb7c32510]
[cgscd000ggb3t92:38581] [ 1] /lib64/libc.so.6(gsignal+0x35)[0x3eb7c32495]
[cgscd000ggb3t92:38581] [ 2] /lib64/libc.so.6[0x3eb7c32510]
[cgscd000ggb3t92:38581] [ 3] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so(_ZN4Foam24polyMeshTetDecomposition14cellTetIndicesERKNS_8polyMeshEl+0x60)[0x7f5fb43689a0]
[cgscd000ggb3t92:38581] [ 4] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so(_ZN4Foam15cellPointWeight15findTetrahedronERKNS_8polyMeshERKNS_6VectorIdEEl+0x52)[0x7f5fb63a6052]
[cgscd000ggb3t92:38581] [ 5] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so(_ZN4Foam15cellPointWeightC2ERKNS_8polyMeshERKNS_6VectorIdEEll+0x89)[0x7f5fb63a77a9]
[cgscd000ggb3t92:38581] [ 6] VOF2LPT_basic_revised[0x4d7c0d]
[cgscd000ggb3t92:38581] [ 7] VOF2LPT_basic_revised[0x4e4204]
[cgscd000ggb3t92:38581] [ 8] VOF2LPT_basic_revised[0x4e622e]
[cgscd000ggb3t92:38581] [ 9] VOF2LPT_basic_revised[0x447e21]
[cgscd000ggb3t92:38581] [10] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3eb7c1ed1d]
[cgscd000ggb3t92:38581] [11] VOF2LPT_basic_revised[0x43a759]
[cgscd000ggb3t92:38581] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 1 with PID 38581 on node cgscd000ggb3t92 exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
So as you can see, the position, diameter, velocity etc. being supplied to the move and inject functions are correct. Also, the findCellFacePt is being called properly. I guess there is some problem in the implementation of findCellFacePt only.

Can anyone please help me out with this?
I modified my code slightly:

Code:
/ Inject Function:
void Foam::solidParticleCloud::inject(solidParticle::trackingData &td, vector posP, scalar dP, vector UP)
{
    Info<<"Inject function called"<<endl;
    label cellI=1;
    label tetFaceI=1;
    label tetPtI=1;

    Info<<"findCellFacePt starting"<<endl;
    cellI = mesh_.findCell(posP);
    Info<<"cellI: "<<cellI<<endl;
    //mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI);
    mesh_.findCellFacePt(posP, cellI, tetFaceI, tetPtI);
    Info<<"findCellFacePt ended"<<endl;
    //solidParticle* ptr1 = new solidParticle(mesh_, td.cloud().posP1_, cellI,
    // tetFaceI, tetPtI,td.cloud().dP1_, td.cloud().UP1_);
    Info<<"Adding a new particle"<<endl;
    solidParticle* ptr1 = new solidParticle(mesh_, posP, cellI, tetFaceI, tetPtI, dP, UP);
    Info<<"New particle added"<<endl;
    Info<<"Initial equilibrium radius"<<endl;
    ptr1->initialEquilibriumRadius(td);
    Info<<"Finally add particle"<<endl;
    Cloud<solidParticle>::addParticle(ptr1);

/*    mesh_.findCellFacePt(td.cloud().posP2_, cellI, tetFaceI, tetPtI);
    solidParticle* ptr2 = new solidParticle(mesh_, td.cloud().posP2_, cellI,
     tetFaceI, tetPtI, td.cloud().dP2_, td.cloud().UP2_);
    ptr2->initialEquilibriumRadius(td);
    Cloud<solidParticle>::addParticle(ptr2);
*/
}
Here are the revised results:

Code:
Evolving cloud
g: g [0 1 -2 0 0 0 0] (0 -9.81 0) posP: (0.00407471 0.00956261 -0.00510405) dP: 2 UP: (0 0 0)
Move function called
Inject function called
findCellFacePt starting
cellI: 1028095
findCellFacePt ended
Adding a new particle
New particle added
Initial equilibrium radius
Finally add particle
Cloud size = 1
ExecutionTime = 309.6 s  ClockTime = 310 s

[1] #0  Foam::error::printStack(Foam::Ostream&) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #1  Foam::sigSegv::sigHandler(int) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #2  ? at sigaction.c:0
[1] #3  Foam::polyMeshTetDecomposition::cellTetIndices(Foam::polyMesh const&, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #4  Foam::cellPointWeight::findTetrahedron(Foam::polyMesh const&, Foam::Vector<double> const&, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so"
[1] #5  Foam::cellPointWeight::cellPointWeight(Foam::polyMesh const&, Foam::Vector<double> const&, long, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so"
[1] #6  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #7  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #8  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #9  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #10  __libc_start_main in "/lib64/libc.so.6"
[1] #11  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[cgscd000ggb3t92:40309] *** Process received signal ***
[cgscd000ggb3t92:40309] Signal: Segmentation fault (11)
[cgscd000ggb3t92:40309] Signal code:  (-6)
[cgscd000ggb3t92:40309] Failing at address: 0x11e7d00009d75
[cgscd000ggb3t92:40309] [ 0] /lib64/libc.so.6[0x3eb7c32510]
[cgscd000ggb3t92:40309] [ 1] /lib64/libc.so.6(gsignal+0x35)[0x3eb7c32495]
[cgscd000ggb3t92:40309] [ 2] /lib64/libc.so.6[0x3eb7c32510]
[cgscd000ggb3t92:40309] [ 3] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so(_ZN4Foam24polyMeshTetDecomposition14cellTetIndicesERKNS_8polyMeshEl+0x60)[0x7fc57b9379a0]
[cgscd000ggb3t92:40309] [ 4] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so(_ZN4Foam15cellPointWeight15findTetrahedronERKNS_8polyMeshERKNS_6VectorIdEEl+0x52)[0x7fc57d975052]
[cgscd000ggb3t92:40309] [ 5] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so(_ZN4Foam15cellPointWeightC2ERKNS_8polyMeshERKNS_6VectorIdEEll+0x89)[0x7fc57d9767a9]
[cgscd000ggb3t92:40309] [ 6] VOF2LPT_basic_revised[0x4d7c9d]
[cgscd000ggb3t92:40309] [ 7] VOF2LPT_basic_revised[0x4e42de]
[cgscd000ggb3t92:40309] [ 8] VOF2LPT_basic_revised[0x4e63ad]
[cgscd000ggb3t92:40309] [ 9] VOF2LPT_basic_revised[0x447eb1]
[cgscd000ggb3t92:40309] [10] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3eb7c1ed1d]
[cgscd000ggb3t92:40309] [11] VOF2LPT_basic_revised[0x43a7e9]
[cgscd000ggb3t92:40309] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 1 with PID 40309 on node cgscd000ggb3t92 exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
vishwesh is offline   Reply With Quote

Old   November 3, 2017, 03:45
Default
  #94
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
Hi,

could you quickly run checkMesh and provide the output?
vonboett is offline   Reply With Quote

Old   November 3, 2017, 03:56
Default
  #95
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9
vishwesh is on a distinguished road
Quote:
Originally Posted by vonboett View Post
Hi,

could you quickly run checkMesh and provide the output?
Hi!

Thanks for the quick reply. Here is the output of checkMesh:

Code:
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  3.0.x                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 3.0.x
Exec   : checkMesh
Date   : Nov 03 2017
Time   : 13:24:56
Host   : "cgscd000ggb3t92"
PID    : 3067
Case   : xxx/vishwesh/VOFLPT_solidParticleCloud/droplet2_testCase
nProcs : 1
sigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
    points:           8120601
    faces:            24120000
    internal faces:   23880000
    cells:            8000000
    faces per cell:   6
    boundary patches: 3
    point zones:      0
    face zones:       0
    cell zones:       0

Overall number of cells of each type:
    hexahedra:     8000000
    prisms:        0
    wedges:        0
    pyramids:      0
    tet wedges:    0
    tetrahedra:    0
    polyhedra:     0

Checking topology...
    Boundary definition OK.
    Cell to face addressing OK.
    Point usage OK.
    Upper triangular ordering OK.
    Face vertices OK.
    Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces...
    Patch               Faces    Points   Surface topology
    inlet               40000    40401    ok (non-closed singly connected)
    outlet              40000    40401    ok (non-closed singly connected)
    walls               160000   160800   ok (non-closed singly connected)

Checking geometry...
    Overall domain bounding box (0 0 -0.02) (0.02 0.02 0)
    Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
    Mesh has 3 solution (non-empty) directions (1 1 1)
    Boundary openness (-8.97191e-16 8.9719e-16 8.9719e-16) OK.
    Max cell openness = 1.65436e-16 OK.
    Max aspect ratio = 1 OK.
    Minimum face area = 1e-08. Maximum face area = 1e-08.  Face area magnitudes OK.
    Min volume = 1e-12. Max volume = 1e-12.  Total volume = 8e-06.  Cell volumes OK.
    Mesh non-orthogonality Max: 0 average: 0
    Non-orthogonality check OK.
    Face pyramids OK.
    Max skewness = 2.77556e-13 OK.
    Coupled point location match (average 0) OK.

Mesh OK.
vishwesh is offline   Reply With Quote

Old   November 3, 2017, 04:31
Default
  #96
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9
vishwesh is on a distinguished road
I am not sure what's happening but I tried adding multiple Info statements in the code trying to find out where exactly the error is occurring.

Code:

interFoam:

Code:
Info<< "Evolving cloud" << endl;
//        Info<<
        Info<<"g: " << g << " posP: " << posP << " dP: " << dP << " UP: " << UP << endl;
        particles.move(g,posP,dP,UP);
        Info<< "Cloud size = " << particles.size() << endl;

        Info<< "TEST\nTEST\nTEST\nTEST\nTEST\nTEST" << endl;

        particles.checkCo(); // 4-way coupling
        alpha1 += particles.AddToAlpha(); // LPT to VOF
        U += particles.AddToU();  // LPT to VOF

        runTime.write();

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
Code:
// Inject Function:
void Foam::solidParticleCloud::inject(solidParticle::trackingData &td, vector posP, scalar dP, vector UP)
{
    Info<<"Inject function called"<<endl;
    label cellI=1;
    label tetFaceI=1;
    label tetPtI=1;

    Info<<"findCellFacePt starting"<<endl;
    cellI = mesh_.findCell(posP);
    Info<<"cellI: "<<cellI<<endl;
    //mesh_.findCellFacePt(td.cloud().posP1_, cellI, tetFaceI, tetPtI);
    mesh_.findCellFacePt(posP, cellI, tetFaceI, tetPtI);
    Info<<"findCellFacePt ended"<<endl;
    //solidParticle* ptr1 = new solidParticle(mesh_, td.cloud().posP1_, cellI,
    // tetFaceI, tetPtI,td.cloud().dP1_, td.cloud().UP1_);
    Info<<"Adding a new particle"<<endl;
    solidParticle* ptr1 = new solidParticle(mesh_, posP, cellI, tetFaceI, tetPtI, dP, UP);
    Info<<"New particle added"<<endl;
    Info<<"Initial equilibrium radius"<<endl;
    ptr1->initialEquilibriumRadius(td);
    Info<<"Finally add particle"<<endl;
    Cloud<solidParticle>::addParticle(ptr1);
}

void Foam::solidParticleCloud::move(const dimensionedVector& g, vector posP, scalar dP, vector UP)
{

    Info<<"Move function called"<<endl;
    const volScalarField& rho = mesh_.lookupObject<const volScalarField>("rho");
    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");

    interpolationCellPoint<scalar> rhoInterp(rho);
    interpolationCellPoint<vector> UInterp(U);
    interpolationCellPoint<scalar> nuInterp(nu);

    interpolationCell<scalar> alphaWInterp(alphaW);

    interpolationCellPoint<scalar> pInterp(p);

    smom_ = vector::zero;
    correctalphaW_=0;
    correctU_=vector::zero;

    solidParticle::trackingData
     td(*this, rhoInterp, UInterp, nuInterp, alphaWInterp, pInterp, g.value());
    Cloud<solidParticle>::move(td, mesh_.time().deltaTValue());
// Inject

    /*if(mesh_.time().value()> td.cloud().tInjStart_ &&
     mesh_.time().value()< td.cloud().tInjEnd_)
    {*/

    this->inject(td, posP, dP, UP);
    Info<<"Back from inject"<<endl;
}
Result:

Code:
Evolving cloud
g: g [0 1 -2 0 0 0 0] (0 -9.81 0) posP: (0.00407471 0.00956261 -0.00510405) dP: 2 UP: (0 0 0)
Move function called
Inject function called
findCellFacePt starting
cellI: 1028095
findCellFacePt ended
Adding a new particle
New particle added
Initial equilibrium radius
Finally add particle
Back from inject
Cloud size = 1
TEST
TEST
TEST
TEST
TEST
TEST
[1] #0  Foam::error::printStack(Foam::Ostream&)ExecutionTime = 306.32 s  ClockTime = 307 s

 in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #1  Foam::sigSegv::sigHandler(int) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #2  ? at sigaction.c:0
[1] #3  Foam::polyMeshTetDecomposition::cellTetIndices(Foam::polyMesh const&, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so"
[1] #4  Foam::cellPointWeight::findTetrahedron(Foam::polyMesh const&, Foam::Vector<double> const&, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so"
[1] #5  Foam::cellPointWeight::cellPointWeight(Foam::polyMesh const&, Foam::Vector<double> const&, long, long) in "/share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so"
[1] #6  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #7  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #8  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #9  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[1] #10  __libc_start_main in "/lib64/libc.so.6"
[1] #11  ? in "/home/vshrima/OpenFOAM/vshrima-3.0.x/platforms/linux64GccDPInt64Opt/bin/VOF2LPT_basic_revised"
[cgscd000ggb3t92:04868] *** Process received signal ***
[cgscd000ggb3t92:04868] Signal: Segmentation fault (11)
[cgscd000ggb3t92:04868] Signal code:  (-6)
[cgscd000ggb3t92:04868] Failing at address: 0x11e7d00001304
[cgscd000ggb3t92:04868] [ 0] /lib64/libc.so.6[0x3eb7c32510]
[cgscd000ggb3t92:04868] [ 1] /lib64/libc.so.6(gsignal+0x35)[0x3eb7c32495]
[cgscd000ggb3t92:04868] [ 2] /lib64/libc.so.6[0x3eb7c32510]
[cgscd000ggb3t92:04868] [ 3] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libOpenFOAM.so(_ZN4Foam24polyMeshTetDecomposition14cellTetIndicesERKNS_8polyMeshEl+0x60)[0x7f98cb2ae9a0]
[cgscd000ggb3t92:04868] [ 4] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so(_ZN4Foam15cellPointWeight15findTetrahedronERKNS_8polyMeshERKNS_6VectorIdEEl+0x52)[0x7f98cd2ec052]
[cgscd000ggb3t92:04868] [ 5] /share/OpenFOAM/OpenFOAM-3.0.x/platforms/linux64GccDPInt64Opt/lib/libfiniteVolume.so(_ZN4Foam15cellPointWeightC2ERKNS_8polyMeshERKNS_6VectorIdEEll+0x89)[0x7f98cd2ed7a9]
[cgscd000ggb3t92:04868] [ 6] VOF2LPT_basic_revised[0x4d89dd]
[cgscd000ggb3t92:04868] [ 7] VOF2LPT_basic_revised[0x4e501e]
[cgscd000ggb3t92:04868] [ 8] VOF2LPT_basic_revised[0x4e6cbe]
[cgscd000ggb3t92:04868] [ 9] VOF2LPT_basic_revised[0x447f61]
[cgscd000ggb3t92:04868] [10] /lib64/libc.so.6(__libc_start_main+0xfd)[0x3eb7c1ed1d]
[cgscd000ggb3t92:04868] [11] VOF2LPT_basic_revised[0x43a899]
[cgscd000ggb3t92:04868] *** End of error message ***
--------------------------------------------------------------------------
mpirun noticed that process rank 1 with PID 4868 on node cgscd000ggb3t92 exited on signal 11 (Segmentation fault).
--------------------------------------------------------------------------
vishwesh is offline   Reply With Quote

Old   November 3, 2017, 04:50
Default
  #97
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
maybe your code expects a tetMesh, but you have hexahedral cells...
vonboett is offline   Reply With Quote

Old   November 3, 2017, 04:50
Default
  #98
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9
vishwesh is on a distinguished road
Quote:
Originally Posted by vonboett View Post
maybe your code expects a tetMesh, but you have hexahedral cells...
Possible... Any clue how I can resolve this?
vishwesh is offline   Reply With Quote

Old   November 3, 2017, 04:56
Default
  #99
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9
vishwesh is on a distinguished road
Quote:
Originally Posted by vonboett View Post
maybe your code expects a tetMesh, but you have hexahedral cells...
I guess I will have to remesh my problem using tetWedge in blockMesh instead of hex?

Is there any other way I can change findFaceCellPt instead of remeshing the complete problem?
vishwesh is offline   Reply With Quote

Old   November 3, 2017, 05:00
Default
  #100
Member
 
Vishwesh Ravi Shrimali
Join Date: Aug 2017
Posts: 43
Rep Power: 9
vishwesh is on a distinguished road
Quote:
Originally Posted by vonboett View Post
maybe your code expects a tetMesh, but you have hexahedral cells...
You are correct. I checked the documentation and it appears that it takes a tet mesh... I am seriously surprised there is nothing for hexMesh...
vishwesh is offline   Reply With Quote

Reply

Tags
interfoam, lagrangian, move, solidparticle


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 04:27.