|
[Sponsors] |
April 24, 2014, 08:11 |
|
#21 |
New Member
Alejandro López
Join Date: Mar 2013
Location: Bilbao
Posts: 16
Rep Power: 13 |
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_); Code:
solidParticle* pPtr2=new solidParticle(mesh_,td.cloud().posP2_,cellI,tetFaceI,tetPtI,td.cloud().dP1_,td.cloud().UP2_); Regards, Alex
__________________
Alex |
|
April 24, 2014, 08:25 |
|
#22 | |
New Member
houwy
Join Date: Nov 2013
Posts: 21
Rep Power: 13 |
Quote:
Thank you very much! It works. |
||
September 16, 2014, 07:10 |
Seeding the Domain with Particles - Corrupt double-linked list error
|
#23 |
New Member
Will
Join Date: Dec 2011
Posts: 17
Rep Power: 14 |
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); } } } } } Code:
solidParticleCloud particles(mesh); particles.seed(g); Code:
*** glibc detected *** waveFoamLPT: corrupted double-linked list: 0x0000000000c02a50 *** Any thoughts greatly appreciated. Will |
|
November 4, 2014, 09:17 |
interFoam: lagrangian particle tracking method by swak4Foam
|
#24 | |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
Quote:
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... |
||
November 4, 2014, 10:52 |
|
#25 | |
Member
|
Quote:
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; } } Code:
./constant/ParticleCloudProperties 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; } } Regards, Sebastian |
||
November 4, 2014, 15:51 |
|
#26 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
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! |
|
January 11, 2015, 07:20 |
|
#27 |
Member
Join Date: Nov 2012
Location: Liverpool, UK
Posts: 51
Rep Power: 14 |
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 |
|
February 5, 2015, 21:33 |
|
#28 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
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 |
|
February 6, 2015, 04:29 |
|
#29 | |
Member
|
Quote:
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 |
||
May 28, 2015, 04:48 |
|
#30 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
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? |
|
May 28, 2015, 05:01 |
|
#31 | |
Member
|
Quote:
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 |
||
May 28, 2015, 22:47 |
|
#32 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
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 |
|
June 4, 2015, 22:04 |
|
#33 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
hello, sebasetian,
do you know the different of the evolvesolidparticleCloud and evolveKinematicCloud in swak4foam? I think they have differet constantproperties in the partilesproperties file. |
|
June 5, 2015, 04:34 |
|
#34 | |
Member
|
Quote:
I suggest you compare the appropriate files in Code:
./swak4Foam/Libraries/simpleLagrangianFunctionObjects/ Regards, Sebastian |
||
August 10, 2015, 07:46 |
|
#35 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
OK, to have more possibilities to control the IO of the particles (write out particle positions in higher frequency than the fluid Fields) I implemented kinematicCloud and particleCloud in pimpleFoam based on icoUncoupledKinematicParcelFoam and checked with swack4foam that it gives the same results in parallel.
However, now trying the two-way coupling with interFoam according to http://www.tfd.chalmers.se/~hani/kur...LPT_120911.pdf I run into the same troubles. Is there someone still working with interFoam & solidParticles willing to help? |
|
August 10, 2015, 08:13 |
|
#36 |
Member
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14 |
What exactly is your problem while coupling interFoam and solidParticles?
|
|
August 11, 2015, 06:20 |
|
#37 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
Dear Mahdi,
when I include the line +particles.momentumSource() in the UEqn.H, for example in the momentum predictor, it causes either overflow in solidParticleCloudI.H in solidParticleCloud::momentumSource() at: tsource().internalField() = -smom_/(mesh_.time().deltaT().value()*mesh_.V()); or if I limit that with min() and max() functions, I still get an Foam::sigSegv::sigHandler(int) error in UEqn.H Whithout two-way coupling it looks OK but that I can do better with particleCloud or kinematicCloud anyway. I am happy for any hint... |
|
August 11, 2015, 06:26 |
|
#38 | |
Member
Mahdi
Join Date: Jul 2012
Posts: 53
Rep Power: 14 |
Quote:
I guess it might be due to very small dt times dx in the denominator of momentum source resulting very large values. |
||
August 11, 2015, 06:46 |
|
#39 |
Senior Member
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17 |
OK I am one step further:
The overflow was caused by competing names for rhoInf and rho, changing volScalarField rhoInf ( IOobject ( "rho", to IOobject ( "rhoInf", solved that. But now I have a temporary deallocation error solving UEqn.H, which seems to raise from a difference in treating boundary conditions in OF2.3 Last edited by vonboett; August 11, 2015 at 08:35. |
|
September 28, 2015, 12:50 |
|
#40 |
New Member
novo
Join Date: Jun 2015
Posts: 11
Rep Power: 11 |
I hope this thread is still under active visiting and guess many of you have successfully coupled particle flow in interFoam. However, I am interested in coupling of the solidParticle, as described by the tutorial by Ms. Vallier (here and here), using icoFoam for cases of incompressible laminar flow. When I try to compile I get :
Code:
icoFoam.C: In function ‘int main(int, char**)’: icoFoam.C:112:18: error: ‘g’ was not declared in this scope particles.move(g); Thank you |
|
Tags |
interfoam, lagrangian, move, solidparticle |
|
|
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 |