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

Multiphase Solid Particle Tracking

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

Like Tree1Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   April 24, 2014, 07:11
Default
  #21
New Member
 
alexlupo's Avatar
 
Alejandro López
Join Date: Mar 2013
Location: Glasgow
Posts: 11
Rep Power: 4
alexlupo is on a distinguished road
Quote:
Originally Posted by Mahdi2010 View Post
Please tell us more about your problem.
Hi houwy,
There are actually a few things in your code that dont look ok.
First of all, it looks like you have tetFac eI instead of tetFaceI.
The error shown by openFoam is letting you know that solidParticle needs a mesh, so instead of
Code:
solidParticle* pPtr2=new solidParticle(*this,td.cloud().posP2_,cellI,tetFaceI, tetPtI,td.cloud().dP2_,td.cloud().UP2_);
try
Code:
solidParticle* pPtr2=new solidParticle(mesh_,td.cloud().posP2_,cellI,tetFaceI,tetPtI,td.cloud().dP1_,td.cloud().UP2_);
Hope it helps.

Regards,
Alex
__________________
Alex
alexlupo is offline   Reply With Quote

Old   April 24, 2014, 07:25
Default
  #22
New Member
 
houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 3
houwy is on a distinguished road
Quote:
Originally Posted by alexlupo View Post
Hi houwy,
There are actually a few things in your code that dont look ok.
First of all, it looks like you have tetFac eI instead of tetFaceI.
The error shown by openFoam is letting you know that solidParticle needs a mesh, so instead of
Code:
solidParticle* pPtr2=new solidParticle(*this,td.cloud().posP2_,cellI,tetFaceI, tetPtI,td.cloud().dP2_,td.cloud().UP2_);
try
Code:
solidParticle* pPtr2=new solidParticle(mesh_,td.cloud().posP2_,cellI,tetFaceI,tetPtI,td.cloud().dP1_,td.cloud().UP2_);
Hope it helps.

Regards,
Alex
Hi! Alex.
Thank you very much! It works.
houwy is offline   Reply With Quote

Old   September 16, 2014, 06:10
Default Seeding the Domain with Particles - Corrupt double-linked list error
  #23
New Member
 
Will
Join Date: Dec 2011
Posts: 15
Rep Power: 5
willzyba is on a distinguished road
Hi,

Can anyone help me to understand why this following does not work. We essentially followed the instructions in http://www.tfd.chalmers.se/~hani/kur...LPT_120911.pdf

except that we want to initiate the domain with a cloud of points evenly space throughout a chosen part. We've added to solidParticleCloud.C the following:

Code:
void Foam::solidParticleCloud::seed(const dimensionedVector& g)
{
    // http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2011/OF_kurs_LPT_120911.pdf

    const vector offset((endCorner_.x() - startCorner_.x())/(nPoints_.x() - 1),
                        (endCorner_.y() - startCorner_.y())/(nPoints_.y() - 1),
                        (endCorner_.z() - startCorner_.z())/(nPoints_.z() - 1) );
  
    int Nz= int(nPoints_.z());
    int Ny= int(nPoints_.y());
    int Nx= int(nPoints_.x());

    // Hope this produces a line of particle points.
    for(int k=0; k<Nz; k++)
    {
        for(int j=0; j<Ny; j++)
        {
            for(int i=0; i<Nx; i++)
            { 
                vector pos(startCorner_.x() + offset.x()*i,
                           startCorner_.y() + offset.y()*j,
                           startCorner_.z() + offset.z()*k );

                label cellI =-1;
                label tetFaceI =-1;
                label tetPtI = -1;
                mesh_.findCellFacePt(pos, cellI, tetFaceI, tetPtI);
                if(cellI>0)
                {
                    solidParticle* pt= new solidParticle(mesh_, pos ,cellI, tetFaceI, tetPtI, 0.01, vector::zero );
                    Cloud<solidParticle>::addParticle(pt);
                }
            }
        }
    }
}
We then add to our main IcoFoam package the necessary headers and
Code:
solidParticleCloud particles(mesh);
particles.seed(g);
Ignoring the ugly vector maths, this works. I get a great cloud of point, the CFD runs through to the end. However on both a single thread and multi threaded environment I get the following on exit
Code:
*** glibc detected *** waveFoamLPT: corrupted double-linked list: 0x0000000000c02a50 ***
Google around this, it appear that the most likely offender is that our newly created particles are being deleted twice when the code cleans up at the end. I had though it might not be being cleaned at all, so we did add our own code to delete, but that didn't help.

Any thoughts greatly appreciated.

Will
willzyba is offline   Reply With Quote

Old   November 4, 2014, 09:17
Default interFoam: lagrangian particle tracking method by swak4Foam
  #24
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 178
Rep Power: 6
vonboett is on a distinguished road
Quote:
Originally Posted by nero235 View Post
Hello Alex,

thank you for your help! I will try this as soon I have some time for it . However I found another way to couple interfoam with a lagrangian particle tracking method, which is by including swak4Foam libraries into your controlDict.

Thanks for the help!

Greetings, Sebastian

Hi Sebastian,

did that work well? Could you share some experience about coupling lagrangian particle tracking using swak4Foam? I used to run coupling via CFDEM to LIGGGHTS, but now I want to model a tracer injected to my turbulent interFoam simulation, and therefore I need only a one-way coupling and thaught, swak4Foam would be the solution. I tried aswell interMixingFoam but thats not a good solution for many reasons...
vonboett is offline   Reply With Quote

Old   November 4, 2014, 10:52
Default
  #25
New Member
 
Sebastian W.
Join Date: Nov 2012
Location: Saxony, Germany
Posts: 28
Rep Power: 4
nero235 is on a distinguished road
Send a message via ICQ to nero235
Quote:
Originally Posted by vonboett View Post
Hi Sebastian,

did that work well? Could you share some experience about coupling lagrangian particle tracking using swak4Foam? I used to run coupling via CFDEM to LIGGGHTS, but now I want to model a tracer injected to my turbulent interFoam simulation, and therefore I need only a one-way coupling and thaught, swak4Foam would be the solution. I tried aswell interMixingFoam but thats not a good solution for many reasons...
Hello Albrecht,

yes the solid particle tracking worked really good with interFoam. At first I encountered a problem however: the particle wasn't affected by gravity in swak4Foam 0.2.4 but there's a fix for that (see the other threats about LPT on my page).

What you need is a swak4Foam installation and a modified controlDict where you add these following lines:

Code:
libs
(
    "libsimpleFunctionObjects.so"
    "libsimpleLagrangianFunctionObjects.so"
    "libswakLagrangianCloudSourcesFunctionPlugin.so"
    "libswakFunctionObjects.so"
);

functions
{
    rho
    {
        type expressionField;
        expression "1000";
        fieldName rho;
        autowrite true;
    }
    mu
    {
        type expressionField;
        expression "(1e-6)*rho";
        fieldName mu;
        autowrite true;
    }
    Particle
    {
        type evolveKinematicCloud;
        cloudName ParticleCloud;
        //only necessary if solver doesn't consider gravity
        //g "down" [0 1 -2 0 0 0 0] (0 0 -9.81);
        rhoName rho;
        muName mu;
        UName U;
    }
}
And you need the file
Code:
./constant/ParticleCloudProperties
with the following contents:

Code:
solution
{
    active        on;
    coupled        false;
    transient    true;
    cellValueSourceCorrection    on;

    interpolationSchemes
    {
        rho    cell;
        mu    cell;
        U    cellPoint;
    }

    sourceTerms
    {
        schemes
        {
            rho    explicit 1;
            U    explicit 1;
        }
    }

    integrationSchemes
    {
        U    Euler;
    }
}

constantProperties
{
    parcelTypeId     1;
    rhoMin           1e-15;
    minParticleMass  1e-15;
    rho0             750;
    epsilon0         10;
    Pr               0.7;
    pMin             0;
    constantVolume   1;
    youngsModulus    1e9;
    poissonsRatio    0.35;
}

subModels
{
    particleForces
    {
        gravity;
        sphereDrag;
    }

    injectionModels
    {
        model1
        {
            type            manualInjection;
            massTotal       0.3927e-3;
            parcelBasisType mass;
            nParticle       1;
            SOI             0;
            positionsFile   "tracerParticlePositions";
            U0              (0 0 0);
            sizeDistribution
            {
                type        fixedValue;
                fixedValueDistribution
                {
                    //diameter
                    value   1e-2;
                }
            }
        }
    }

    dispersionModel none;
    patchInteractionModel standardWallInteraction;
    heatTransferModel none;
    radiation off;
    surfaceFilmModel none;

    standardWallInteractionCoeffs
    {
        type    stick;
    }
}

cloudFunctions
{
    particleTracks
    {
        trackInterval   1;
        maxSamples      1000000;
        resetOnWrite    yes;
    }
}
Depending on your injection model (here it was manual injection) you may need a file where the initial positions of you particles are listed. Hope this helps!

Regards, Sebastian
vonboett likes this.
nero235 is offline   Reply With Quote

Old   November 4, 2014, 15:51
Default
  #26
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 178
Rep Power: 6
vonboett is on a distinguished road
That is really quick and precise help, thank you!
It really helps because I can get things started so fast I can present them on the startup-meeting this week!
vonboett is offline   Reply With Quote

Old   January 11, 2015, 07:20
Default
  #27
Member
 
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 4
sophie_l is on a distinguished road
Hello,

I'm working on the coupling of interFoam and solidParticle as well. The solver works well in serial. It runs in parallel as well, and the fluid phase behaves, however, the results of the solid phase are not reasonable, let alone resemble those produced in serial run. So there must be something wrong with the parallelisation of solidParticle, it runs without error message though. I checked the output, origId of the particles are all -1 at every time step. I suspect this might be the reason, however I didn't manage to get origId right, let alone to know whether this is the reason to the problem. Could you shed some light on this please? Any thoughts would be much appreciated!

Thanks in advance.
Sophie
sophie_l is offline   Reply With Quote

Old   February 5, 2015, 21:33
Default
  #28
Member
 
luchen
Join Date: Jul 2011
Posts: 42
Rep Power: 6
luchen2408 is on a distinguished road
hello, sebastian,
what is the sequence of running command? is it that first run the simulation with interFoam then modify the file and go on performing the simulation after some time to add the particles
or just perform the simulation with the new controldict file to add the particles at the start? Thanks
luchen2408 is offline   Reply With Quote

Old   February 6, 2015, 04:29
Default
  #29
New Member
 
Sebastian W.
Join Date: Nov 2012
Location: Saxony, Germany
Posts: 28
Rep Power: 4
nero235 is on a distinguished road
Send a message via ICQ to nero235
Quote:
Originally Posted by luchen2408 View Post
hello, sebastian,
what is the sequence of running command? is it that first run the simulation with interFoam then modify the file and go on performing the simulation after some time to add the particles
or just perform the simulation with the new controldict file to add the particles at the start? Thanks
Hello luchen2408,

you just run interFoam like always, just make sure you have a working swak4Foam installation. The coupled lagrangian particle libraries will do the rest. Depending on your injection model, the particles will be injected through the inlet or will be inserted into the field manually (automatic injection by the libraries) after some time. You will see that in the solver log, which will differ from a normal interFoam run.

Depending on the coupling (1-way, 2-way) the velocity field will be calculated by interFoam and then the particle path will be estimated through the libraries. After this step the new velocity field will be calculated (1-way) or the last fluid velocity field will be recalculated (2-way).

Regards, Sebastian
nero235 is offline   Reply With Quote

Old   May 28, 2015, 03:48
Default
  #30
Member
 
luchen
Join Date: Jul 2011
Posts: 42
Rep Power: 6
luchen2408 is on a distinguished road
hello, sebastian,
I have successfully performed the simulation with particles, but the result looks unreasonable, I set the wall as "stick" boundary, but the from the result, the particle will not stick to the wall and it will flow in the domain. Do you have the problem? Besides, I found the gravity seems didn't act on the particles. what about your result?
luchen2408 is offline   Reply With Quote

Old   May 28, 2015, 04:01
Default
  #31
New Member
 
Sebastian W.
Join Date: Nov 2012
Location: Saxony, Germany
Posts: 28
Rep Power: 4
nero235 is on a distinguished road
Send a message via ICQ to nero235
Quote:
Originally Posted by luchen2408 View Post
hello, sebastian,
I have successfully performed the simulation with particles, but the result looks unreasonable, I set the wall as "stick" boundary, but the from the result, the particle will not stick to the wall and it will flow in the domain. Do you have the problem?
Hi,

maybe your particle is not really at the wall for the boundary condition to apply. Since the LPT model treats every particle as "mass point", forces only act on the center of the particle. If the particle center is away from the wall, and only the virtual particle surface touches the wall, the stick boundary condition won't apply. So, you really have to be at the wall with the center point of your particle.

Hope this helps. Regards, Sebastian
nero235 is offline   Reply With Quote

Old   May 28, 2015, 21:47
Default
  #32
Member
 
luchen
Join Date: Jul 2011
Posts: 42
Rep Power: 6
luchen2408 is on a distinguished road
hi,sebastian,
Thanks for your reply. Then what can I do to solve the problem?
Besides, I think the gravity seems doesn't act on the particles.
For understanding the problem better, I will introduce the problem and post my initial file.
For the test simulation, I took state solver simpleFoam and introduce the liquid particles after 50 iterations.
The particlecloudpropeties as follows:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object ParticleCloudProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solution
{
active yes;
transient no; // yes;
calcFrequency 50;
maxTrackTime 3600;
// maxCo 0.3;

coupled false;
cellValueSourceCorrection off;

sourceTerms
{

schemes
{
rho semiImplicit 1;
U semiImplicit 1;
}
}

interpolationSchemes
{
rho cell;
U cellPoint;
mu cell;

}

integrationSchemes
{
U Euler;
}
}


constantProperties
{
rho0 735;
mu0 0.000774;

constantVolume true;
}


subModels
{
particleForces
{
sphereDrag;
gravity;
}

injectionModels
{
model1
{
type patchInjection;
massFlowRate 0.8e-03;
parcelBasisType mass;
patchName InletN1B;
parcelsPerSecond 100;
duration 1; // NOTE: set to 1 for steady state
U0 (0 0 -22.99);
flowRateProfile constant 1;
sizeDistribution
{
type fixedValue;
fixedValueDistribution
{
value 0.0001;
}
}
}

}

dispersionModel none;

// patchInteractionModel standardWallInteraction;
patchInteractionModel localInteraction;

heatTransferModel RanzMarshall;

compositionModel none;

phaseChangeModel none;

devolatilisationModel none;

surfaceReactionModel none;

stochasticCollisionModel none;

surfaceFilmModel none;

radiation off;

// standardWallInteractionCoeffs
// {
// type rebound;
// }

localInteractionCoeffs
{
patches
(
InletN1B
{
type rebound;
// e 0.97;
// mu 0.09;
}
InletN1Bwall
{
type rebound;
// e 0.97;
// mu 0.09;
}
Walls
{
type stick;
}
Outlet
{
type escape;
}
);
}

RanzMarshallCoeffs
{
BirdCorrection off;
}

}


cloudFunctions
{
patchPostProcessing1
{
type patchPostProcessing;
maxStoredParcels 100;
patches ( Outlet );
}

particleTracks1
{
type particleTracks;
trackInterval 5;
maxSamples 1000000;
resetOnWrite yes;
}
}


// ************************************************** *********************** //

The controlDict as follows:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application simpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 1000;

deltaT 1;

writeControl timeStep;

writeInterval 500;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

functions
{
InletN1B
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
log true;
valueOutput false;
source patch;
sourceName InletN1B;
operation sum;
// weightField alpha.air;
fields
(
phi
);
}
Outletair
{
type faceSource;
functionObjectLibs ("libfieldFunctionObjects.so");
enabled true;
outputControl timeStep;
outputInterval 1;
log true;
valueOutput false;
source patch;
sourceName Outlet;
operation sum;
// weightField alpha.air;
fields
(
phi
);
}

}

libs
(
"libsimpleFunctionObjects.so"
"libsimpleLagrangianFunctionObjects.so"
"libswakLagrangianCloudSourcesFunctionPlugin.s o"
"libswakFunctionObjects.so"
);

functions
{
rho
{
type expressionField;
dimension [1 -3 0 0 0 0 0];
expression "735";
fieldName rho;
autowrite true;
}
mu
{
type expressionField;
dimension [1 -3 0 0 0 0 0];
expression "0.000774";
fieldName mu;
autowrite true;
}
Particle
{
type evolveKinematicCloud;
cloudName ParticleCloud;
//only necessary if solver doesn't consider gravity
g "down" [0 1 -2 0 0 0 0] (0 0 -9.81);
rhoName rho;
muName mu;
UName U;
}
}


// ************************************************** *********************** //

so, I found all the particles will be introduced into the domain, and they seems don't have gravity and they will not stick to the wall. Do you konw the reason? and how can I solve the problem. Thanks

luchen2408 is offline   Reply With Quote

Old   June 4, 2015, 21:04
Default
  #33
Member
 
luchen
Join Date: Jul 2011
Posts: 42
Rep Power: 6
luchen2408 is on a distinguished road
hello, sebasetian,
do you know the different of the evolvesolidparticleCloud and evolveKinematicCloud in swak4foam? I think they have differet constantproperties in the partilesproperties file.
luchen2408 is offline   Reply With Quote

Old   June 5, 2015, 03:34
Default
  #34
New Member
 
Sebastian W.
Join Date: Nov 2012
Location: Saxony, Germany
Posts: 28
Rep Power: 4
nero235 is on a distinguished road
Send a message via ICQ to nero235
Quote:
Originally Posted by luchen2408 View Post
hello, sebasetian,
do you know the different of the evolvesolidparticleCloud and evolveKinematicCloud in swak4foam? I think they have differet constantproperties in the partilesproperties file.
Hello,

I suggest you compare the appropriate files in
Code:
./swak4Foam/Libraries/simpleLagrangianFunctionObjects/
to find out the differences between the different could types.

Regards, Sebastian
nero235 is offline   Reply With Quote

Reply

Tags
interfoam, lagrangian, move, solidparticle

Thread Tools
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 On
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 0 April 3, 2012 07:08
Questions regarding Particle Tracking and Rotating Frame of reference Maxime Gauthier CFX 1 May 9, 2011 15:07
DPM UDF particle position using the macro P_POS(p)[i] dm2747 FLUENT 0 April 17, 2009 01: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 19:26


All times are GMT -4. The time now is 22:23.