Tutorial: Fluid Flow Through a Valve
Particle traces through a non return valve
In this tutorial you will learn how to carry out a CFD analysis of a non-return valve.
Valves under particular flow conditions can be simulated to obtain key performance quantities such as pressure drop through the system. Additionally, velocity and pressure results can be inspected in detail to identify regions of extreme pressure and flow inefficiencies. This tutorial acts as a guide for valve analysis best practices and can be used as a template for your future projects.
Import tutorial case into the workbench
1) Import tutorial project
- To start this tutorial, you have to import the tutorial project into your ‘Dashboard’ via the link above.
- Create a copy of the project as shown below such that you can make changes to your own personal version.
- You will notice that we are only modelling one half of the valve geometry. We have utilized the fact that the valve is symmetrical and this is a great way to save on both mesh size and simulation run time.
2) Create an Open Inner Region
Before we can begin a simulation we must first create the fluid volume. This is done by performing a geometry operation called “open inner region”.
For the operation:
- Select the surfaces surrounding the inlet and outlet openings as “boundary faces”.
- Select any internal face as the “seed face”.
Once the operation is complete you will be left with the internal fluid volume.
3) Create a Simulation
- To create a new simulation click on the ‘+’ option next to the ‘Simulations’ tab.
- For this simulation we will need an Incompressible analysis.
- After clicking ‘Create’, a new tree will be automatically generated in the left panel with all the parameters and settings that are necessary to completely specify such an analysis.
- All sections that are completed are highlighted with a green check. Sections that need to be specified have a red circle. While, the blue circle indicates an optional settings that does not need to be filled out.
3) Create a Mesh
When meshing the geometry we need to ensure that the mesh we create is an accurate representation of the model, meaning that complex geometric features need to be resolved using small mesh elements. Secondly we must ensure that fluid regions where flow complexity will occur also have well refined mesh elements such that the flow details are accurately captured by the simulation.
- The first step for the meshing process in this tutorial is to create a region around the valve seat where we know that the flow physics will be most complex. Create a ‘cartesian box’ region under ‘geometry primitives’ with the following dimensions.
- Next assign specific mesh refinement to the region that we have created.
- The last specific refinement that we add is the ‘inflate boundary layer’ option. Stick to the default settings and apply the refinement to all of the fluid surfaces except for those on the symmetry plane, the inlet and the outlet. For selecting a large number of surfaces quickly you can either use the box select option from the icons along the top of the window here or right click >> ‘assign all visible’ and then deselect the surfaces that do not require boundary layer refinement.
- Finally we select the global level of ‘fineness’ for the automatic meshing process, chose the number of processors that we want the meshing job to run on and hit ‘generate’.
- The mesh will be displayed on the workbench once it has been generated.
4) Assign Materials
For this project the fluid flowing across the valve is water therefore simply assign the water material from the material library.
5) Assign Boundary Conditions
- Apply a ‘velocity inlet’ condition to the inlet as shown below.
- Assign a ‘pressure outlet’ condition of mean value 0 gauge pressure to the outlet. This sets the outlet to atmospheric pressure allowing flow to exit freely.
- Assign ‘symmetry’ conditions to all the surfaces that lie directly on the plane of symmetry.
6) Set Simulation and Result Controls
- Under ‘Simulation control’ specify the ‘End time’, this will control the number of iterations carried out by the solver.
- Next define the number of processors that you want to run the simulation on. This can drastically reduce your run time, highlighting one of the benefits of cloud based simulation. For a mesh size of between 5 and 10 million cells a machine with 32 processors is a sensible choice.
- Lastly make sure you have a sensible max run time so that the simulation is not stopped prematurely.
- Under ‘Result control’ we can define a surface to measure the averaged data at the inlet ‘Sample Data >> Area Average’. This will be used to output the pressure drop through the system over the simulation time-frame. This can also be used as an indication of the convergence of results.
7) Start a Simulation Run
- You can now hit the ‘+’ next to ‘Simulation Runs’.
- You will receive a message stating that some surfaces do not have a boundary condition applied to them and that the default ‘No slip wall’ condition will be applied. For our simulation this is exactly what we want to be applied to the non defined surfaces therefore we can ignore the message by clicking ‘OK’.
- Name the run and hit ‘Start’.
And that’s it!! your simulation is now being solved in the cloud. You can monitor its progress in the convergence plot provided in the drop-down below the simulation run that you created.
Once your simulation is complete you can use the online post processor to visualize the results. To get to grips with the post processor please refer to the following documentation.
When analyzing valves it is interesting to examine the velocity behavior through the system. Below shows velocity results with vectors included.
The pressure drop over the valve can is measured using the result control that we applied on the inlet. A graphical output is provided in the drop-down under the simulation run.
Here we can see the pressure oscillating about a mean of roughly 76000 Pa, hence for the given operating condition of 3 m/s velocity at the inlet a pressure drop of 76 kPa is experienced over the valve system.
With accurate simulation results we can now make informed design decision regarding the valve. Perhaps some geometry changes could help to reduce areas of flow circulation and high pressure.
Congratulations you are finished!
Please check out more SimScale tutorials here.