CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

Add lagrangian particles to OpenFoam solver

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2015, 04:10
Default Add lagrangian particles to OpenFoam solver
  #1
Member
 
luchen
Join Date: Jul 2011
Posts: 44
Rep Power: 14
luchen2408 is on a distinguished road
Hello, everyone, I want to add lagrangian particles in openFoam solver( single phase or multiphase), I have taken Swak4foam 0.3.1 and compiled the codes with openfoam2.3.X.
I will test the coded in single phase solver simpleFoam. just introduce some liquid particles into the gas flow in the inlet and take a look at the liquid particles flow.
I took the particlescloud file in constant folder 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 file 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;
}
}


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

I have tested the simulation, but I have some qestions as follws.

1. The gravity seems doesn't act on the particles even I defined the gravity force. when I change the direction of the g, the result is the same.


2. the paricles will not hit the wall and stick the wall, even I defined the particles stick the wall.

3.In the simulation, the sum of the number of the particles stick to the wall and the number of the particles flow out of the outlet is not the total number of particles flow into the inlet. That means there are still a lot of particles flowing in the domain. but I don't konw the final result of the these particles, stick to the wall or flow out of the outlet. Does that mean the particles calcuation doesn't converge? can any one give me some suggestion to solve the three problem mentioned above. Thanks
luchen2408 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-region solver for electric and magnetic fields + charged particles Dzhordzhs OpenFOAM Running, Solving & CFD 22 May 2, 2022 22:59
How to add this term to openfoam solver rapierrz OpenFOAM Programming & Development 10 February 28, 2015 13:30
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
Multiphase Lagrangian Particles moritzhoefert OpenFOAM 1 December 8, 2010 09:48
Additional variable for lagrangian particles (dieselFoam) N. A. OpenFOAM 0 July 16, 2010 11:45


All times are GMT -4. The time now is 19:28.