0% found this document useful (0 votes)
26 views63 pages

Alopez LPT OFW11

The document summarizes simulations of Lagrangian particles using OpenFOAM 3.0.x. It discusses the theory behind modeling particles using Newton's equations of motion and drag force calculations. It also outlines options for simulating particles using the SolidParticle class to implement particles coupled to fluid solvers, or using the Intermediate library to model particles as computational parcels. The document describes preprocessing such as initializing particle properties, running simulations, and postprocessing such as outputting particle tracking data.

Uploaded by

axel.toko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views63 pages

Alopez LPT OFW11

The document summarizes simulations of Lagrangian particles using OpenFOAM 3.0.x. It discusses the theory behind modeling particles using Newton's equations of motion and drag force calculations. It also outlines options for simulating particles using the SolidParticle class to implement particles coupled to fluid solvers, or using the Intermediate library to model particles as computational parcels. The document describes preprocessing such as initializing particle properties, running simulations, and postprocessing such as outputting particle tracking data.

Uploaded by

axel.toko
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 63

Simulations with particles, using the Lagrangian

method
11th OpenFOAM Workshop, Guimarães, Portugal
University of Strathclyde, Glasgow, UK

June 28, 2016

Alejandro López
alejandro.glasgow@gmail.com
Mechanical and Aerospace Engineering
University of Strathclyde
Glasgow, UK
Outline
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
Theory
SolidParticle Class Theory
SolidParticle Class
Intermediate Library Intermediate Library
Templates
Templates Simulating Lagrangian
Particles in OF 3.0.x
Simulating Lagrangian Particles in OF 3.0.x Preprocessing
Running
Preprocessing PostProcessing

Running References

PostProcessing Extras
Create and compile a new
cloudFunctionObject

References Include
couldFunctionObjects in
the dictionary
Implementing additional
Extras Rebound models

Create and compile a new cloudFunctionObject


Include couldFunctionObjects in the dictionary
Implementing additional Rebound models Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Treatment of the disperse phase
Simulations with
particles, using the
Particles inside a fluid Coupling possibilities Lagrangian method
Alejandro Lopez
I Eulerian-Eulerian I One way coupling

I Eulerian-Lagrangian
Fluid -> Particles 2 Theory
SolidParticle Class
I Single particles I Two way coupling Intermediate Library
I Computational parcels Fluid <-> Particles Templates

Simulating Lagrangian
Euler-Euler I Four way coupling
Particles in OF 3.0.x
I Fluid and Particles both treated as Fluid <-> Particles + Particle Preprocessing

continuous phases collisions Running


PostProcessing

I Large particle concentrations References

I Particle-Particle interactions and influence Extras


Create and compile a new
of the particles on the continuous phase cloudFunctionObject

are important Include


couldFunctionObjects in
the dictionary
Euler-Lagrange Implementing additional
Rebound models
I Continuum equations solved for the fluid
phase
I Newton’s equations for motion solved for
Figure: Forces on particles and Newton’s equations
the discrete phase Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Treatment of the disperse phase
Simulations with
particles, using the
Lagrangian method
The force balance on a spherical particle inside a viscous fluid Alejandro Lopez
is:
dVp 3 Theory
Fp = mp = FD (1) SolidParticle Class

dt Intermediate Library
Templates

The drag force on spherical particles is then calculated as: Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
18µ CD Re(Re) Running
FD = mp (u − up ) (2) PostProcessing
ρp dp2 24 References

Extras
Where the drag coefficient CD is usually obtained from the Create and compile a new
cloudFunctionObject

following equation: Include


couldFunctionObjects in
the dictionary
 24 Implementing additional

 Re if Rep < 1 Rebound models

24
CD = (1 + 0.15Rep0.687 ) if 1 ≤ Rep ≤ 1000
 Rep
0.44 if Rep > 1000
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles in Open-
FOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

4 Theory
SolidParticle Class
Intermediate Library

Options Templates

Simulating Lagrangian
Particles in OF 3.0.x
I SolidParticle Class: Implement solid particles and couple Preprocessing

them to a given solver. Running


PostProcessing

I Intermediate library: Series of models, forces, References

CloudFunctionObjects... -> Templates that work for each Extras


Create and compile a new
of the classes derived from the parcel class cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
SolidParticle Class
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
OpenFOAM 3.0.x
Theory
cd $WM_PROJECT_DIR/src/lagrangian/solidParticle 5 SolidParticle Class
Intermediate Library
I solidParticle.C and solidParticleCloud.C, define Templates

how the particles are implemented and their behaviour Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
I Function Foam::solidParticle::move implementation of Running

Reynolds number -> calculation of drag force and new PostProcessing

References
velocity. New velocity -> affected by the parameters
Extras
yielded by the operations performed on the eulerian Create and compile a new
cloudFunctionObject
phase. Carrier phase properties represented inside the Include
couldFunctionObjects in
code by rhoc for (density) ,Uc (velocity) and nuc (viscosity) the dictionary
Implementing additional
I Additional functions -> What happens when a patch is hit Rebound models

I solidParticleCloud.C -> Definition of class constructor.


Properties needed -> density of the particles (rhop),
restitution ratio (e) and friction coefficient (mu) Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
OpenFOAM’s intermediate library
Simulations with
particles, using the
Lagrangian method
OpenFOAM 3.0.x Alejandro Lopez

DPMFoam Theory
SolidParticle Class
I Templates Very convenient for 6 Intermediate Library
Templates
implementing several models Simulating Lagrangian
and testing them all at once Particles in OF 3.0.x
Preprocessing

I Develop and compile our own Running


PostProcessing

libraries References

I Implementing additional Extras


Create and compile a new
CloudFunctionObjects cloudFunctionObject
Include
couldFunctionObjects in
I Implementing additional the dictionary
Implementing additional
rebound models, drag models Rebound models

...
I Solver verified against Ansys
Fluent 15 (1) Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Templates in OpenFOAM (3-6)
Simulations with
particles, using the
Lagrangian method
Functions or classes that are written for one or more types not yet Alejandro Lopez
specified. When using a template, the types are passed as
Theory
arguments, explicitly or implicitly. SolidParticle Class
Intermediate Library
Function Templates 7 Templates

Example: Function that returns the greater one of two objects Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
template <typename T> Running

inline T const& max (T const& a, T const& b) PostProcessing

{ References

Extras
return a<b?b:a; Create and compile a new
} cloudFunctionObject
Include
couldFunctionObjects in

The template parameters have to be announced with a syntax like: the dictionary
Implementing additional
Rebound models

template<parameters separated by commas>

In the example, the type parameter is T. This type parameter can have
any identifier. T represents an arbitrary type that is going to be Mechanical and Aerospace
Engineering
University of Strathclyde
specified when the function is called. 40 Glasgow, UK
Templates in OpenFOAM (3-6)
Simulations with
particles, using the
The process of replacing the template parameters by concrete types Lagrangian method
Alejandro Lopez
is called instantiation.
Function Templates in OpenFOAM Theory
SolidParticle Class
Functions used inside the KinematicParcel class to interpolate the Intermediate Library
8 Templates
density and the velocity.
Simulating Lagrangian
Particles in OF 3.0.x
template<class ParcelType> Preprocessing
template<class CloudType> Running
inline const Foam::interpolation<Foam::scalar>& PostProcessing

Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::rhoInterp() const References


{
Extras
return rhoInterp_(); Create and compile a new
} cloudFunctionObject
Include
couldFunctionObjects in
template<class ParcelType> the dictionary
template<class CloudType> Implementing additional
Rebound models
inline const Foam::interpolation<Foam::vector>&
Foam::KinematicParcel<ParcelType>::TrackingData<CloudType>::UInterp() const
{
return UInterp_();
}
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Templates in OpenFOAM (3-6)
Simulations with
particles, using the
Lagrangian method
Class Templates Alejandro Lopez

Class template declaration: Theory


SolidParticle Class
Intermediate Library
template<class T> 9 Templates

class Item Simulating Lagrangian


Particles in OF 3.0.x
Preprocessing

The first one defines the template type specification, and the second Running
PostProcessing
one is the C++ class declaration References

Template specialization Enables the user to define a different Extras


Create and compile a new
implementation for a template when a specific type is passed as cloudFunctionObject
Include
template parameter. The template parameters have to be announced couldFunctionObjects in
the dictionary
with a syntax like: Implementing additional
Rebound models

template <> class myclass <char> { ... };

This allows the definition of a specific implementation when the Mechanical and Aerospace
Engineering
argument is of type char. University of Strathclyde
40 Glasgow, UK
Types of Clouds and Particle forces
Simulations with
particles, using the
Particle Forces Lagrangian method
Alejandro Lopez
I Drag
Theory
I DistortedSphereDrag SolidParticle Class
I ErgunWenYuDrag Intermediate Library
10 Templates
I NonSphereDrag
Clouds I PlessisMasliyahDrag
Simulating Lagrangian
Particles in OF 3.0.x

I CollidingCloud I SphereDrag Preprocessing


Running
I WenYuDrag PostProcessing
I KinematicCloud References
I Gravity
I MPPICCloud Extras
I Lift Create and compile a new
I ReactingCloud cloudFunctionObject
Include
I NonInertialFrame couldFunctionObjects in
I ReactingMultiphaseCloud the dictionary

I Paramagnetic Implementing additional


Rebound models

I PressureGradient
I SRF
I VirtualMass Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Injection models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Injection Models Theory


SolidParticle Class

I CellZoneInjection 11
Intermediate Library
Templates

I ConeInjection Simulating Lagrangian


Particles in OF 3.0.x
I ConeNozzleInjection Preprocessing
Running

I FieldActivatedInjection Figure: Axial Cone Nozzle configuration (2)


PostProcessing

References
I InflationInjection Extras
Create and compile a new
I KinematicLookupTableInjec- cloudFunctionObject
Include
tion couldFunctionObjects in
the dictionary

I ManualInjection Implementing additional


Rebound models

I PatchFlowRateInjection
I PatchInjection
Mechanical and Aerospace
Engineering
Figure: Tangential Cone Nozzle Configuration (2) University of Strathclyde
40 Glasgow, UK
Distribution models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class

Distribution Models 12
Intermediate Library
Templates

I exponential Simulating Lagrangian


Particles in OF 3.0.x
Preprocessing
I fixedValue Running
PostProcessing
I general References
I multiNormal Extras
Create and compile a new
I normal cloudFunctionObject
Include
couldFunctionObjects in
I RosinRammler the dictionary
Implementing additional
I uniform Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
CloudFunctionObjects
Simulations with
Library functions that provide additional capabilities to the particles, using the
Lagrangian method
cloud-based solvers. Alejandro Lopez
I FacePostProcessing: Records particle face quantities on
Theory
user-specified face zone SolidParticle Class
Intermediate Library
13 Templates

Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
Running
PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
CloudFunctionObjects
Simulations with
Library functions that provide additional capabilities to the particles, using the
Lagrangian method
cloud-based solvers. Alejandro Lopez
I FacePostProcessing: Records particle face quantities on
Theory
user-specified face zone SolidParticle Class
Intermediate Library
I ParticleCollector: Collects the parcel-mass and mass flow 13 Templates

rate over a set of polygons, defined as a list of points Simulating Lagrangian


Particles in OF 3.0.x
Preprocessing
Running
PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
CloudFunctionObjects
Simulations with
Library functions that provide additional capabilities to the particles, using the
Lagrangian method
cloud-based solvers. Alejandro Lopez
I FacePostProcessing: Records particle face quantities on
Theory
user-specified face zone SolidParticle Class
Intermediate Library
I ParticleCollector: Collects the parcel-mass and mass flow 13 Templates

rate over a set of polygons, defined as a list of points Simulating Lagrangian


Particles in OF 3.0.x
I ParticleErosion: Creates the particle erosion field on the Preprocessing
Running
user-specified patches PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
CloudFunctionObjects
Simulations with
Library functions that provide additional capabilities to the particles, using the
Lagrangian method
cloud-based solvers. Alejandro Lopez
I FacePostProcessing: Records particle face quantities on
Theory
user-specified face zone SolidParticle Class
Intermediate Library
I ParticleCollector: Collects the parcel-mass and mass flow 13 Templates

rate over a set of polygons, defined as a list of points Simulating Lagrangian


Particles in OF 3.0.x
I ParticleErosion: Creates the particle erosion field on the Preprocessing
Running
user-specified patches PostProcessing

References
I ParticleTracks: Records all particle variables on each call
Extras
to postFace Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
CloudFunctionObjects
Simulations with
Library functions that provide additional capabilities to the particles, using the
Lagrangian method
cloud-based solvers. Alejandro Lopez
I FacePostProcessing: Records particle face quantities on
Theory
user-specified face zone SolidParticle Class
Intermediate Library
I ParticleCollector: Collects the parcel-mass and mass flow 13 Templates

rate over a set of polygons, defined as a list of points Simulating Lagrangian


Particles in OF 3.0.x
I ParticleErosion: Creates the particle erosion field on the Preprocessing
Running
user-specified patches PostProcessing

References
I ParticleTracks: Records all particle variables on each call
Extras
to postFace Create and compile a new
cloudFunctionObject
I ParticleTrap: Traps the particles within a given phase Include
couldFunctionObjects in
fraction for multiphase cases the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
CloudFunctionObjects
Simulations with
Library functions that provide additional capabilities to the particles, using the
Lagrangian method
cloud-based solvers. Alejandro Lopez
I FacePostProcessing: Records particle face quantities on
Theory
user-specified face zone SolidParticle Class
Intermediate Library
I ParticleCollector: Collects the parcel-mass and mass flow 13 Templates

rate over a set of polygons, defined as a list of points Simulating Lagrangian


Particles in OF 3.0.x
I ParticleErosion: Creates the particle erosion field on the Preprocessing
Running
user-specified patches PostProcessing

References
I ParticleTracks: Records all particle variables on each call
Extras
to postFace Create and compile a new
cloudFunctionObject
I ParticleTrap: Traps the particles within a given phase Include
couldFunctionObjects in
fraction for multiphase cases the dictionary
Implementing additional
I PatchPostProcessing: Standard post-processing. It Rebound models

outputs the desired information at the user-specified


patches
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
CloudFunctionObjects
Simulations with
Library functions that provide additional capabilities to the particles, using the
Lagrangian method
cloud-based solvers. Alejandro Lopez
I FacePostProcessing: Records particle face quantities on
Theory
user-specified face zone SolidParticle Class
Intermediate Library
I ParticleCollector: Collects the parcel-mass and mass flow 13 Templates

rate over a set of polygons, defined as a list of points Simulating Lagrangian


Particles in OF 3.0.x
I ParticleErosion: Creates the particle erosion field on the Preprocessing
Running
user-specified patches PostProcessing

References
I ParticleTracks: Records all particle variables on each call
Extras
to postFace Create and compile a new
cloudFunctionObject
I ParticleTrap: Traps the particles within a given phase Include
couldFunctionObjects in
fraction for multiphase cases the dictionary
Implementing additional
I PatchPostProcessing: Standard post-processing. It Rebound models

outputs the desired information at the user-specified


patches
I VoidFraction: Creates the particle void fraction on the Mechanical and Aerospace
Engineering
carrier phase 40
University of Strathclyde
Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the

Preprocessing Lagrangian method


Alejandro Lopez

I Case: 100 mm length quadrangular pipe with a 90 Theory


SolidParticle Class
degrees bend Intermediate Library
Templates
I Geometry and mesh created with blockMesh Simulating Lagrangian
Particles in OF 3.0.x
14 Preprocessing
Running
PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
Preprocessing Intermediate Library
Templates
0 Directory Simulating Lagrangian
Particles in OF 3.0.x
I Reach steady state without particles 15 Preprocessing
Running
I mapFields /Path-To-Steady-State-Case-Directory PostProcessing

-consistent References

Extras
I Use steady state as the initial condition Create and compile a new
cloudFunctionObject
I Copy files and rename U, k, epsilon, omega -> Include
couldFunctionObjects in
the dictionary
*.continuous_phase_name Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
Intermediate Library

Preprocessing Templates

Simulating Lagrangian
constant Directory Particles in OF 3.0.x
16 Preprocessing
I transportProperties Running
PostProcessing

I g References

Extras
I turbulenceProperties.continuous_phase_name Create and compile a new
cloudFunctionObject
I kinematicCloudProperties Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
Preprocessing SolidParticle Class
Intermediate Library

transportProperties Dictionary Templates

Simulating Lagrangian
Particles in OF 3.0.x
continuousPhaseName water; 17 Preprocessing
Running
PostProcessing

rho.water 1000; References

Extras
Create and compile a new
transportModel Newtonian; cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
nu 1e-06; Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Preprocessing Theory
SolidParticle Class
turbulenceProperties.water Dictionary Intermediate Library
Templates

simulationType RAS; Simulating Lagrangian


Particles in OF 3.0.x
18 Preprocessing
Running
RAS PostProcessing

{ References

RASModel kEpsilon; Extras


Create and compile a new
cloudFunctionObject
Include
turbulence on; couldFunctionObjects in
the dictionary

printCoeffs on; Implementing additional


Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
Intermediate Library
Templates

Preprocessing Simulating Lagrangian


Particles in OF 3.0.x
g Dictionary 19 Preprocessing
Running
PostProcessing

dimensions [0 1 -2 0 0 0 0]; References

value ( 0 -9.81 0 ); Extras


Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method

Preprocessing Alejandro Lopez

Theory
kinematicCloudProperties Dictionary SolidParticle Class
Intermediate Library
I Coupling Templates

I Transient or Steady State Simulating Lagrangian


Particles in OF 3.0.x
20 Preprocessing
I Interpolation and Integration schemes for the Lagrangian Running

phase PostProcessing

References
I Particle properties: density, poissons ratio, youngs Extras
modulus.... Create and compile a new
cloudFunctionObject
Include
I Particle forces couldFunctionObjects in
the dictionary

I Injection models, dispersion models Implementing additional


Rebound models

I Patch interaction models, collision models


I cloudFucntionObjects
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
kinematicCloudProperties Dictionary Simulations with
particles, using the
Lagrangian method
solution //cloudSolution.H
{ Alejandro Lopez
active true;
coupled true; //parcels coupled to carrier phase Theory
transient yes; //No for Steady State SolidParticle Class
cellValueSourceCorrection off; //Flag to correct cell values with the latest transfer information
Intermediate Library
//during the Lagrangian tilmestep
Templates
//calcFrequency 2; //carrier steps per cloud step (Only steady state)
//maxCo 1; //Max fraction of current cell that can be traversed in a single step Simulating Lagrangian
//maxTrackTime 10; //Max particle track time (s) Particles in OF 3.0.x
//resetSourcesOnStartup yes; //if yes, coupling source terms reset on start up
21 Preprocessing
sourceTerms
{ Running
PostProcessing
schemes
{ References
U semiImplicit 1; Extras
}
Create and compile a new
} cloudFunctionObject
interpolationSchemes
Include
{ couldFunctionObjects in
rho.water cell; the dictionary
U.water cellPoint; Implementing additional
mu.water cell; Rebound models
//curlUcDt cell;
//DUcDt cell;
}
integrationSchemes
{
U Euler; //analytical or Euler
} Mechanical and Aerospace
} Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
/*SaffmanMeiLiftForce
Alejandro Lopez
{
constantProperties
U U;
{
};*/ Theory
// parcelTypeId 1; //Default value
/* pressureGradient SolidParticle Class
// rhoMin 1e-15; //Default value
{ Intermediate Library
// minParticleMass 1e-15; //Default value
U U;
rho0 2206; Templates
};*/
youngsModulus 2e12;
/*paramagnetic Simulating Lagrangian
poissonsRatio 0.2;
{ Particles in OF 3.0.x
magneticSusceptibility 1; 22 Preprocessing
// constantVolume true;
HdotGradH U;
Running
};
alphaMax 0.99; PostProcessing
*/
}
/*virtualMass References
{
Cvm 0.5; Extras
subModels
} Create and compile a new
{
*/ cloudFunctionObject
particleForces
/*nonInertialFrame Include
{
{ couldFunctionObjects in
sphereDrag;
linearAccelerationName linearAc; the dictionary
linearAcceleration 10; Implementing additional
gravity;
angularVelocityName angVelo; Rebound models
angularVelocity 5;
/* ErgunWenYuDrag
angularAccelerationName angAcc
{
angularAcceleration 5;
alphac alpha.air;
}
}*/
*/
//SRF;
} Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
injectionModels
{
model1 Theory
{ SolidParticle Class
type patchInjection; dispersionModel none; Intermediate Library
patchName inlet; Templates
SOI 0; patchInteractionModel standardWallInteraction;
massFlowRate 0.01; Simulating Lagrangian
massTotal 0.001; heatTransferModel none; Particles in OF 3.0.x
parcelBasisType mass; 23 Preprocessing
flowRateProfile 1; surfaceFilmModel none; Running
sizeDistribution
PostProcessing
{ stochasticCollisionModel none;
type RosinRammler; References
RosinRammlerDistribution collisionModel none;
{ Extras
minValue 250e-6; radiation off; Create and compile a new
maxValue 500e-6; cloudFunctionObject
d 250e-6; standardWallInteractionCoeffs Include
n 3; { couldFunctionObjects in
} type rebound; the dictionary
} e 0.97; Implementing additional
duration 0.1; mu 0.09; Rebound models
nParticle 100; }
parcelsPerSecond 4704;
U0 ( 0 0 0 );
}
}
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
cloudFunctions Intermediate Library
{ Templates

particleErosion Simulating Lagrangian


{ patchPostProcessing Particles in OF 3.0.x
type particleErosion; { 24 Preprocessing
Running
patches type patchPostProcessing;
PostProcessing
( maxStoredParcels 1000000;
walls patches References
); ( Extras
p 2700000000; walls Create and compile a new
cloudFunctionObject
psi 2; );
Include
K 2; voidFraction; couldFunctionObjects in
} the dictionary
Implementing additional
} Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
system particles, using the
Lagrangian method
application DPMFoam;
Alejandro Lopez
startFrom startTime;
Theory
startTime 0;
SolidParticle Class

stopAt endTime; Intermediate Library


Templates
endTime 0.1;
Simulating Lagrangian
deltaT 0.0001; fvSolution 25
Particles in OF 3.0.x
Preprocessing
writeControl adjustableRunTime; Running
PIMPLE
{ PostProcessing
writeInterval 0.01; nOuterCorrectors 2;
References
nCorrectors 1;
purgeWrite 0; nNonOrthogonalCorrectors 0; Extras
pRefCell 0;
writeFormat ascii; Create and compile a new
pRefValue 0; cloudFunctionObject
} Include
writePrecision 6;
couldFunctionObjects in
the dictionary
writeCompression uncompressed;
Implementing additional
Rebound models
timeFormat general;

timePrecision 6;

runTimeModifiable true;

adjustTimeStep yes; Mechanical and Aerospace


Engineering
maxCo 1; University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
Intermediate Library

Running the case Templates

Simulating Lagrangian
Particles in OF 3.0.x
I DPMFoam > logDPMFoam & Preprocessing
26 Running
I pyFoamPlotWatcher.py logDPMFoam PostProcessing

References
I http:
Extras
//www.cfd-online.com/Forums/openfoam-solving/ Create and compile a new
cloudFunctionObject
64146-tutorial-how-plot-residuals.html Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
Running the case SolidParticle Class
Intermediate Library
Script for monitoring the number of particles in the system Templates

Simulating Lagrangian
set grid y Particles in OF 3.0.x
set title "Number of particles" Preprocessing
set ylabel ’Number of particles’ 27 Running
set xlabel ’Time’
PostProcessing
plot "< cat out.226970 | grep ’ Current number of parcels
= ’ | cut -c 39-43 " every 2 u ($0/100000):1 title ’Particles in system’ with lines References
pause 1
reread Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
Running the case SolidParticle Class
Intermediate Library
Script for monitoring the number of particles in the system Templates

Simulating Lagrangian
set grid y Particles in OF 3.0.x
set title "Number of particles" Preprocessing
set ylabel ’Number of particles’ 27 Running
set xlabel ’Time’
PostProcessing
plot "< cat out.226970 | grep ’ Current number of parcels
= ’ | cut -c 39-43 " every 2 u ($0/100000):1 title ’Particles in system’ with lines References
pause 1
reread Extras
Create and compile a new
cloudFunctionObject
Include
I gedit particlesInSystem couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
Running the case SolidParticle Class
Intermediate Library
Script for monitoring the number of particles in the system Templates

Simulating Lagrangian
set grid y Particles in OF 3.0.x
set title "Number of particles" Preprocessing
set ylabel ’Number of particles’ 27 Running
set xlabel ’Time’
PostProcessing
plot "< cat out.226970 | grep ’ Current number of parcels
= ’ | cut -c 39-43 " every 2 u ($0/100000):1 title ’Particles in system’ with lines References
pause 1
reread Extras
Create and compile a new
cloudFunctionObject
Include
I gedit particlesInSystem couldFunctionObjects in
the dictionary
Implementing additional
I gnuplot particlesInSystem Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class

Post-processing with paraFoam Intermediate Library


Templates

Simulating Lagrangian
I paraFoam Particles in OF 3.0.x
Preprocessing
I Name of the cloud (kinematicCloud -lagrangian) will Running
28 PostProcessing
become available in Mesh Parts at the time step the
References
injection starts Extras
I See the particles, Create and compile a new
cloudFunctionObject
Include
I Plot fields, apply filters, plot variables over lines..... couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
Intermediate Library
Templates
Post-processing with paraFoam Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
Running
29 PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Simulating Lagrangian Particles through a
pipe bend in OpenFOAM 3.0.x
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
Intermediate Library
Templates
Post-processing with paraFoam Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
Running
30 PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
References
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
I (1) Alejandro López, Dr. Matthew Stickland and Dr. William Dempster, CFD study of SolidParticle Class
Intermediate Library
Jet Impingement Test erosion using Ansys Fluent and OpenFOAM, Computer
Templates
Physics Communications, Vol. 197 (2015) pp. 88-95.
Simulating Lagrangian
I (2) http://www.fluidproducts.com/fullcone.htm Particles in OF 3.0.x
I (3) http://www.tfd.chalmers.se/~hani/kurser/OS_CFD_2013/ Preprocessing
Running
AlejandroLopez/LPT_for_erosionModelling_report.pdf PostProcessing
I (4) Nicolai M. Josuttis David Vandevoorde. C++ Templates. Addison Wesley, 2002. 31 References
I (5) OpenFOAM Foundation. Openfoam c++ documentation
Extras
I (6) OpenFOAM Foundation. Openfoam user guide Create and compile a new
cloudFunctionObject
I (7) Alister Forder, Martin Thew, David Harrison. Anumerical investigation of solid Include
couldFunctionObjects in
particle erosion experienced within oilfield control valves, Wear, Vol 216, pp. the dictionary
184-193 Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Alejandro López
alejandro.glasgow@gmail.com

Thank you!
Questions?
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I New cloudFunctionObject placed in the same directory as particleErosion Alejandro Lopez

Theory
SolidParticle Class
Intermediate Library
Templates

Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
Running
PostProcessing

References

Extras
33 Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I New cloudFunctionObject placed in the same directory as particleErosion Alejandro Lopez

I mkdir NandakumarErosion Theory


cp ParticleErosion/* NandakumarErosion SolidParticle Class
Intermediate Library
cd NandakumarErosion Templates
mv ParticleErosion.C NandakumarErosion.C Simulating Lagrangian
mv ParticleErosion.H NandakumarErosion.H Particles in OF 3.0.x
Preprocessing
Running
PostProcessing

References

Extras
33 Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I New cloudFunctionObject placed in the same directory as particleErosion Alejandro Lopez

I mkdir NandakumarErosion Theory


cp ParticleErosion/* NandakumarErosion SolidParticle Class
Intermediate Library
cd NandakumarErosion Templates
mv ParticleErosion.C NandakumarErosion.C Simulating Lagrangian
mv ParticleErosion.H NandakumarErosion.H Particles in OF 3.0.x
Preprocessing
I Let the compiler know where to find these new files in order to compile Running

them and add the new erosion model to the list of cloudFunctionObjects PostProcessing

References

Extras
33 Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I New cloudFunctionObject placed in the same directory as particleErosion Alejandro Lopez

I mkdir NandakumarErosion Theory


cp ParticleErosion/* NandakumarErosion SolidParticle Class
Intermediate Library
cd NandakumarErosion Templates
mv ParticleErosion.C NandakumarErosion.C Simulating Lagrangian
mv ParticleErosion.H NandakumarErosion.H Particles in OF 3.0.x
Preprocessing
I Let the compiler know where to find these new files in order to compile Running

them and add the new erosion model to the list of cloudFunctionObjects PostProcessing

References
I Header file responsible for compilation of cloudFunctionObjects:
Extras
makeParcelCloudFunctionObjects.H, inside the parcels/include 33 Create and compile a new
directory. cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I New cloudFunctionObject placed in the same directory as particleErosion Alejandro Lopez

I mkdir NandakumarErosion Theory


cp ParticleErosion/* NandakumarErosion SolidParticle Class
Intermediate Library
cd NandakumarErosion Templates
mv ParticleErosion.C NandakumarErosion.C Simulating Lagrangian
mv ParticleErosion.H NandakumarErosion.H Particles in OF 3.0.x
Preprocessing
I Let the compiler know where to find these new files in order to compile Running

them and add the new erosion model to the list of cloudFunctionObjects PostProcessing

References
I Header file responsible for compilation of cloudFunctionObjects:
Extras
makeParcelCloudFunctionObjects.H, inside the parcels/include 33 Create and compile a new
directory. cloudFunctionObject
Include
couldFunctionObjects in
I Add two lines to the file: the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I New cloudFunctionObject placed in the same directory as particleErosion Alejandro Lopez

I mkdir NandakumarErosion Theory


cp ParticleErosion/* NandakumarErosion SolidParticle Class
Intermediate Library
cd NandakumarErosion Templates
mv ParticleErosion.C NandakumarErosion.C Simulating Lagrangian
mv ParticleErosion.H NandakumarErosion.H Particles in OF 3.0.x
Preprocessing
I Let the compiler know where to find these new files in order to compile Running

them and add the new erosion model to the list of cloudFunctionObjects PostProcessing

References
I Header file responsible for compilation of cloudFunctionObjects:
Extras
makeParcelCloudFunctionObjects.H, inside the parcels/include 33 Create and compile a new
directory. cloudFunctionObject
Include
couldFunctionObjects in
I Add two lines to the file: the dictionary
Implementing additional
I #include "NandakumarParticleErosion.H" Rebound models
makeCloudFunctionObjectType(NandakumarParticleErosion, CloudType);

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I New cloudFunctionObject placed in the same directory as particleErosion Alejandro Lopez

I mkdir NandakumarErosion Theory


cp ParticleErosion/* NandakumarErosion SolidParticle Class
Intermediate Library
cd NandakumarErosion Templates
mv ParticleErosion.C NandakumarErosion.C Simulating Lagrangian
mv ParticleErosion.H NandakumarErosion.H Particles in OF 3.0.x
Preprocessing
I Let the compiler know where to find these new files in order to compile Running

them and add the new erosion model to the list of cloudFunctionObjects PostProcessing

References
I Header file responsible for compilation of cloudFunctionObjects:
Extras
makeParcelCloudFunctionObjects.H, inside the parcels/include 33 Create and compile a new
directory. cloudFunctionObject
Include
couldFunctionObjects in
I Add two lines to the file: the dictionary
Implementing additional
I #include "NandakumarParticleErosion.H" Rebound models
makeCloudFunctionObjectType(NandakumarParticleErosion, CloudType);
I Change name to the class -> Substitute every ’ParticleErosion’ by
’NandakumarErosion’
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I New cloudFunctionObject placed in the same directory as particleErosion Alejandro Lopez

I mkdir NandakumarErosion Theory


cp ParticleErosion/* NandakumarErosion SolidParticle Class
Intermediate Library
cd NandakumarErosion Templates
mv ParticleErosion.C NandakumarErosion.C Simulating Lagrangian
mv ParticleErosion.H NandakumarErosion.H Particles in OF 3.0.x
Preprocessing
I Let the compiler know where to find these new files in order to compile Running

them and add the new erosion model to the list of cloudFunctionObjects PostProcessing

References
I Header file responsible for compilation of cloudFunctionObjects:
Extras
makeParcelCloudFunctionObjects.H, inside the parcels/include 33 Create and compile a new
directory. cloudFunctionObject
Include
couldFunctionObjects in
I Add two lines to the file: the dictionary
Implementing additional
I #include "NandakumarParticleErosion.H" Rebound models
makeCloudFunctionObjectType(NandakumarParticleErosion, CloudType);
I Change name to the class -> Substitute every ’ParticleErosion’ by
’NandakumarErosion’
I Recompile the library Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I kinematicCloudProper- Alejandro Lopez
ties (when using
Theory
kinematicParcelCloud) SolidParticle Class
Intermediate Library
Templates

Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
Running
PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
34 Include
couldFunctionObjects in
the dictionary
Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I kinematicCloudProper- Alejandro Lopez
ties (when using
Theory
kinematicParcelCloud) SolidParticle Class
Intermediate Library
I cloudFunctions Templates

{ Simulating Lagrangian
Particles in OF 3.0.x
ParticleErosion Preprocessing
Running
{ PostProcessing

type ParticleErosion; References

patches Extras
Create and compile a new
( cloudFunctionObject
34 Include
walls couldFunctionObjects in
the dictionary

); Implementing additional
Rebound models

p 2000000000;
psi 2;
K 2;
Mechanical and Aerospace
} Engineering
University of Strathclyde
40 Glasgow, UK
Create and compile a new cloudFunc-
tionObject
Simulations with
particles, using the
Lagrangian method
I kinematicCloudProper- Alejandro Lopez
ties (when using
Theory
kinematicParcelCloud) I NandakumarErosion SolidParticle Class
Intermediate Library
I cloudFunctions { Templates

{ type NandakumarErosion; Simulating Lagrangian


Particles in OF 3.0.x
ParticleErosion patches Preprocessing
Running
{ ( PostProcessing

type ParticleErosion; walls References

patches ); Extras
Create and compile a new
( p 2000000000; cloudFunctionObject
34 Include
walls psi 2; couldFunctionObjects in
the dictionary

); K 2; Implementing additional
Rebound models

p 2000000000; }
psi 2; }
K 2;
Mechanical and Aerospace
} Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
I Rebound, escape and stick conditions
Theory
SolidParticle Class
Intermediate Library
Templates

Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
Running
PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
35 Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
I Rebound, escape and stick conditions
Theory
I Implementation of rebound model -> inside SolidParticle Class
Intermediate Library
StandardWallInteraction.C Templates

Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
Running
PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
35 Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
I Rebound, escape and stick conditions
Theory
I Implementation of rebound model -> inside SolidParticle Class
Intermediate Library
StandardWallInteraction.C Templates

Simulating Lagrangian
I The new models will be available if Particles in OF 3.0.x
Preprocessing
StandardWallInteraction is chosen in the Running

kinematicCloudProperties dictionary PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
35 Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
I Rebound, escape and stick conditions
Theory
I Implementation of rebound model -> inside SolidParticle Class
Intermediate Library
StandardWallInteraction.C Templates

Simulating Lagrangian
I The new models will be available if Particles in OF 3.0.x
Preprocessing
StandardWallInteraction is chosen in the Running

kinematicCloudProperties dictionary PostProcessing

References
I PatchInteractionModel.C and Extras
PatchInteractionModel.H , LocalInteraction.H need Create and compile a new
cloudFunctionObject

also be modified Include


couldFunctionObjects in
the dictionary
35 Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
I Rebound, escape and stick conditions
Theory
I Implementation of rebound model -> inside SolidParticle Class
Intermediate Library
StandardWallInteraction.C Templates

Simulating Lagrangian
I The new models will be available if Particles in OF 3.0.x
Preprocessing
StandardWallInteraction is chosen in the Running

kinematicCloudProperties dictionary PostProcessing

References
I PatchInteractionModel.C and Extras
PatchInteractionModel.H , LocalInteraction.H need Create and compile a new
cloudFunctionObject

also be modified Include


couldFunctionObjects in
the dictionary
I Once the files have been modified, the code is recompiled 35 Implementing additional
Rebound models
again.
I wclean lib wmake libso
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
I Definition of stick condtion -> Intermediate Library
Templates
case PatchInteractionModel<CloudType>::itStick: Simulating Lagrangian
Particles in OF 3.0.x
Preprocessing
Running
PostProcessing

References

Extras
Create and compile a new
cloudFunctionObject
Include
couldFunctionObjects in
the dictionary
36 Implementing additional
Rebound models

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez

Theory
SolidParticle Class
I Definition of stick condtion -> Intermediate Library
Templates
case PatchInteractionModel<CloudType>::itStick: Simulating Lagrangian
Particles in OF 3.0.x
I case PatchInteractionModel<CloudType>::itStick: Preprocessing
Running
{ PostProcessing

keepParticle = true; References

active = false; Extras


Create and compile a new
U = vector::zero; cloudFunctionObject
Include
nStick_++; couldFunctionObjects in
the dictionary
break; 36 Implementing additional
Rebound models
}

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
(7)
Simulations with
case PatchInteractionModel<CloudType>::itForder: particles, using the
{ Lagrangian method
keepParticle = true;
active = true; Alejandro Lopez

vector nw; Theory


vector Up;
SolidParticle Class
Intermediate Library
this->owner().patchData(p, pp, trackFraction, tetIs, nw, Up);
Templates
// Calculate motion relative to patch velocity
Simulating Lagrangian
U -= Up;
Particles in OF 3.0.x
scalar Un = U & nw; Preprocessing
vector Ut = U - Un*nw; Running
PostProcessing
const scalar magU = mag(U);
const vector Udir = U/magU; References

Extras
// determine impact angle, alpha
const scalar alpha = mathematical::pi/2.0 - acos(nw & Udir); Create and compile a new
cloudFunctionObject
//determine the normal and tangential restitution coefficients
//normal coefficient of restitution Include
couldFunctionObjects in
scalar e_n = 0.988-0.78*alpha+0.19*sqr(alpha)-0.024*pow(alpha,3)+0.0027*pow(alpha,4); the dictionary
//tangential coefficient of restitution
37 Implementing additional
scalar e_t = 1.0-0.78*alpha+0.84*sqr(alpha)-0.21*pow(alpha,3)+0.28*pow(alpha,4)-0.022*pow(alpha,5); Rebound models

//New velocity is the previous normal and tangential components


//multiplied by their respective restitution coefficients calculated above
U -= e_n*(Un*nw) + e_t*Ut;

// Return velocity to global space


U += Up; Mechanical and Aerospace
break; Engineering
} University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
PatchInteractionModel.C particles, using the
Lagrangian method
switch (itEnum) Alejandro Lopez
{
case itRebound:
{ Theory
it = "rebound"; SolidParticle Class
break; Intermediate Library
} Templates
case itStick:
{ Simulating Lagrangian
it = "stick"; Particles in OF 3.0.x
break; Preprocessing
} Running
case itEscape: PostProcessing
{
it = "escape"; References
break;
} Extras
case itForder: Create and compile a new
{ cloudFunctionObject
it = "Forder"; Include
break; couldFunctionObjects in
} the dictionary
default: 38 Implementing additional
{ Rebound models
}
}

return it;
}
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
PatchInteractionModel.C Lagrangian method
Alejandro Lopez
template<class CloudType>
typename Foam::PatchInteractionModel<CloudType>::interactionType
Theory
Foam::PatchInteractionModel<CloudType>::wordToInteractionType
( SolidParticle Class
const word& itWord Intermediate Library
) Templates
{
if (itWord == "rebound") Simulating Lagrangian
{ Particles in OF 3.0.x
return itRebound; Preprocessing
} Running
else if (itWord == "stick") PostProcessing
{
return itStick; References
}
else if (itWord == "escape") Extras
{ Create and compile a new
return itEscape; cloudFunctionObject
} Include
else if (itWord == "Forder") couldFunctionObjects in
the dictionary
{
return itForder; 39 Implementing additional
Rebound models
}
else
{
return itOther;
}
}
Mechanical and Aerospace
Engineering
University of Strathclyde
40 Glasgow, UK
Implementing additional Rebound models
Simulations with
particles, using the
Lagrangian method
Alejandro Lopez
PatchInteractionModel.H
Theory
template<class CloudType> SolidParticle Class
class PatchInteractionModel
Intermediate Library
:
Templates
public SubModelBase<CloudType>
{ Simulating Lagrangian
public: Particles in OF 3.0.x
Preprocessing
// Public enumerations
Running
// Interaction types PostProcessing
enum interactionType
{ References
itRebound, Extras
itStick,
Create and compile a new
itEscape, cloudFunctionObject
itForder,
Include
itSommerfeldHubber, couldFunctionObjects in
itOther the dictionary
}; 40 Implementing additional
Rebound models

LocalInteraction.C

Mechanical and Aerospace


Engineering
University of Strathclyde
40 Glasgow, UK

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy