# Injection Molding - CFD Simulation

Source: https://help.sim-flow.com/tutorials/injection-molding
Last updated: 2026-10-14

[Video](https://help.sim-flow.com/tutorials/images/injection-molding.mp4)

## 1. Introduction

This tutorial is a simulation of the injection molding process. It uses the Power Law transport model, which is highly CPU-intensive due to its nonlinearity. The tutorial simulates filling a housing with molten plastic, starting from an empty domain (filled with air). It uses time-variable pressure inlet conditions that cause gradual filling of the mold.

The calculation of this simulation is very time-consuming. To speed up the calculation process, we recommend using at least 8 cores for this tutorial. The free version allows you to use only serial mode. To get the full version, you can use the contact form to [Request 30-day Trial](https://license.sim-flow.com/trial)

## 2. Download SimFlow

SimFlow is a general-purpose [CFD Software](https://sim-flow.com/download/cfd-simulation-software/)

To follow this tutorial, you will need the SimFlow free version. You may download it via the following link:
[Download SimFlow](https://sim-flow.com/download-simflow/)

## 3. Create Case

This tutorial will require high CPU usage and might take several hours to finish the calculation depending on the machine used.

Open SimFlow and create a new case named *housing injection*

1. Click **New**
2. Provide name `housing injection`
3. Click **Create** to open a new case

![simflow-launcher](https://help.sim-flow.com/tutorials/images/launcher-housing_injection.png)

## 4. Import Geometry

Firstly, we need to [Download GeometryHousing](https://help.sim-flow.com/tutorials/downloads/injection-molding/housing.stl)

1. Click **Import Geometry**
2. Select geometry file *housing.stl*
3. Click **Open**

![Housing Injection 02 Import Geometry](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_02_Import_Geometry.png)

## 5. Imported Geometry Units

Since the imported geometry is in STL format, which does not store unit information, we need to confirm the unit in which the model was created. The *Geometry size* displays the overall size of the model in each direction, which should help to decide which unit is the valid one. In this case, the model was created in millimeters.

1. Select *mm* unit
2. Click **OK** button

![Housing Injection 02 unit](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_02_unit.png)

## 6. Geometry - Housing

After importing geometry, it will appear in the 3D view.

1. Click **Fit View** to fit geometry in the view

![Housing Injection 03 Geometry](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_03_Geometry.png)

## 7. Split Geometry - Housing (I)

The imported geometry is made up of a single surface. We need to split it into separate faces for further processing.

1. Expand the *Options* list
2. Select *Split*

![Housing Injection 06 Geometry split1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_06_Geometry_split1.png)

## 8. Split Geometry - Housing (II)

1. Click **Split**

![Housing Injection 07 Geometry split2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_07_Geometry_split2.png)

## 9. Create Face Groups (I)

We will add 3 face groups to the original geometry. SimFlow treats each face group as a mesh boundary. By using face groups, we can create separate boundaries for the inlet and outlets.

1. Select the inlet face by holding `CTRL` button and clicking on the geometry face
2. Press *Create face group from selection* button

![Housing Injection 08 Face group1 v2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_08_Face_group1_v2.png)

## 10. Create Face Groups (II)

A new component should appear in the *Face Groups* list.

1. Change face group name from *group_1* to `inlet`
   (double click to edit name and press Enter to confirm)
2. To uncheck the selected face from graphics, click on *Clear Selection* or press the `Esc` key

![Housing Injection 09 Face group1 v2 1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_09_Face_group1_v2_1.png)

## 11. Create Face Groups (III)

Repeat this operation for the outlets. Additionally, we need to add outlet tube walls as separate groups to set the mesh refinement for these regions. Each group should contain a single face.

1. Create and rename new groups as follows:
   `outlet1`
   `outlet2`
   `outlet1_tube_wall`
   `outlet2_tube_wall`

![Housing Injection 10 Face group2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_10_Face_group2.png)

## 12. Create Face Groups (IV)

In order to be able to set different settings for each face, we will convert the single geometry into multiple geometry objects.

1. Select *Geometry Faces*
2. Click on the *inlet* group
3. Click on *Extract group*
4. Repeat this operation for the rest of the created face groups

![Housing Injection 11 Face group3](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_11_Face_group3.png)

## 13. Meshing Parameters - Housing

Before we start meshing, we will specify geometry options used during the meshing. We will also increase the refinement level for better accuracy.

1. Go to *Hex Meshing* panel
2. Select the *housing* component
3. Enable *Mesh Geometry*
4. Set *Refinement* to *Min 2* *Max 2*

![Housing Injection 12 Hex Meshing1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_12_Hex_Meshing1.png)

## 14. Copy Meshing Parameters

We will use the copy option to apply common settings.

1. Select *housing*
2. Click on *Copy Meshing Properties*
3. Select all remaining faces as a target
4. Click on **Copy**

![Housing Injection 13 Hex Meshing copy](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_13_Hex_Meshing_copy.png)

## 15. Meshing Parameters - Housing Outlet 1 Tube Wall

For outlet tubes, we will increase the copied refinement levels.

1. Select the *housing_outlet1_tube_wall*
2. Increase the *Refinement* to *Min 3* *Max 3*

![Housing Injection 14 Hex Meshing2 1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_14_Hex_Meshing2_1.png)

## 16. Meshing Parameters - Housing Outlet 2 Tube Wall

1. Select the *housing_outlet2_tube_wall*
2. Increase the *Refinement* to *Min 3* *Max 3*

![Housing Injection 15 Hex Meshing2 2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_15_Hex_Meshing2_2.png)

## 17. Base Mesh - Domain

Under the *Base* tab, we will define the background mesh for the housing.

1. Go to *Base* tab
2. Click on **Autosize**
3. Set the division of the base mesh
   *Division*`41``20``20`
4. Change *Max [m]* *Z* to `0.0205`

![Housing Injection 16 Base Mesh](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_16_Base_Mesh.png)

## 18. Material Point

Material Point tells the meshing algorithm on which side of the geometry the mesh is to be retained. Since we are considering flow inside the housing, we need to place the material point inside the geometry.

1. Go to *Point* tab
2. Specify location inside housing geometry
   *Material Point*`0.019``1e-02``1e-02`

You can specify the point location from the 3D view. Hold the `CTRL` key and drag the arrows to the destination.

![Housing Injection 17 Material Point ](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_17_Material_Point-.png)

## 19. Start Meshing

1. Switch to *Mesh* tab
2. Start the meshing process with **Mesh** button

![Housing Injection 18 Meshing](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_18_Meshing.png)

## 20. Check Mesh - Section View (I)

After the meshing process is finished, the mesh should appear in the graphics window. In order to check the quality of the mesh, we view the elements' shape using the section view.

1. Select *Section View* from panel
2. Check the *Section View*
3. Set the normal vector to the section plane
   *Normal \({\sf [-]}\)*`-1``0``0`
4. Set the point to set the location of the section plane
   *Point \({\sf [m]}\)*`2e-03``0``0`

![Housing Injection 19 Section check](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_19_Section_check.png)

## 21. Check Mesh - Section View (II)

After the mesh check, we will turn off the section view to return to the full model view.

1. Uncheck the *Section View*
2. Click *Section View* options or press `ESC` key to close the panel

![Housing Injection 19 Section exit](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_19_Section_exit.png)

## 22. Mesh - Boundaries

To be able to assign inlet and outlet boundary conditions, we have to adjust the boundary types.

1. Set the boundary type to *Patch* for the inlet and outlet boundaries
   *inlet* *Patch*
   *outlet1* *Patch*
   *outlet2* *Patch*

![Housing Injection 20 Mesh BC](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_20_Mesh_BC.png)

## 23. Simulation Type

We want to analyze the filling process in injection molding. For this purpose, we will use a transient simulation of two immiscible fluids (filament and air) using the free-surface method.

## 24. Transport Properties - HDPE

In the transport properties panel, we will define fluid parameters. Firstly, we will define the High-Density Polyethylene (HDPE) phase using the *Power Law* transport model.

1. Go to *Transport Properties* panel
2. Set the surface tension between fluids
   *\(\sigma\) \({\sf [N/m]}\)*`0.026`
3. Change phase name from *phase1* to `HDPE`
4. Set the density
   *\(\rho\) \({\sf [kg/m^3]}\)*`952`
5. Expand the list for Transport Model and choose *Power Law*
6. Set the parameters accordingly
   *\(\nu_{min}\) \({\sf [m^2/s]}\)*`6e-03`
   *\(\nu_{max}\) \({\sf [m^2/s]}\)*`1000`
   *\(k\) \({\sf [m^2/s]}\)*`21.0084`
   *\(n\) \({\sf [-]}\)*`0.41`

![Housing Injection 22 Transport properties1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_22_Transport_properties1.png)

## 25. Transport Properties - Air

For the second phase, we will use predefined air properties from the material database.

1. Change phase name from *phase2* to `air`
2. Click on **Material Database**
3. Select the *air*
4. Click **Apply**

![Housing Injection 23 Transport properties2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_23_Transport_properties2.png)

## 26. Solution - PIMPLE

For the purpose of the simulation, we will change the default PIMPLE algorithm parameters.

1. Go to *Solution* panel
2. Switch to the *PIMPLE* tab
3. Set *Non-Orthogonal Correctors* to `0`
4. Uncheck *Momentum Predictor* for stability

![Housing Injection 24 Solution Pimple](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_24_Solution_Pimple.png)

## 27. Solution - Limits

During computations, sometimes velocity can spontaneously approach unphysical values due to numerical errors. In order to prevent computations from diverging, we can limit the velocity. As a result, we should get more stable computations.

1. Switch to the *Limits* tab
2. Check *Velocity Damping*
3. Set the maximum velocity *\(U_{max}\)* to `10`

![Housing Injection 25 Solution Limits](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_25_Solution_Limits.png)

## 28. Boundary Conditions - Inlet (Flow I)

In order to define injection, we will use a pressure inlet boundary. We will define the pressure by a time history table.

1. Go to *Boundary Conditions* panel
2. Select *housing_inlet*
3. Change the pressure type to *Uniform Fixed Value*
4. Set the *Value [Pa]* as *table*
5. Press **Edit Table**

![Housing Injection 26 Boundary Conditions](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_26_Boundary_Conditions.png)

## 29. Boundary Conditions - Inlet (Flow II)

Fill in inlet pressure values history.

1. Press *Add Row* two times
2. Fill the table with values
   `0``1600000`
   `0.5``30000000`
   `1``50000000`
   `1.5``30000000`
3. **Close** the window

![Housing Injection 27 BC inlet table](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_27_BC_inlet_table.png)

## 30. Boundary Conditions - Inlet (Phases)

To assign injected material, the phase fraction parameter *\(\alpha_{phase}\)* is used. *\(\alpha_{HDPE}\)* equal to 1 will stand for the HDPE phase.

1. Select *housing_inlet*
2. Switch to the *Phases* tab
3. Set the *Type* to *Fixed Value*
4. Set the *Value [-]* to `1`

![Housing Injection 28 BC inlet phases.png](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_28_BC_inlet_phases.png.png)

## 31. Boundary Conditions - Outlet (Flow I)

Outlets' boundary conditions simulate outflow to the atmosphere. The default phase setup allows both fluids to exit freely, while in case of backflow only air can be sucked into the housing.

1. Select *housing_outlet1*
2. Switch the tab to *Flow*
3. Set the pressure type and its value accordingly
   *\(p{-}\rho gh\)**Type*`Total Pressure`
   *\(p{-}\rho gh\)**\(p_0\) \({\sf [Pa]}\)*`100000`
4. Change the velocity *Type* to *Zero Gradient*

![Housing Injection 29 BC outlet1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_29_BC_outlet1.png)

## 32. Boundary Conditions - Outlet (Flow II)

We will copy the boundary condition settings to the second outlet.

1. Select *housing_outlet1*
2. Press *Copy Boundary Conditions*
3. Check the *housing_outlet2*
4. Press **Copy**

![Housing Injection 30 BC outlet2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_30_BC_outlet2.png)

## 33. Create Geometry - Patch

Before we set the initial condition, we need to define the region representing the initial location of HDPE. For this purpose, we will create a box.

1. Go to *GEOMETRY* panel
2. Select *Create Box*
3. Change geometry name from *box_1* to *patch*
4. Set the origin and box dimensions
   *Origin \({\sf [m]}\)*`0.012``5e-03``6e-03`
   *Dimensions \({\sf [m]}\)*`1e-02``1e-02``0.02`

![Housing Injection 31 Patch geom](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_31_Patch_geom.png)

## 34. Initial Conditions - Patch

By using the previously created geometry, we will tell the solver where HDPE should be located at the initial state.

1. Go to *Initial Conditions* panel
2. Switch to *Patch* tab
3. Check the *patch* geometry
4. Expand the *Fields*
5. Check *\(\alpha_{HDPE}\)*
6. Override *\(\alpha_{HDPE}\)* with the value of `1`

![Housing Injection 32 Initial Patch](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_32_Initial_Patch.png)

## 35. Monitors - Sampling

During calculation, we can observe intermediate results on a section plane or probe plots. Note that runtime postprocessing can only be defined before starting calculations and cannot be changed later on. Firstly, we need to specify variables that will be sampled. After that, we will define the section plane and probes.

1. Go to *Monitors* panel
2. Switch to *Sampling* tab
3. Expand *Fields* list
4. Select the velocity *U* and the HDPE phase *\(\alpha_{HDPE}\)*

![Housing Injection 34 Monitors Sampling1 1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_34_Monitors_Sampling1_1.png)

## 36. Monitors - Create Slice (I)

To add sampling data on a plane, we need to create a slice. To define a plane, we need to set the normal vector and then select the point. In the current step, we will choose the normal vector and in the next step, we will choose a point that belongs to the plane.

1. Select *Create Slice*
2. Set the normal along Y axis
   *Normal \({\sf [-]}\)*`0``1``0`

![Housing Injection 35 Monitors Sampling1 2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_35_Monitors_Sampling1_2.png)

## 37. Monitors - Create Slice (II)

Now we will place the slice at the destination by setting the point coordinates. To achieve this, we will use arrows in the graphic window. Before that, we will hide unnecessary geometries.

1. Expand *Graphic Object List*
2. Uncheck *Geometries*
3. Set *YZ View* orientation
4. Click **Fit View**
5. Holding `CTRL` button, click on the red arrow and drag it to the middle of the model
6. The slice point coordinates should be like this
   *Point*`0``0.01``0`

![Housing Injection 36 Monitors Sampling2 1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_36_Monitors_Sampling2_1.png)

## 38. Monitors - Create Probe

To track sampled parameters at a specific point in space, we can add the probe location monitor.

1. Add *New Probe*
2. Press the viewfinder icon next to *Location [m]* coordinates
3. Set the probe location on the 3D view. Holding `CTRL` button, move the probe to the specific location
4. The probe point location should be like this
   *Location \({\sf [m]}\)*`2e-03``0.017``1e-02`

![Housing Injection 37 Monitors Sampling3 1](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_37_Monitors_Sampling3_1.png)

## 39. Run - Time Control

For any simulation, it is very convenient to let the solver automatically determine the proper time step value. To use this option, we need to define time step constraints by providing the initial time step (adjusted by the solver during computations), the maximal time step value and the Courant number.

1. Go to *RUN* panel
2. Set the *Simulation Time [s]* to `1.5`
3. Change *Time Stepping* to *Automatic*
4. Set the parameters:
   *Initial \(\Delta t\) \({\sf [s]}\)*`1e-06`
   (solver will start computation with this value and adjust it in the next iterations)
   *Max \(\Delta t\) \({\sf [s]}\)*`1e-03`
   *Max Co \({\sf [-]}\)*`1`
   *Max Alpha Co \({\sf [-]}\)*`0.5`

This calculation will require high CPU usage and might take several hours to finish the calculation depending on the machine used. If you want to shorten the computation time, you can decrease the *Simulation Time* to `0.4`*s* - this is enough for the purpose of further postprocessing.

![Housing Injection 38 Run Time](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_38_Run_Time.png)

## 40. Run - Output

We can control how often results should be saved on the hard drive. Only this data will be available for postprocessing.

1. Switch to *Output* tab
2. Set the *Interval [s]* to `1e-02`

![Housing Injection 39 Run Output](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_39_Run_Output.png)

## 41. Run - CPU

To speed up the calculation process, take advantage of parallel computing and increase the number of CPUs based on your PC’s capability. The free version allows you to use only one processor (serial mode). To get the full version, you can use the contact form to [Request 30-day Trial](https://license.sim-flow.com/trial)

Estimated computation time for serial mode: over 5 hours

1. Switch to *CPU* tab
2. Click **Run Simulation** button

![run cpu serial](https://help.sim-flow.com/tutorials/images/run-cpu-serial.png)

## 42. Monitor Solution - Residuals

When the calculation is finished, we should see a similar residual plot.

![Housing Injection 41 Residuals](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_41_Residuals.png)

## 43. Results - Slice

The Slices tab appears next to Residuals. Under this tab, we can preview results on the defined slice planes. The results preview is available during the calculation and we can track it on a regular basis. The newly calculated time step will be updated automatically as long as the time selector points to the latest time step.

1. Switch to *Slices* tab
2. Click *ViewXY*
3. Click **Fit View** to zoom the geometry
4. Choose *alpha.HDPE* field
5. Click *Adjust range to data*
6. Play with the animation buttons to track the results of analysis
7. Probe outputs are available to preview on the sheets next to *Slice*

![Housing Injection 41 Slice](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_41_Slice.png)

## 44. Calculate - Mass Flow

After computations are finished, we will investigate the mass flow rate during the injection. We will compute it by using already existing data (this feature is not available as a monitor).

1. Go to *Calculate* panel
2. Switch to *Boundary* tab
3. Select *Full Time Range*
4. Select the boundary as *housing_inlet*
5. Select mass *\(\varphi\)*
6. Click on **Calculate**

![Housing Injection 42 Inlet mass flow](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_42_Inlet_mass_flow.png)

## 45. Results - Mass Flow

1. Computed variables are displayed on the chart in the tab *Integral of phi*

![Housing Injection 43 Inlet mass flow2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_43_Inlet_mass_flow2.png)

## 46. Postprocessing - ParaView

We can do the complex visualization of our results with ParaView.

1. Go to *POSTPROCESSING* panel
2. Click on *Run ParaView*

![Housing Injection 44 Postprocessing ParaView](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_44_Postprocessing_ParaView.png)

## 47. ParaView - Load the results

Load the results into the program.

1. Mark *housing_injection.foam*
2. Click **Apply** to load results into ParaView
3. Select the phase *alpha.HDPE* from the list
4. After loading results, they will be shown in the 3D graphic window

![Housing Injection 45 PV read results](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_45_PV_read_results.png)

## 48. ParaView - Results (I)

We will focus on the HDPE phase behavior and observe mold filling during the injection.

1. Select *Clip* from the top menu
2. Change the clip type to *Scalar*
3. Select *alpha.HDPE* from the scalar list
4. Click *Refresh*
5. Uncheck *Invert* option
6. Click **Apply**
7. Select the phase *alpha.HDPE* to preview
8. Play with the animation buttons to track the HDPE phase movement

![Housing Injection 46 PV Phase volume](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_46_PV_Phase_volume.png)

## 49. ParaView - Results (II)

To show the housing together with the fluids, we will follow these steps.

1. Unhide *housing_injection.foam*
2. Set the coloring by the *Solid Color*
3. Set the opacity to `0.3`

![Housing Injection 47 PV Phase volume2](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_47_PV_Phase_volume2.png)

## 50. Final Results

Now we can see the final results with the original geometry.

![Housing Injection 45 Final Results](https://help.sim-flow.com/tutorials/images/injection-molding/Housing_Injection_45_Final_Results.png)

## 51. Advanced Postprocessing with ParaView

This concludes the tutorial, covering all the aspects we intended to showcase. For a finely tuned presentation of the results, you may take advantage of the more advanced features.

In ParaView, you can display streamlines, contour plots, vector fields, line or time plots, calculate volume or surface integrals and create animations.

To familiarize yourself with the ParaView capabilities, it’s worth checking out our video tutorial, *Paraview CFD Tutorial - Advanced Postprocessing in ParaView*, in which we demonstrate some of the most commonly used postprocessing techniques.

[Paraview CFD Tutorial - Advanced Postprocessing in ParaView](https://www.youtube.com/watch?v=5M6VgXyHB60&list=PLy7xPqn9xXckoD2gZgPpv8mrxillJ9PWU&index=21)
