0% found this document useful (0 votes)
319 views

Tutorial 9

This document provides an overview of a tutorial in ANSYS CFX that simulates flow through a butterfly valve. The tutorial demonstrates defining a simulation involving water flow in a pipe with sand particles, setting a fully developed inlet velocity profile using CFX expressions or user code, and performing particle tracking simulations to trace sand particles through the domain. Key steps include importing a mesh, defining material properties for the sand particles, creating a domain with coupled fluid and particle phases, and using CFX-Post to view results such as average static pressure.

Uploaded by

rashm006ranjan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
319 views

Tutorial 9

This document provides an overview of a tutorial in ANSYS CFX that simulates flow through a butterfly valve. The tutorial demonstrates defining a simulation involving water flow in a pipe with sand particles, setting a fully developed inlet velocity profile using CFX expressions or user code, and performing particle tracking simulations to trace sand particles through the domain. Key steps include importing a mesh, defining material properties for the sand particles, creating a domain with coupled fluid and particle phases, and using CFX-Post to view results such as average static pressure.

Uploaded by

rashm006ranjan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 23

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 ANSYS CFX-Pre User Mode

Feature Simulation Type Fluid Type Domain Type Turbulence Model Heat Transfer Particle Tracking

Details General Mode Steady State General Fluid Single Domain k-Epsilon None

Component

Feature

Details Inlet (Profile) Inlet (Subsonic) Outlet (Subsonic) Symmetry Plane Wall: No-Slip Wall: Rough

Boundary Conditions

CEL (CFX Expression Language) User Fortran Timestep ANSYS CFX-Solver Manager Power-Syntax Animation Default Locators Plots Particle Track Point ANSYS CFX-Post Slice Plane Changing the Color Range MPEG Generation Other Particle Track Animation Quantitative Calculation Symmetry In this tutorial you will learn about:

Auto Time Scale

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:

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.
PipeValve.pre

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 File name

Value 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 Material Group Basic Settings Thermodynamic State

Setting

Value Particle Solids (Selected) 2300 [kg m^3] (Selected) 0 [J kg^-1 K^1]
[a]

Thermodynamic Properties > Equation of State > Density Thermodynamic Properties >Specific Heat Capacity Material Properties Thermodynamic Properties >Specific Heat Capacity > Specific Heat Capacity Thermodynamic Properties > Reference State Thermodynamic Properties > Reference State > Option Thermodynamic Properties > Reference State > Ref. Temperature
[a]

(Selected) Specified Point 300 [K]

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 General Options

Setting Basic Settings > Fluids List Basic Settings > Particle Tracking Water (Selected)

Value

Tab

Setting Basic Settings > Particle Tracking > Particles List

Value Sand Fully Coupled, Sand One Way Coupled

Domain Models > Pressure > Reference Pressure 1 [atm] Fluid Models Heat Transfer > Option Turbulence > Option Sand Fully Coupled Sand Fully Coupled > Morphology > Option Sand Fully Coupled > Morphology > Particle Diameter Distribution Sand Fully Coupled > Morphology > Particle Diameter Distribution > Option Sand Fully Coupled > Morphology > Particle Diameter Distribution > Minimum Diameter Sand Fully Coupled > Morphology > Particle Diameter Distribution > Maximum Diameter Sand Fully Coupled > Morphology > Particle Diameter Distribution > Mean Diameter Sand Fully Coupled > Morphology > Particle Diameter Distribution > Std. Deviation Sand Fully Coupled > Erosion Model Sand Fully Coupled > Erosion Model > Option Sand Fully Coupled > Erosion Model > Vel. Power Factor Sand Fully Coupled > Erosion Model > Reference Velocity
[a]

None k-Epsilon[a] (Selected) Solid Particles (Selected) Normal in Diameter by Mass 50e-6 [m]

500e-6 [m]

Fluid Details

250e-6 [m]

70e-6 [m] (Selected) Finnie 2.0

1 [m s^-1]

The turbulence model only applies to the continuous phase and not the particle phases. 3. Apply the following settings

Tab Sand One Way Coupled

Setting

Value (Selected) Solid Particles (Selected) Normal in Diameter by Mass 50e-6 [m]

Sand One Way Coupled > Morphology > Option Sand One Way Coupled > Morphology > Particle Diameter Distribution Sand One Way Coupled > Morphology > Particle Diameter Distribution > Option Sand One Way Coupled > Morphology > Particle Diameter Distribution > Minimum Diameter Sand One Way Coupled > Morphology > Particle Diameter Distribution > Maximum Diameter Sand One Way Coupled > Morphology > Particle Diameter Distribution > Mean Diameter Sand One Way Coupled > Morphology > Particle Diameter Distribution > Std. Deviation Sand One Way Coupled > Erosion Model Sand One Way Coupled > Erosion Model > Option Sand One Way Coupled > Erosion Model > Vel. Power Factor Sand One Way Coupled > Erosion Model > Reference Velocity 4. Apply the following settings

Fluid Details

500e-6 [m]

250e-6 [m]

70e-6 [m] (Selected) Finnie 2.0

1 [m s^-1]

Tab Fluid Details Water

Setting

Value (Selected) Continuous Fluid Water | Sand Fully Coupled

Water > Morphology > Option

Fluid Pairs Fluid Pairs

Tab

Setting Fluid Pairs > Water | Sand Fully Coupled > Particle Coupling

Value Fully Coupled

Fluid Pairs > Water | Sand Fully Coupled > Momentum Schiller Naumann Transfer > Drag Force > Option Fluid Pairs Water | Sand One Way Coupled

Fluid Pairs > Water | Sand One Way Coupled > Particle One-way Coupling Coupling Fluid Pairs > Water | Sand One Way Coupled > Momentum Transfer > Drag Force > Option 5. Click OK. Schiller Naumann

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:

Equation 1.

where is the pipe centerline velocity, the pipe centerline.

is the pipe radius, and

is the distance from

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 CFXSolver 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 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: Equation 2. 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. Definition

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.
Compiling the Subroutine

1. Copy the subroutine PipeValve_inlet.F to your working directory. It is located in the <CFXROOT>/examples/ directory. 2. Examine the contents of this file in any text editor to gain a better understanding of this subroutine. This file was created by modifying the ucf_template.F file, which is available in the <CFXROOT>/examples/ directory. You can compile the subroutine and create the required library files used by the ANSYS CFX-Solver at any time before running the ANSYS CFX-Solver. The operation is performed at this point in the tutorial so that you have a better understanding of the values you need to specify in ANSYS CFX-Pre when creating a User CEL Function. The cfx5mkext command is used to create the required objects and libraries as described below. 3. From the main menu, select Tools > Command Editor. 4. Type the following in the Command Editor dialog box (make sure you do not miss the semi-colon at the end of the line):

This is equivalent to executing the following at an OS command prompt:


cfx5mkext PipeValve_inlet.F

The ! indicates that the following line is to be interpreted as power syntax and not CCL. Everything after the ! symbol is processed as Perl commands. system is a Perl function to execute a system command. The < 1 or die will cause an error message to be returned if, for some reason, there is an error in processing the command.

5. Click Process to compile the subroutine. The output produced when this command is executed will be printed to your terminal window.

Note
You can use the -double option (that is, cfx5mkext -double PipeValve_inlet.F) to compile the subroutine for use with double precision. A subdirectory will have been created in your working directory whose name is system dependent (for example, on IRIX it is named irix). This subdirectory contains the shared object library.

Note
If you are running problems in parallel over multiple platforms then you will need to create these subdirectories using the cfx5mkext command for each different platform.

You can view more details about the cfx5mkext command by running
cfx5mkext -help

You can set a Library Name and Library Path using the -name and -dest options respectively. If these are not specified, the default Library Name is that of your Fortran file and the default Library Path is your current working directory.

6. Close the Command Editor dialog box.


Creating the Input Arguments

Next, you will create some values that will be used as input arguments when the subroutine is called. 1. Click Expression . 2. Set Name to Wmax, and then click OK. 3. Type 5 [m s^-1] into the Definition box, and then click Apply. The expression will be listed in the Expressions tree view. 4. Use the same method to create an expression named Rmax defined to be 20 [mm].
Creating the User CEL Function

Two steps are required to define a User CEL Function that uses the compiled Fortran subroutine. First, a User Routine that points to the Fortran subroutine will be created. Then a User CEL Function that points to the User Routine will be created. 1. From the main toolbar, click User Routine . 2. Set Name to WprofRoutine, and then click OK. The User Routine details view appears. 3. Set Option to User CEL Function. 4. Set Calling Name to inlet_velocity.

This is the name of the subroutine within the Fortran file. Always use lower case letters for the calling name, even if the subroutine name in the Fortran file is in upper case.

5. Set Library Name to PipeValve_inlet.

This is the name passed to the cfx5mkext command by the -name option. If the -name option is not specified, a default is used. The default is the Fortran file name without the .F extension.

6. Set Library Path to the directory where the cfx5mkext command was executed (usually the current working directory). For example:

UNIX: /home/user/cfx/tutorials/PipeValve. Windows: c:\user\cfx\tutorials\PipeValve. This can be accomplished quickly by clicking Browse (next to Library Path), browsing to the appropriate folder in Select Directory (not necessary if selecting the working directory), and clicking OK (in Select Directory).

7. Click OK to complete the definition of the user routine. 8. Click User Function .

9. Set Name to WprofFunction, and then click OK. The Function details view appears.

Important
You must not use the same name for the function and the routine. 10. Set Option to User Function. 11. Set User Routine Name to WprofRoutine. 12. Set Argument Units to [m s^-1], [m], [m]. These are the units for the three input arguments: Wmax, r, and Rmax. Set Result Units to [m s^-1], since the result will be a velocity for the inlet. 1. Click OK to complete the User Function specification. You can now use the user function (WprofFunction) in place of a velocity value by entering the expression WprofFunction(Wmax, r, Rmax) (although it only makes sense for the W component of the inlet velocity in this tutorial). In the definition of WprofFunction, the variable r (radius) is a system variable defined as: Equation 3. In this equation, x and y are defined as directions 1 and 2 (X and Y for Cartesian coordinate frames) respectively, in the selected reference coordinate frame.

Creating the Boundary Conditions


Inlet Boundary 1. Create a new boundary condition named inlet. 2. Apply the following settings

Tab Basic Settings Boundary Type Location

Setting Inlet inlet

Value

Mass And Momentum > Option Mass And Momentum > U Boundary Details Mass And Momentum > V Mass And Momentum > W Boundary Conditions

Cart. Vel. Components 0 [m s^-1] 0 [m s^-1] Wprof -ORWprofFunction(Wmax, r, Rmax)[a] Sand Fully Coupled

Sand Fully Coupled > Particle Behavior (Selected) > Define Particle Behavior Sand Fully Coupled > Mass and Momentum > Option Sand Fully Coupled > Mass And Momentum > U Fluid Values[b] Sand Fully Coupled > Mass And Momentum > V Sand Fully Coupled > Mass And Momentum > W Cart. Vel. Components[c]

0 [m s^-1]

0 [m s^-1] Wprof -ORWprofFunction(Wmax, r, Rmax)


[d]

Sand Fully Coupled > Particle Position > Uniform Injection Option Sand Fully Coupled > Particle Position > Direct Specification Number of Positions > Option

Tab

Setting Sand Fully Coupled > Particle Position > 200 Number of Positions > Number Sand Fully Coupled > Particle Mass Flow > Mass Flow Rate Boundary Conditions Sand One Way Coupled > Particle Behavior > Define Particle Behavior Sand One Way Coupled > Mass and Momentum > Option Sand One Way Coupled > Mass And Momentum > U Sand One Way Coupled > Mass And Momentum > V 0.01 [kg s^-1]

Value

Sand One Way Coupled (Selected)

Cart. Vel. Components[e]

0 [m s^-1]

0 [m s^-1] Wprof -ORWprofFunction(Wmax, r, Rmax)[f] Uniform Injection

Fluid Values Sand One Way Coupled > Mass And Momentum > W Sand One Way Coupled > Particle Position > Option

Sand One Way Coupled > Particle Direct Specification Position > Number of Positions > Option Sand One Way Coupled > Particle Position > Number of Positions > Number Sand One Way Coupled > Particle Position > Particle Mass Flow Rate > Mass Flow Rate
[a]

5000

0.01 [kg s^-1]

Use the Expressions details view to enter either Wprof if using the expression method, or WprofFunction(Wmax, r, Rmax) if using the User CEL Function method.
[b]

Do NOT select Particle Diameter Distribution. The diameter distribution was defined when creating the domain; this option would override those settings for this boundary only.

Tab
[c]

Setting

Value

Instead of manually specifying the same velocity profile as the fluid, you can also select the Zero Slip Velocity option.
[d]

as you did on the Boundary Details tab

[e]

Instead of manually specifying the same velocity profile as the fluid, you can also select the Zero Slip Velocity option.
[f]

as you did on the Boundary Details tab

3. Click OK. One-way coupled particles are tracked as a function of the fluid flow field. The latter is not influenced by the one-way coupled particles. The fluid flow will therefore be influenced by the 0.01 [kg s^-1] flow of two-way coupled particles, but not by the 0.01 [kg s^-1] flow of one-way coupled particles. Outlet Boundary 1. Create a new boundary condition named outlet. 2. Apply the following settings

Tab Boundary Type Basic Settings Location

Setting Outlet outlet Subsonic

Value

Flow Regime > Option Boundary Details Mass and Momentum > Option

Average Static Pressure

Mass and Momentum > Relative Pressure 0 [Pa] 3. Click OK. Symmetry Plane Boundary 1. Create a new boundary condition named symP. 2. Apply the following settings

Tab

Setting

Value

Boundary Type Symmetry Basic Settings Location 3. Click OK. Pipe Wall Boundary 1. Create a new boundary condition named pipe wall. 2. Apply the following settings symP

Tab Boundary Type Basic Settings Location Boundary Details Fluid Values

Setting Wall

Value

pipe wall Rough Wall 0.2 [mm][a] Sand Fully Coupled Restitution Coefficient 0.8

Wall Roughness > Option Roughness Height Boundary Conditions Boundary Conditions > Sand Fully Coupled > Velocity > Option Boundary Conditions > Sand Fully Coupled > Velocity > Perpendicular Coeff. Boundary Conditions > Sand Fully Coupled > Velocity > Parallel Coeff. Boundary Conditions Boundary Conditions > Sand One Way Coupled > Velocity > Option Boundary Conditions > Sand One Way Coupled > Velocity > Perpendicular Coeff. Boundary Conditions > Sand One Way Coupled >

1 Sand One Way Coupled Restitution Coefficient 0.8 1

Tab

Setting Velocity > Parallel Coeff.

Value

[a]

Make sure that you change the units to millimetres. The thickness of the first element should be of the same order as the roughness height. 3. Click OK. Editing the Default Boundary Condition 1. In the Outline tree view, edit the boundary condition named Default Domain Default. 2. Apply the following settings

Tab Boundary Conditions

Setting

Value Sand Fully Coupled

Fluid Values

Boundary Conditions > Sand Fully Coupled > Velocity > 0.9 Perpendicular Coeff. Boundary Conditions Boundary Conditions > Sand One Way Coupled > Velocity > Perpendicular Coeff. Sand One Way Coupled 0.9

3. Click OK.

Setting Initial Values


1. Click Global Initialization 2. Apply the following settings .

Tab Global Settings

Setting

Value

Initial Conditions > Cartesian Velocity Automatic with Value Components > Option Initial Conditions > Cartesian Velocity 0 [m s^-1] Components > Option > U

Tab

Setting Initial Conditions > Cartesian Velocity 0 [m s^-1] Components > Option > V

Value

Initial Conditions > Cartesian Velocity Wprof -OR- WprofFunction(Wmax, Components > Option > W r, Rmax)[a] Initial Conditions > Turbulence Eddy (Selected) Dissipation

[a]

to enter Wprof if using the Expression method; enter WprofFunction(Wmax, r, Rmax) if using the User CEL Function method. 3. Click OK.

Use Enter Expression

Setting Solver Control


1. Click Solver Control . 2. Apply the following settings

Tab

Setting Advection Scheme > Option

Value Specified Blend Factor 0.75 (Selected) 10 [s]

Basic Settings Advection Scheme > Blend Factor Particle Control Particle Integration > Maximum Tracking Time Particle Integration > Maximum Tracking Time > Value

Particle Integration > Maximum Tracking Distance (Selected) Particle Integration > Maximum Tracking Distance 10 [m] > Value Particle Integration > Max. Num. Integration Steps (Selected) Particle Integration > Max. Num. Integration Steps > 10000 Value

Tab

Setting

Value

Particle Integration > Max. Particle Intg. Time Step (Selected) Particle Integration > Max. Particle Intg. Time Step 1e+10 [s] > Value 3. Click OK.

Writing the Solver (.def) File


1. Click Write Solver File . 2. Apply the following settings:

Setting File name Quit CFXPre[a]


[a]

Value PipeValve.def (Selected)

If using ANSYS CFX-Pre in Standalone Mode. 3. Ensure Start Solver Manager is selected and click Save. 4. If using Standalone Mode, quit ANSYS CFX-Pre, saving the simulation (.cfx) file at your discretion.

Obtaining a Solution using ANSYS CFX-Solver Manager


When ANSYS CFX-Pre has shut down and ANSYS CFX-Solver Manager has started, you can obtain a solution to the CFD problem by using the following procedure.

Note
If you followed the User CEL Function method, and you wish to run this tutorial in distributed parallel on machines with different architectures, you must first compile the PipeValve_inlet.F subroutine on all architectures. 1. Ensure the Define Run dialog box is displayed and click Start Run. 2. Click Yes to post-process the results when the completion message appears at the end of the run. 3. If using Standalone Mode, quit ANSYS CFX-Solver Manager.

Viewing the Results in ANSYS CFX-Post

In this section, you will first plot erosion on the valve surface and side walls due to the sand particles. You will then create an animation of particle tracks through the domain.

Erosion Due to Sand Particles


An important consideration in this simulation is erosion to the pipe wall and valve due to the sand particles. A good indication of erosion is given by the Erosion Rate Density parameter, which corresponds to pressure and shear stress due to the flow. 1. Edit the object named Default Domain Default. 2. Apply the following settings using the Ellipsis as required for selections

Tab

Setting Mode Variable Variable

Value

Sand One Way Coupled.Erosion Rate Density[a] User Specified 0 [kg m^-2 s^-1] 25 [kg m^-2 s^-1][b]

Color

Range Min Max

[a]

This is statistically better than Sand Fully Coupled.Erosion Rate Density since many more particles were calculated for Sand One Way Coupled.
[b]

This range is used to gain a better resolution of the wall shear stress values around the edge of the valve surfaces. 3. Click Apply. As can be seen, the highest values occur on the edges of the valve where most particles strike. Erosion of the low Z side of the valve would occur more quickly than for the high Z side.

Particle Tracks
Default particle track objects are created at the start of the session. One particle track is created for each set of particles in the simulation. You are going to make use of the default object for Sand Fully Coupled. The default object draws 10 tracks as lines from the inlet to outlet. Info shows information about the total number of tracks, index range and the track numbers which are drawn. 1. Edit the object named Res PT for Sand Fully Coupled. 2. Apply the following settings

Tab

Setting

Value

Geometry Max Tracks 20 3. Click Apply.

Erosion on the Pipe Wall


The User Specified range for coloring will be set to resolve areas of stress on the pipe wall near of the valve. 1. Clear the check box next to Res PT for Sand Fully Coupled. 2. Clear the check box next to Default Domain Default. 3. Edit the object named pipe wall. 4. Apply the following settings

Tab Setting Mode Variable

Value

Variable Sand One Way Coupled.Erosion Rate Density Color Range Min Max 5. Click Apply. User Specified 0 [kg m^-2 s^-1] 25 [kg m^-2 s^-1]

Particle Track Symbols


1. Clear visibility for all objects except Wireframe. 2. Edit the object named Res PT for Sand Fully Coupled. 3. Apply the following settings

Tab Color Mode Variable

Setting Variable

Value

Sand Fully Coupled.Velocity w

Tab

Setting Draw Symbols Draw Symbols > Max Time Draw Symbols > Min Time (Selected) 0 [s] 0 [s] 0.07 [s] Fish3D

Value

Symbol Draw Symbols > Interval Draw Symbols > Symbol

Draw Symbols > Symbol Size 0.5 4. Clear Draw Tracks. 5. Click Apply. Symbols are placed at the start of each track.

Creating a Particle Track Animation


The following steps describe how to create a particle tracking animation using Quick Animation. Similar effects can be achieved in more detail using the Keyframe Animation option, which allows full control over all aspects on an animation. 1. Select Tools > Animation or click Animation 2. Select Quick Animation. 3. Select Res PT for Sand Fully Coupled: 4. Click Options to display the Animation Options dialog box, then clear Override Symbol Settings to ensure the symbol type and size are kept at their specified settings for the animation playback. Click OK. .

Note
The arrow pointing downward in the bottom right corner of the Animation Window will reveal the Options button if it is not immediately visible. 5. Select Loop. 6. Deselect Repeat forever 7. Select Save MPEG. 8. Click Browse and enter tracks.mpg as the file name. and ensure Repeat is set to 1.

9. Click Play the animation

10. If prompted to overwrite an existing movie, click Overwrite. The animation plays and builds an .mpg file. 11. Close the Animation dialog box.

Performing Quantitative Calculations


On the outlet boundary condition you created in ANSYS CFX-Pre, you set the Average Static Pressure to 0.0 [Pa]. To see the effect of this: 1. From the main menu select Tools > Function Calculator. The Function Calculator is displayed. It allows you to perform a wide range of quantitative calculations on your results.

Note
You should use Conservative variable values when performing calculations and Hybrid values for visualization purposes. Conservative values are set by default in ANSYS CFXPost but you can manually change the setting for each variable in the Variables Workspace, or the settings for all variables by using the Function Calculator. 2. Set Function to maxVal. 3. Set Location to outlet. 4. Set Variable to Pressure. 5. Click Calculate. The result is the maximum value of pressure at the outlet. 6. Perform the calculation again using minVal to obtain the minimum pressure at the outlet. 7. Select areaAve, and then click Calculate.

This calculates the area weighted average of pressure. The average pressure is approximately zero, as specified by the boundary condition.

Other Features The geometry was created using a symmetry plane. You can display the other half of the geometry by creating a YZ Plane at X = 0 and then editing the Default Transform object to use this plane as a reflection plane. 1. When you have finished viewing the results, quit ANSYS CFX-Post.

You might also like