|
[Sponsors] |
[swak4Foam] Validation of swak4Foam for lagrangian particle tracking |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 20, 2013, 08:38 |
Validation of swak4Foam for lagrangian particle tracking
|
#1 |
Member
|
Hello,
I am simulating several different multiphase flow regimes, consisting of 3 phases with multiphaseInterFoam. Additionally I need to inject a particle (not massless) to the flow and track it as it moves. I found that this can be done using swak4Foam libraries to add LPT (lagrangian particle tracking) methods to any solver. I set up several test cases, combining interFoam and swak4Foam with success. However I need to validate this method in order to know if the calculated particle trajectory is physically correct. For this I have set up a 3D test case of a rectangular domain filled with air. A particle will be injected at the bottom of the domain with an initial velocity (in x and z-direction). Gravity is acting in negative z-direction. I am using interFoam for the calculation of the continuous phase and swak4Foam for the uncoupled particle tracking. The result of this simulation should be a parabolic particle trajectory. However it seems that there is no gravity acting on the particle. Therefor the particle trajectory is linear. I have uploaded my validation case in the hope somebody can tell me why the gravity is not considered here. Thanks in advance! Sebastian |
|
September 20, 2013, 09:42 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Anyway: when moving through the fluid the viscosity should also slow down the particle so it should at least come to a stand-still (especially with the high viscosities you usually have in interFoam)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
September 20, 2013, 09:57 |
|
#3 | |
Member
|
Quote:
Here is my particleCloudProperties file: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.7.1 | | \\ / A nd | Web: www.OpenFOAM.com | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object thermoCloud1Properties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solution { active on; coupled false; transient true; cellValueSourceCorrection on; interpolationSchemes { rho cell; mu cell; U cellPoint; // DUcDt cellPoint; } sourceTerms { schemes { rho explicit 1; U explicit 1; } } integrationSchemes { U Euler; } } constantProperties { parcelTypeId 1; rhoMin 1; minParticleMass 5.23e-10; rho0 2000; epsilon0 10; Pr 0.7; pMin 1; constantVolume true; youngsModulus 1e9; poissonsRatio 0.35; } subModels { particleForces { gravity; sphereDrag; // pressureGradient // { // U U; // } //virtualMass off; } injectionModels { model1 { type manualInjection; massTotal 1.05e-6; parcelBasisType mass; nParticle 1; SOI 0; //Start Of Injection positionsFile "tracerParticlePositions"; U0 (0.1 0 0.1); //the calculated 'linear momentum' is p=m*v sizeDistribution { type fixedValue; fixedValueDistribution { value 1e-3; } } } } dispersionModel none; patchInteractionModel standardWallInteraction; heatTransferModel none; radiation off; standardWallInteractionCoeffs { type rebound; mu 0; } surfaceFilmModel none; } cloudFunctions { particleTracks { trackInterval 1; maxSamples 1000000; resetOnWrite yes; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application interFoam; startFrom startTime; startTime 0; stopAt endTime; endTime 20; deltaT 0.005; writeControl adjustableRunTime; writeInterval 20; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep no; maxCo 1; maxAlphaCo 1; maxDeltaT 0.005; libs ( "libsimpleFunctionObjects.so" "libsimpleLagrangianFunctionObjects.so" "libswakLagrangianCloudSourcesFunctionPlugin.so" "libswakFunctionObjects.so" ); functions { mu { type expressionField; expression "1.7894e-5"; fieldName mu; autowrite true; } Particle { type evolveKinematicCloud; cloudName ParticleCloud; g "down" [0 1 -2 0 0 0 0] (0 0 -9.81 ); rhoName rho; muName mu; UName U; } } // ************************************************************************* // |
||
September 23, 2013, 19:59 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Anyway. The fix is just one additional char (it will be in the next release): Code:
diff --git a/Libraries/simpleLagrangianFunctionObjects/EvolveCloudFunctionObject.H b/Lib --- a/Libraries/simpleLagrangianFunctionObjects/EvolveCloudFunctionObject.H +++ b/Libraries/simpleLagrangianFunctionObjects/EvolveCloudFunctionObject.H @@ -105,7 +105,7 @@ autoPtr<CloudType> &cloud() { return cloud_; } - const dimensionedVector g() const { return g_; } + const dimensionedVector &g() const { return g_; } const objectRegistry &obr() const { return obr_; }
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 28, 2015, 22:05 |
|
#5 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
Dear gschaider,
I also have this problem in my simulation, but I don't konw how to solve it in the simulation. can you explain more about that or give a solution with more details? |
|
May 29, 2015, 04:09 |
|
#6 | |
Member
|
Quote:
Code:
/home/$USER/OpenFOAM/.../swak4Foam/Libraries/simpleLagrangianFunctionObjects/EvolveCloudFunctionObject.H Code:
const dimensionedVector &g() const { return g_; } |
||
May 31, 2015, 17:21 |
|
#7 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
May 31, 2015, 22:36 |
|
#8 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
Dear Sebastian and Bernhard,
Thanks for your reply, I took the swak version 0.3.1 in which the problem is solved in the code. The "&" is in the code. But the gravity seems doesn't on the particles. |
|
June 2, 2015, 02:59 |
|
#9 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
Dear Sebastian and Bernhard,
I have cross checked my code in the ContolDict file. I found I took the EvolveKinematicCloud, not EvolveCloud and I thinkd I need to modified the EvolveKinematicCloudFunctionObject.H, but there is not codes to adjust as you mentioned, how can I adjust code in the EvolveKinematicCloudFunctionObject.H? Thanks |
|
June 2, 2015, 03:12 |
|
#10 |
Member
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 15 |
Dear Sebastian and Bernhard,
You mean I have to remove the "&" and then recompile the swak4foam. Thanks your feedback. |
|
January 15, 2017, 10:05 |
|
#11 |
New Member
zhaoshiyu
Join Date: Nov 2016
Posts: 8
Rep Power: 10 |
Hi Have you solved the problem?
I also want to add LPT to interFoam using the swak4Foam, but I donnot know how to compile the swak4Foam with interFoam, and is that right now? |
|
January 24, 2017, 17:11 |
|
#12 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
You don't have to compile swak4foam "with" interFoam. You compile it on its own and add function objects to it with the libs and functions entries in the controlDict. Examples can be found in the swak-sources in Examples/Lagrangian/functionObjects (admitedly not with interFoam. for that look at Examples/FromPresentations/OSCFD_cleaningTank2D although that case probably won't run on current OF-versions. But it will give you an idea how to calculate a muField so that particles float on the surface)
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
|
March 26, 2017, 11:48 |
|
#13 | |
New Member
zhaoshiyu
Join Date: Nov 2016
Posts: 8
Rep Power: 10 |
Quote:
I am very curious whether the LPT model can simulate the particles part in debris flow, can friction between particles be realized, or the particle can only work as tracer moving along the flow? |
||
March 28, 2017, 06:45 |
|
#14 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Particle tracking error | alchem | OpenFOAM Bugs | 5 | May 6, 2017 17:30 |
Request for Lagrangian Particle Tracking Validation or Verification Paper | Mojtaba.a | OpenFOAM Verification & Validation | 6 | May 23, 2016 02:47 |
Lagrangian Particle Tracking in Eulerian-Eulerian Multiphase Flow | DarrenC | CFX | 5 | April 7, 2016 15:50 |
Ubuntu 12.10 + openfoam2.2.0 ==> paraview error message | peteryuan | OpenFOAM Installation | 6 | August 18, 2013 19:00 |
injection problem | Mark New | FLUENT | 0 | August 4, 2013 02:30 |