This tutorial is divided into the following sections:
This tutorial examines the flow of ink as it is ejected from the nozzle of a printhead in an inkjet printer. Using Ansys Fluent’s volume of fluid (VOF) multiphase modeling capability, you will be able to predict the shape and motion of the resulting droplets in an air chamber.
This tutorial demonstrates how to do the following:
Set up and solve a transient problem using the pressure-based solver and VOF model.
Copy material from the property database.
Define time-dependent boundary conditions with an expression.
Patch initial conditions in a subset of the domain.
Automatically save data files at defined points during the solution.
Examine the flow and interface of the two fluids using volume fraction contours.
This tutorial is written with the assumption that you have completed the introductory tutorials found in this manual and that you are familiar with the Ansys Fluent outline view and ribbon structure. Some steps in the setup and solution procedure will not be shown explicitly.
The problem considers the transient tracking of a liquid-gas interface in the geometry shown in Figure 22.1: Schematic of the Problem. The axial symmetry of the problem enables a 2D geometry to be used. The computation mesh consists of 24,600 cells. The domain consists of two regions: an ink chamber and an air chamber. The dimensions are summarized in Table 22.1: Ink Chamber Dimensions.
Table 22.1: Ink Chamber Dimensions
Ink Chamber, Cylindrical Region: Radius (mm) | 0.015 |
Ink Chamber, Cylindrical Region: Length (mm) | 0.050 |
Ink Chamber, Tapered Region: Final Radius (mm) | 0.009 |
Ink Chamber, Tapered Region: Length (mm) | 0.050 |
Air Chamber: Radius (mm) | 0.030 |
Air Chamber: Length (mm) | 0.280 |
The following is the chronology of events modeled in this simulation:
At time zero, the nozzle is filled with ink, while the rest of the domain is filled with air. Both fluids are assumed to be at rest. To initiate the ejection, the ink velocity at the inlet boundary (which is modeled in this simulation by a user-defined function) suddenly increases from 0 to 3.58 m/s and then decreases according to a cosine law.
After 10 microseconds, the velocity returns to zero.
The calculation is run for 30 microseconds overall, that is, three times longer than the duration of the initial impulse.
Because the dimensions are small, the double-precision version of Ansys Fluent will be used. Air will be designated as the primary phase, and ink (which will be modeled with the properties of liquid water) will be designated as the secondary phase. Patching will be required to fill the ink chamber with the secondary phase. Gravity will not be included in the simulation. To capture the capillary effect of the ejected ink, the surface tension and prescription of the wetting angle will be specified. The surface inside the nozzle will be modeled as neutrally wettable, while the surface surrounding the nozzle orifice will be non-wettable.
The following sections describe the setup and solution steps for this tutorial:
To prepare for running this tutorial:
Download the
vof.zip
file here .Unzip
vof.zip
to your working directory.The mesh file
inkjet.msh
can be found in the folder.Use the Fluent Launcher to start Ansys Fluent.
Select Solution in the top-left selection list to start Fluent in Solution Mode.
Select 2D under Dimension.
Enable Double Precision under Options.
Note: The double precision solver is recommended for modeling multiphase flows simulation.
Set Solver Processes to
1
under Parallel (Local Machine).
Read the mesh file
inkjet.msh
.File → Read → Mesh...
Examine the mesh (Figure 22.2: Default Display of the Nozzle Mesh).
Tip: Zoom in by dragging the middle mouse button with the Shift key pressed, so that you can see that the interior of the model is composed of a fine mesh of quadrilateral cells (see Figure 22.3: The Quadrilateral Mesh).
Set the graphics display options.
View → Display → Options...
Ensure that All is selected from the Animation Option drop-down list.
Selecting All will allow you to see the movement of the entire mesh as you manipulate the Camera view in the next step.
Click Display Options dialog box.
and close theManipulate the mesh display to show the full chamber upright.
View → Display → Views...
Select front from the Views selection list.
Select axis from the Mirror Planes selection list.
Click
.The mesh display is updated to show both sides of the chamber.
Click the Camera Parameters dialog box.
button to open theNote: You may notice that the scale of the dimensions in the Camera Parameters dialog box appear very large given the problem dimensions. This is because you have not yet scaled the mesh to the correct units. You will do this in a later step.
Drag the indicator of the dial with the left mouse button in the clockwise direction until the upright view is displayed (Figure 22.4: Mesh Display of the Nozzle Mirrored and Upright).
Click Camera Parameters dialog box.
and close the
Close the Views dialog box.
Check the mesh.
Domain → Mesh → Check → Perform Mesh Check
Ansys Fluent will perform various checks on the mesh and report the progress in the console. Make sure that the reported minimum volume is a positive number.
Scale the mesh.
Domain → Mesh → Scale...
Select Specify Scaling Factors from the Scaling group box.
Enter
1e-6
for X and Y in the Scaling Factors group box.Click Scale Mesh dialog box.
and close theRight-click in the graphics window and select Refresh Display
Click the Fit to Window icon, , to center the graphic in the window.
Check the mesh.
Domain → Mesh → Check → Perform Mesh Check
Note: It is a good idea to check the mesh after you manipulate it (that is, scale, convert to polyhedra, merge, separate, fuse, add zones, or smooth and swap.) This will ensure that the quality of the mesh has not been compromised.
Define the units for the mesh.
Domain → Mesh → Units...
Select length from the Quantities list.
Select mm from the Units list.
Select surface-tension from the Quantities list.
Select dyne/cm from the Units list.
Close the Set Units dialog box.
Retain the default setting of Pressure-Based in the Solver group box of the General task page.
Setup → General
Select Transient from the Time list.
Select Axisymmetric from the 2D Space list.
Enable the laminar viscous model.
Physics → Models → Viscous...
Select Laminar in the Model group box.
Click OK to close the Viscous Model dialog box.
Enable the Volume of Fluid multiphase model.
Physics → Models → Multiphase...
Select Volume of Fluid from the Model list.
The Multiphase Model dialog box expands to show related inputs.
Retain the default settings and click Multiphase Model dialog box.
and close theImportant: When setting up your case, if you have made changes in the current tab, you should click the Apply button to make them effective before moving to the next tab. Otherwise, the relevant models may not be available in the other tabs, and your settings may be lost.
The default properties of air and water defined in Ansys Fluent are suitable for this problem. In this step, you will make sure that both materials are available for selection in later steps.
Add water to the list of fluid materials by copying it from the Ansys Fluent materials database.
Physics → Materials → Create/Edit...
Click Create/Edit Materials dialog box to open the Fluent Database Materials dialog box.
in theSelect water-liquid (h2o < l >) from the Fluent Fluid Materials selection list.
Scroll down the Fluent Fluid Materials list to locate water-liquid (h2o < l >).
Click
to copy the information for water to your list of fluid materials.Close the Fluent Database Materials dialog box.
Click Create/Edit Materials dialog box.
and close the
In the following steps, you will define water as the secondary phase. When you define the initial solution, you will patch water in the nozzle region. In general, you can specify the primary and secondary phases whichever way you prefer. It is a good idea to consider how your choice will affect the ease of problem setup, especially with more complicated problems.
Physics → Models → Multiphase...
In the Multiphase Model dialog box, open the Phases tab.
Specify air (air) as the primary phase.
Select phase-1 – Primary Phase in the Phases selection list.
Enter
air
for Name.Retain the default selection of air in the Phase Material drop-down list.
Click
Specify water (water-liquid) as the secondary phase.
In the Phases selection list, select phase-2 – Secondary Phase.
Enter
water-liquid
for Name.Select water-liquid from the Phase Material drop-down list.
Click
.
Specify the interphase interaction.
In the Multiphase Model dialog box, open the Phase Interaction tab.
In the Force tab, select Surface Tension Force Modeling (Global Options group box).
The surface tension inputs is displayed and the Continuum Surface Force model is set as the default.
Enable Wall Adhesion (Adhesion Options group box) so that contact angles can be prescribed.
For Surface Tension Coefficient (Force Setup group box), select constant from the drop-down list and enter
73.5
dyne/cm .Click
.
Close the Multiphase Model dialog box.
Set the operating reference pressure location.
Setup → Boundary Conditions → Operating Conditions...
You will set the Reference Pressure Location to be a point where the fluid will always be 100 air.
Enter
0.10
mm for X.Enter
0.03
mm for Y.Click Operating Conditions dialog box.
to close the
Set the boundary conditions at the inlet (inlet) for the mixture by selecting mixture from the Phase drop-down list in the Boundary Conditions task page.
Setup → Boundary Conditions → Inlet → inlet Edit...
Select expression from the Velocity Magnitude drop-down list.
Enter the expression in the Expression Editor dialog box as shown and click and close the dialog box.
IF(t<=10e-06[sec],3.58[m/s]*cos(PI*t/30e-6[s]),0[m/s])
Click Velocity Inlet dialog box.
and close the
Set the boundary conditions at the inlet (inlet) for the secondary phase by selecting water-liquid from the Phase drop-down list in the Boundary Conditions task page.
Setup → Boundary Conditions → Inlet → inlet → water-liquid Edit...
Click the Multiphase tab and enter
1
for the Volume Fraction.Click Velocity Inlet dialog box.
and close the
Set the boundary conditions at the outlet (outlet) for the secondary phase by selecting water-liquid from the Phase drop-down list in the Boundary Conditions task page.
Setup → Boundary Conditions → Outlet → outlet → water-liquid Edit...
Click the Multiphase tab and retain the default setting of 0 for the Backflow Volume Fraction.
Click Pressure Outlet dialog box.
and close the
Set the conditions at the top wall of the air chamber (wall_no_wet) for the mixture by selecting mixture from the Phase drop-down list in the Boundary Conditions task page.
Setup → Boundary Conditions → Wall → wall_no_wet Edit...
Enter
175
degrees for Contact Angles [deg].Click Wall dialog box.
and close theNote: This angle affects the dynamics of droplet formation. You can repeat this simulation to find out how the result changes when the wall is hydrophilic (that is, using a small contact angle, say 10 degrees).
Set the conditions at the side wall of the ink chamber (wall_wet) for the mixture.
Setup → Boundary Conditions → Wall → wall_wet Edit...
Retain the default setting of 90 degrees for Contact Angles [deg].
Click Wall dialog box.
and close the
Set the solution methods.
Solution → Solution → Methods...
Enable Non-Iterative Time Advancement.
The non-iterative time advancement (NITA) scheme is often advantageous compared to the iterative schemes as it is less CPU intensive. Although smaller time steps must be used with NITA compared to the iterative schemes, the total CPU expense is often smaller. If the NITA scheme leads to convergence difficulties, then the iterative schemes (for example, PISO, SIMPLE) should be used instead.
Select Fractional Step from the Scheme drop-down list in the Pressure-Velocity Coupling group box.
Retain the default selection of Least Squares Cell Based from the Gradient drop-down list in the Spatial Discretization group box.
Retain the default selection of PRESTO! from the Pressure drop-down list.
Select QUICK from the Momentum drop-down list.
Select Compressive from the Volume-Fraction drop-down list.
Enable the plotting of residuals during the calculation.
Solution → Reports → Residuals...
Ensure Plot is selected in the Options group box.
Click Residual Monitors dialog box.
to close the
Initialize the solution after reviewing the default initial values.
Solution → Initialization → Options...
Retain the default settings for all the parameters and click Solution Initialization task page.
(either in the ribbon or in the
Define a register for the ink chamber region.
Solution → Cell Registers New → Region...
Enter a setting of 0 mm for X Min and Y Min in the Input Coordinates group box.
Enter
0.10
mm for X Max.Enter
0.03
mm for Y Max.Click Region Register dialog box.
and close the
Patch the initial distribution of the secondary phase (water-liquid).
Solution → Initialization → Patch...
Select water-liquid from the Phase drop-down list.
Select Volume Fraction from the Variable list.
Enter
1
for Value.Select region_0 from the Registers to Patch selection list.
Click Patch dialog box.
and close the
Request the saving of data files every 200 steps.
Solution → Activities → Autosave...
Enter
200
for Save Data File Every (Time Steps).Ensure that time-step is selected from the Append File Name with drop-down list.
Enter
inkjet
for the File Name.Ansys Fluent will append the time step value to the file name prefix (
inkjet
). The standard.dat.h5
extension will also be appended. This will yield file names of the forminkjet-1-00200.dat.h5
, where 200 is the time step number.Click Autosave dialog box.
to close the
Save the initial case file (
inkjet.cas.h5
).File → Write → Case...
Run the calculation.
Solution → Run Calculation
Enter
1e-8
seconds for the Time Step Size (s).Note: Small time steps are required to capture the oscillation of the droplet interface and the associated high velocities. Failure to use sufficiently small time steps may cause differences in the results between platforms.
Enter
3000
for the Number of Time Steps.Click
.The solution will run for 3000 iterations.
Read the data file for the solution after 6 microseconds (
inkjet-1-00600.dat.h5
).File → Read → Data...
Create and display a filled contour of water volume fraction after 6 microseconds (Figure 22.5: Contours of Water Volume Fraction After 6 μs).
Results → Graphics → Contours → New...
Change the Contour Name to
contour-volume-fraction
.Enable Filled in the Options group box.
Select Phases... and Volume fraction from the Contours of drop-down lists.
Select water-liquid from the Phase drop-down list.
Click
.
Tip: In order to display the contour plot in the graphics window, you may need to click the Fit to Window button .
Save the case file (
inkjet.cas.h5
).File → Write → Case...
Display contours of water volume fraction after 12, 18, 24, and 30 microseconds (Figure 22.6: Contours of Water Volume Fraction After 12 μs - Figure 22.9: Contours of Water Volume Fraction After 30 μs).
Read the data file for the solution after 12 microseconds (
inkjet-1-01200.dat.h5
).File → Read → Data...
Reload the contour graphic saved in the previous step.
Results → Graphics → Contours → contour-volume-fraction Display
Repeat these steps for the 18, 24, and 30 microseconds files.
This tutorial demonstrated the application of the volume of fluid method with surface tension effects. The problem involved the 2D axisymmetric modeling of a transient liquid-gas interface, and postprocessing showed how the position and shape of the surface between the two immiscible fluids changed over time.