Tutorial 9: Flow Through a Butterfly Valve

Introduction

This tutorial includes:

·  Tutorial 9 Features

·  Overview of the Problem to Solve

·  Defining a Simulation in ANSYS CFX-Pre

·  Obtaining a Solution using ANSYS CFX-Solver Manager

·  Viewing the Results in ANSYS CFX-Post

If this is the first tutorial you are working with, it is important to review the following topics before beginning:

·  Setting the Working Directory

·  Changing the Display Colors

Unless you plan on running a session file, you should copy the sample files used in this tutorial from the installation folder for your software (<CFXROOT>/examples/) to your working directory. This prevents you from overwriting source files provided with your installation. If you plan to use a session file, please refer to Playing a Session File.

Sample files referenced by this tutorial include:

·  PipeValve.pre

·  PipeValve_inlet.F

·  PipeValveMesh.gtm

·  PipeValveUserF.pre

Tutorial 9 Features

This tutorial addresses the following features of ANSYS CFX.

Component / Feature / Details /
ANSYS CFX-Pre / User Mode / General Mode
Simulation Type / Steady State
Fluid Type / General Fluid
Domain Type / Single Domain
Turbulence Model / k-Epsilon
Heat Transfer / None
Particle Tracking
Boundary Conditions / Inlet (Profile)
Inlet (Subsonic)
Outlet (Subsonic)
Symmetry Plane
Wall: No-Slip
Wall: Rough
CEL (CFX Expression Language)
User Fortran
Timestep / Auto Time Scale
ANSYS CFX-Solver Manager / Power-Syntax
ANSYS CFX-Post / Plots / Animation
Default Locators
Particle Track
Point
Slice Plane
Other / Changing the Color Range
MPEG Generation
Particle Track Animation
Quantitative Calculation
Symmetry

In this tutorial you will learn about:

·  using a rough wall boundary condition in ANSYS CFX-Pre to simulate the pipe wall

·  creating a fully developed inlet velocity profile using either the CFX Expression Language or a User CEL Function

·  setting up a Particle Tracking simulation in ANSYS CFX-Pre to trace sand particles

·  animating particle tracks in ANSYS CFX-Post to trace sand particles through the domain

·  quantitative calculation of average static pressure in ANSYS CFX-Post on the outlet boundary

Overview of the Problem to Solve

In industry, pumps and compressors are commonplace. An estimate of the pumping requirement can be calculated based on the height difference between source and destination and head loss estimates for the pipe and any obstructions/joints along the way. Investigating the detailed flow pattern around a valve or joint however, can lead to a better understanding of why these losses occur. Improvements in valve/joint design can be simulated using CFD, and implemented to reduce pumping requirement and cost.

Flows can also contain particulates that affect the flow and cause erosion to pipe and valve components. The particle tracking capability of ANSYS CFX can be used to simulate these effects.

In this example, water flows through a 20 mm radius pipe with a rough internal surface. The equivalent sand grain roughness is 0.2 mm. The flow is controlled by a butterfly valve, which is set at an angle of 55° to the vertical axis. The velocity profile is assumed to be fully developed at the pipe inlet. The flow contains sand particles ranging in size from 50 to 500 microns.

Defining a Simulation in ANSYS CFX-Pre

The following sections describe the simulation setup in ANSYS CFX-Pre.

Playing a Session File

If you wish to skip past these instructions, and have ANSYS CFX-Pre set up the simulation automatically, you can select Session > Play Tutorial from the menu in ANSYS CFX-Pre, then run one of the following session files available for this tutorial:

·  PipeValve.pre sets the inlet velocity profile using a CEL (ANSYS CFX Expression Language) expression.

·  PipeValveUserF.pre sets the inlet velocity profile using a User CEL Function that is defined by a Fortran subroutine. This session file requires that you have the required Fortran compiler installed and set in your system path. For details on which Fortran compiler is required for your platform, see the applicable ANSYS, Inc. installation guide. If you are not sure which Fortran compiler is installed on your system, try running the cfx5mkext command (found in <CFXROOT>/bin) from the command line and read the output messages.

If you choose to run a session file do so using the procedure described in earlier tutorials under Playing the Session File and Starting ANSYS CFX-Solver Manager, and then proceed to Obtaining a Solution using ANSYS CFX-Solver Manager once the simulation setup is complete.

Creating a New Simulation

1.  Start ANSYS CFX-Pre.

2.  Select File > New Simulation.

3.  Select General and click OK.

4.  Select File > Save Simulation As.

5.  Under File name, type PipeValve.

6.  Click Save.

Importing the Mesh

1.  Right-click Mesh and select Import Mesh.

2.  Apply the following settings

Setting / Value /
File name / PipeValveMesh.gtm

3.  Click Open.

Defining the Properties of Sand

The material properties of the sand particles used in the simulation need to be defined. Heat transfer and radiation modeling are not used in this simulation, so the only property that needs to be defined is the density of the sand.

To calculate the effect of the particles on the continuous fluid, between 100 and 1000 particles are usually required. However, if accurate information about the particle volume fraction or local forces on wall boundaries is required, then a much larger number of particles needs to be modeled.

When you create the domain, choose either full coupling or one-way coupling between the particle and continuous phase. Full coupling is needed to predict the effect of the particles on the continuous phase flow field but has a higher CPU cost than one-way coupling. One-way coupling simply predicts the particle paths during post-processing based on the flow field, but without affecting the flow field.

To optimise CPU usage, you can create two sets of identical particles. The first set will be fully coupled and between 100 and 1000 particles will be used. This allows the particles to influence the flow field. The second set will use one-way coupling but a much higher number of particles will be used. This provides a more accurate calculation of the particle volume fraction and local forces on walls.

1.  Click Material then create a new material named Sand Fully Coupled.

2.  Apply the following settings:

Tab / Setting / Value /
Basic Settings / Material Group / Particle Solids
Thermodynamic State / (Selected)
Material Properties / Thermodynamic Properties > Equation of State > Density / 2300 [kg m^-3]
Thermodynamic Properties >Specific Heat Capacity / (Selected)
Thermodynamic Properties >Specific Heat Capacity > Specific Heat Capacity / 0 [J kg^-1 K^-1]
[a]
Thermodynamic Properties > Reference State / (Selected)
Thermodynamic Properties > Reference State > Option / Specified Point
Thermodynamic Properties > Reference State > Ref. Temperature / 300 [K]
[a] This value is not used because heat transfer is not modeled in this tutorial.

3.  Click OK.

4.  Under Materials, right-click Sand Fully Coupled and select Duplicate from the shortcut menu.

5.  Name the duplicate Sand One Way Coupled.

6.  Click OK.

Sand One Way Coupled is created with properties identical to Sand Fully Coupled.

Creating the Domain

1.  Right click Simulation in the Outline tree view and ensure that Automatic Default Domain is selected. A domain named Default Domain should now appear under the Simulation branch.

2.  Double click Default Domain and apply the following settings

Tab / Setting / Value /
General Options / Basic Settings > Fluids List / Water
Basic Settings > Particle Tracking / (Selected)
Basic Settings > Particle Tracking > Particles List / Sand Fully Coupled, Sand One Way Coupled
Domain Models > Pressure > Reference Pressure / 1 [atm]
Fluid Models / Heat Transfer > Option / None
Turbulence > Option / k-Epsilon[a]
Fluid Details / Sand Fully Coupled / (Selected)
Sand Fully Coupled > Morphology > Option / Solid Particles
Sand Fully Coupled > Morphology > Particle Diameter Distribution / (Selected)
Sand Fully Coupled > Morphology > Particle Diameter Distribution > Option / Normal in Diameter by Mass
Sand Fully Coupled > Morphology > Particle Diameter Distribution > Minimum Diameter / 50e-6 [m]
Sand Fully Coupled > Morphology > Particle Diameter Distribution > Maximum Diameter / 500e-6 [m]
Sand Fully Coupled > Morphology > Particle Diameter Distribution > Mean Diameter / 250e-6 [m]
Sand Fully Coupled > Morphology > Particle Diameter Distribution > Std. Deviation / 70e-6 [m]
Sand Fully Coupled > Erosion Model / (Selected)
Sand Fully Coupled > Erosion Model > Option / Finnie
Sand Fully Coupled > Erosion Model > Vel. Power Factor / 2.0
Sand Fully Coupled > Erosion Model > Reference Velocity / 1 [m s^-1]
[a] The turbulence model only applies to the continuous phase and not the particle phases.

3.  Apply the following settings

Tab / Setting / Value /
Fluid Details / Sand One Way Coupled / (Selected)
Sand One Way Coupled > Morphology > Option / Solid Particles
Sand One Way Coupled > Morphology > Particle Diameter Distribution / (Selected)
Sand One Way Coupled > Morphology > Particle Diameter Distribution > Option / Normal in Diameter by Mass
Sand One Way Coupled > Morphology > Particle Diameter Distribution > Minimum Diameter / 50e-6 [m]
Sand One Way Coupled > Morphology > Particle Diameter Distribution > Maximum Diameter / 500e-6 [m]
Sand One Way Coupled > Morphology > Particle Diameter Distribution > Mean Diameter / 250e-6 [m]
Sand One Way Coupled > Morphology > Particle Diameter Distribution > Std. Deviation / 70e-6 [m]
Sand One Way Coupled > Erosion Model / (Selected)
Sand One Way Coupled > Erosion Model > Option / Finnie
Sand One Way Coupled > Erosion Model > Vel. Power Factor / 2.0
Sand One Way Coupled > Erosion Model > Reference Velocity / 1 [m s^-1]

4.  Apply the following settings

Tab / Setting / Value /
Fluid Details / Water / (Selected)
Water > Morphology > Option / Continuous Fluid
Fluid Pairs / Fluid Pairs / Water | Sand Fully Coupled
Fluid Pairs > Water | Sand Fully Coupled > Particle Coupling / Fully Coupled
Fluid Pairs > Water | Sand Fully Coupled > Momentum Transfer > Drag Force > Option / Schiller Naumann
Fluid Pairs / Water | Sand One Way Coupled
Fluid Pairs > Water | Sand One Way Coupled > Particle Coupling / One-way Coupling
Fluid Pairs > Water | Sand One Way Coupled > Momentum Transfer > Drag Force > Option / Schiller Naumann

5.  Click OK.

Creating the Inlet Velocity Profile

In previous tutorials you have often defined a uniform velocity profile at an inlet boundary. This means that the inlet velocity near to the walls is the same as that at the center of the inlet. If you look at the results from these simulations, you will see that downstream of the inlet, a boundary layer will develop, so that the downstream near wall velocity is much lower than the inlet near wall velocity.

You can simulate an inlet more accurately by defining an inlet velocity profile, so that the boundary layer is already fully developed at the inlet. The one seventh power law will be used in this tutorial to describe the profile at the pipe inlet. The equation for this is:

/ Equation1.

where is the pipe centerline velocity, is the pipe radius, and is the distance from the pipe centerline.

A non uniform (profile) boundary condition can be created by:

·  Creating an expression using CEL that describes the inlet profile.

OR

·  Creating a User CEL Function which uses a user subroutine (linked to the ANSYS CFX-Solver during execution) to describe the inlet profile.

OR

·  Loading a BC profile file (a file which contains profile data).

Profiles created from data files are not used in this tutorial, but are used in the tutorial Tutorial 3: Flow in a Process Injection Mixing Pipe.

In this tutorial, you use one of the first two methods listed above to define the velocity profile for the inlet boundary condition. The results from each method will be identical.

Using a CEL expression is the easiest way to create the profile. The User CEL Function method is more complex but is provided as an example of how to use this feature. For more complex profiles, it may be necessary to use a User CEL Function or a BC profile file.

To use the User CEL Function method, continue with this tutorial from User CEL Function Method for the Inlet Velocity Profile. Note that you will need access to a Fortran compiler to be able to complete the tutorial by the User CEL Function method.

To use the expression method, continue with the tutorial from this point.

Expression Method for the Inlet Velocity Profile

1.  Create the following expressions.

Name / Definition /
Rmax / 20 [mm]
Wmax / 5 [m s^-1]
Wprof / Wmax*(abs(1-r/Rmax)^0.143)

2.  In the definition of Wprof, the variable r (radius) is a ANSYS CFX System Variable defined as:

/ Equation2.

3.  In this equation, and are defined as directions 1 and 2 (X and Y for Cartesian coordinate frames) respectively, in the selected reference coordinate frame.

You should now continue with the tutorial from Creating the Boundary Conditions.

User CEL Function Method for the Inlet Velocity Profile

The Fortran subroutine has already been written for this tutorial.

Important

You must have the required Fortran compiler installed and set in your system path in order to run this part of the tutorial. If you do not have a Fortran compiler, you should use the expression method for defining the inlet velocity, as described in Expression Method for the Inlet Velocity Profile. For details on which Fortran compiler is required for your platform, see the applicable ANSYS, Inc. installation guide. If you are not sure which Fortran compiler is installed on your system, try running the cfx5mkext command (found in <CFXROOT>/bin) from the command line and read the output messages.