You are on page 1of 13

EDEM-FLUENT Tutorial:

2-Phase Entrainment Simulation

Revision 2.2/1

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

Introduction
This tutorial describes how to set-up a coupled 2-phase EDEM-FLUENT simulation.
This is an example of a Eulerian-Eulerian simulation that demonstrates entrainment.
This tutorial assumes you have some experience of using Fluent.

This 2 phase simulation starts with creating a particle bed in EDEM.


1. Start EDEM.
2. Go to File > Save As
3. Select a location on the local machine (e.g. C:\EDEM_Tutorials).
4. Enter a file name (e.g. packed_bed.dem) and click Save.

EDEM Creator: Setting up the Model


Step 1: Set the Global Model Parameters
Choose the units
The first step in creating the model is to set the units used throughout EDEM.
1. Go to the Options > Units menu.
2. Change the following measurement units:

Length to mm

Velocity to m/s

Enter the model title and description


The model title and description will appear in the Data Browser window.
1. Click on the Globals tab in the Tabs pane.
2. Enter the title '2-phase Entrainment Simulation' in the Title field in the Simulation
section.

Page 2 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

Set the gravity and define the materials


1. Check that gravity is set to -9.81m/s2 in the z direction.
2. Click the + button at the top of the Materials section. This creates a new material.
3. Highlight the material and change its name to 'particle'.
4. Set the Poisson's ratio, Shear modulus, and density as shown below:

5. Click the + button again to create another material called geometry.


6. Set the Poisson's ratio, Shear modulus, and density as shown below:

Define the interactions between the materials


1. Select particle from the drop-down list at the top of the materials section.
2. Click the + button in the Interaction section and when prompted choose particle.
3. Set the coefficients as follows:

4. Click the + button a second time and select the material geometry.
5. Set the coefficients as follows:

Page 3 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

Step 2: Define the Base Particles


Create a new particle type
1. Click on the Particle tab in the Tabs pane.
2. Click the + button and type a name Particle in the Name field.

Define the surfaces and properties


1. Set the surface radius to 6 mm.
2. Set the material to particle.
3. Click the Calculate Properties button then click OK to calculate from surfaces.

Step 3: Define the Domain and Geometry


Import the geometry
The geometry has been created using Gambit and is ready for import into EDEM and
Fluent. It is possible to import geometry directly from Fluent, however in this instance
we will import the mesh file directly into EDEM.
The mesh file contains four sections: the geometry walls, a velocity inlet, pressure
outlet and periodic boundaries (in the Y axis). Only the walls are imported.
1. Click on the Geometry tab in the Tabs pane.
2. Click the Import button in the Sections section.
3. Navigate to the file entrainment.msh and import it.
4. When prompted, set the units of measurement to mm then click OK. The
geometry will appear in the Viewer.
5. Set the material type to geometry.
6. In the Domain section, uncheck the Auto-update option then set Min and Max
parameters as follows:

7. Enable periodic boundaries in Y.

Create the particle factory plate


1. Click the + button in the Sections section and choose box. Rename the section
factory.
2. Click on the Box tab and set the size parameters as follows:

Page 4 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

3. Click on the Details tab and set the type to virtual.

Step 4: Create the Particle Factory


Create the particle factory
1. Click on the Factories tab.
2. Click the + button to create a new factory.
3. Set the factory type to Static.
4. Select the Total number to create to 6000.

Set the factory parameters


1. Set the Velocity to fixed and click the Settings button

.
2. Set the z velocity to -0.5 m/s and leave the others at 0.
3. Select File > Save.
Next we move onto the EDEM Simulator to start processing the simulation.

Page 5 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

EDEM Simulator:
Running the Simulation
Once the model has been set-up in the Creator we move onto the Simulator to run it.

Step 1: Set the Time and Grid Options


Set the time step
1. Click on the Simulator button:
2. Set the fixed time step to 5e-4s (34% of the Raleigh time step).

Set the simulation time and data write-out frequency


1. Set the total simulation time to 0.5s.
2. Set the write out frequency to 0.01s.
3. Set the full data save to be every 1 write-out.

Set the grid size


1. Set the grid size to 2Rmin. This will produce approximately 14,000 grid cells.

Step 2: Run the simulation


1. Click the Start progress button at the bottom of the simulation window.

Page 6 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

EDEM Analyst: Analyzing Your Results


Step 1: Review the Simulation
Check the particle bed is settled
1. Click on the Analyst button on the toolbar:
2. Click on the Coloring tab to open the Coloring pane.
3. In the Attribute Coloring section, set the Attribute to Velocity and the component
to Magnitude then click Apply.
4. Click the play button to play through the simulation. Check that the particles have
settled into a rectangular particle bed.

Create a line graph


1. Click on the Create Graph button on the toolbar:
2. Click on the Line Graph tab.
3. Set the Group element to Particle.
4. Set the X-axis Time Range as follows:

5. Set the Y-axis Attributes as follows:

6. Click Create Graph.

Page 7 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

Step 2: Export an Input Deck


Export a single time step
Export a single time step to use as the input to Fluent:
1. In the Viewer Controls, set the time to 0.5 s.
2. Select File > Export Input Deck.
3. Save the deck as entrainment_05s_input.dem.
Exporting an input deck creates three files:

entrainment_05s_input.dem

entrainment_05s_input.dem.cfg

entrainment_05s_input.idx

Only the current time step is exported. This time step can be used as the input for the
2 phase simulation.

Set the domain to match the domain in FLUENT


1. Click on the Creator button on the toolbar.
2. Select File > Open then open entrainment_05s_input.dem. The time will be 0.5s
with no other time steps available.
3. Click on the Geometry tab.
4. Set the domain to match the domain in Fluent as follows:

5. Check the Show Particles check box to verify the domain looks like this:

6. Save the changes and close EDEM.

Page 8 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

Fluent: Setting up the model


Step 1: Set the fluid phase of the simulation
Import and scale the mesh file
1. Start FLUENT in 3d.
2. Select File > Read > Case then navigate to entrainment.msh. Click OK to import
the mesh file.
3. Select Grid > Scale. Be sure the Grid Was Created In is set to millimeters (mm).
The maximum and minimum cell volume is around 8e-6 m3; the particle volume is 9e7 m3. For an accurate drag calculation, the particle volume should be less than the
minimum grid cell volume.

Setup the materials and operating conditions


1. Select Define > Materials.
2. Click Fluent Database then select water-liquid. Click Copy then Close.
3. Select Define > Operating Conditions.
4. Enable Gravity and set it to -9.81 m/s in Z.

Set the periodic conditions


1. Select Define > Periodic Conditions.
2. Set the flow direction to Y without any pressure gradients.
3. Select File > Write > Case and save the case file as entrainment.cas.

Set the simulation parameters


1. Select Define > Models > Solver.
2. Set the time to Unsteady then click OK.
3. Select Define > Models > Viscous.
4. Select k-epsilon then click OK.
5. Select File > Write > Case to save the case file as entrainment.cas.

Set the boundary conditions


1. Using a text editor, open the velocity profile file vel_profile.txt or create a new
text file. To increase velocity from 0 to 6 m/s in 0.2 s, enter the following:
((vel_ramp transient 2 0 0)
(time
0.000000e+000 2.000000e-001)
(velocity_magnitude
0.000000e+000 6.000000e+000)
)

2. Select Define > Profiles then click Read. Set the Files of type pulldown to All Files
then open the vel_profile.txt file from Step 1 above.

Page 9 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation


3. Select Define > Boundary Conditions.
4. Click on fluid in the Zone section then click Set.
5. Select water-liquid from the Material Name pulldown menu then click OK.
6. Click velocity_inlet in the Zone section then click Set.
7. Select vel_ramp velocity_magnitude from the Velocity Magnitude pulldown.
8. Select Intensity and Hydraulic Diameter from the Specification Method pulldown
in the Turbulence section, then set the turbulence as follows:

9. Click pressure_outlet in the Zone section then click Set.


10. Set the Turbulence as in Step 8 above.

Step 2: Set the solid phase of the simulation


Set the EDEM scheme panel and launch EDEM
1. Select Define > Models > EDEM.
2. Click Open then navigate to entrainment_05s_input.dem. Click OK to load the
EDEM input deck.
3. Click Creator in the Launch section to start EDEM. The 0.5 s time step is shown
with the particles settled in the bed.
4. Click on the Domain tab and be sure the Y-axis Periodic Boundary is checked.
5. Close the Creator.
6. Click Simulator in the Launch section to start EDEM.
7. Be sure the Fixed Time Step is 5e-4s and the grid size is 2 RMin.
8. Close the Simulator.

Page 10 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

Step 3: Setup the 2-phase simulation


Set the coupling method and solution controls
1. In the Fluent-EDEM scheme panel, select the Eulerian Coupling Method.
2. Select fluid as the Coupled Fluid Zone.
3. Set the Solution Controls as follows then click OK:

Fluent will now run through a series of pre-set commands and apply the multiphase
Eulerian model to the simulation. To verify the function hooks:
1. Select Define > User Defined > Function Hooks.
2. Check EDEM::edem_udf is set as the Execute at End function hook.
3. Check read_case::edem_udf is set as the Read Case function hook.

Set the under-relaxation factors


1. Select to Solve > Controls > Solution.
2. Set the Following under-relaxation factors:

Pressure 0.3
Density 0.1
Body Forces 0.8
Momentum 0.2
Volume Fraction - 0.2
Turbulent Kinetic Energy - 0.8
Turbulent Dissipation Rate - 0.8
Turbulent Viscosity 1.0

3. Click OK.

Page 11 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

Define data to export to EnSight


If you have EnSight installed:
1. Select File > Export.
2. Set the File Type to Ensight Case Gold, then enable the Transient checkbox.
3. Be sure the Append Frequency is 1 to export data every timestep.
4. Select Velocity Magnitude (fluid) as the Function to Write.
5. Enter a file name fluid_phase_entrainment.
6. Click Apply then click Close.

Initialize and set file options in Fluent


1. Initialize the solution.
1. Select Solve > Initialize > Initialize.
2. Set the fluid X velocity to 0.001 then select Init > Close.
2. Set the autosave case and data option.
1. Select File > Write > autosave.
2. Enter a a file name and location to save to.
3. Set the Autosave Case File Frequency and Autosave Data File Frequency to
8 iterations. At a time step of 1e-2 s, data files are saved every 0.08 s.
3. Select File > Write > Case & Data to save the case (.cas) and data (.dat) files.

Setup the time settings and run the simulation


1. Select Solve > Iterate then set the Time Step Size to 1e-2. This is 20 times larger
than the EDEM timestep.
2. Set the Number of Time Steps to 300. The simulation will run through 3s of
simulated time.
3. Set the max iterations per time step to 80. For Eulerian-Eulerian simulations this
is typically 50-200.
4. Select Iterate to run the simulation. EDEM will start automatically once the fluid
phase converges, or the maximum number of iterations is reached.

Page 12 of 13

EDEM-FLUENT Tutorial: 2-Phase Entrainment Simulation

Post-Processing
Export EnSight data for animation
If you have EnSight installed:
1. Select Define > Models > EDEM then click Analyst to launch the EDEM Analyst.
2. Select File > Export Data.
3. Click the + button to create and name a new configuration.
4. Set the Export Format to EnSight.
5. Enter a filename edem_phase_entrainment.case.
6. In the General tab, be sure All Time-steps is enabled.
7. Click the Queries tab then click the + button to create a new query.
8. Select Particle > Velocity then set the Component to Magnitude.
9. Click Export to save the EnSight file.
You can now import into EnSight to produce images and videos of the entrainment
simulation. Refer to the document Using EDEM with CEIs EnSight, available from
the Customer Area of the DEM Solutions website (http://www.dem-solutions.com).

Page 13 of 13

You might also like