This tutorial showcases how to use SimScale to run a transient, incompressible multiphase fluid simulation of water flowing through a globe valve.
This tutorial teaches how to:
We are following the typical SimScale workflow:
To begin, click on the button below. It will copy the tutorial project containing the geometry into your Workbench.
The following picture demonstrates what is visible after importing the tutorial project.
The geometry consists of the actual Globe Valve. It consists of multiple parts as can be observed in the scene tree.
The geometry for this tutorial is not ready for CFD simulations. It contains multiple solid parts of the valve. For a multiphase analysis, we need a single flow volume region.
To create a flow volume click on the ‘Edit in CAD mode’ icon to enter the CAD mode.
Now perform the following steps:
Notice that there is a new volume entity called Flow region under the parts list at the very end (see Figure 5). This is the only region that will involve the fluid interaction and which will be required for the cfd simulation.
To delete the remaining parts,
The user will be left with only the flow region. Export this geometry and return to the Workbench.
The modified geometry (Flow region) will appear under Geometries as a copy of the original valve geometry.
Rename the new geometry to ‘Valve flow region’ and hit the ‘Create Simulation’ button.
This will open the simulation type selection widget:
Choose ‘Subsonic’ as the analysis type and ‘Create Simulation’.
At this point, the simulation tree will be visible in the left-hand side panel. To run the simulation, it’s necessary to configure the simulation tree entries.
The global simulation settings need to be adjusted for Time dependency which should be ‘Transient’ and the toggle ‘Multiphase’ as in Figure 5. This is the only way a multiphase analysis can be performed.
We are simulating two materials, air and water. So let the number of phases be 2.
Did you know?
A multiphase analysis is used to simulate the time-dependent behavior of incompressible, isothermal, immiscible fluid mixtures using the VOF (Volume of Fluid) method.
The following picture shows an overview of the boundary conditions.
For the current scenario, we will include the gravitational acceleration effects in the flow physics as well.
Click on ‘Model’ from the simulation tree and set gy to ‘-9.81’ \(m/s^2\).
This simulation will begin with air initially present in the valve followed by water entering through the inlet. Therefore, this simulation will use air and water as two materials. Hence, click on the ‘+ button’ next to Materials. In doing so, the SimScale fluid material library opens, as shown in the figure below:
Select ‘Water’ and click ‘Apply’. Set the associated phase quantity to ‘Phase 1’. This means water will be recognized by a phase fraction value of 1 throughout the simulation. Keep the default values, and assign the entire Flow region to it (if not already by default).
Repeat the same procedure for the material air. However, the Associated phase will be ‘Phase 0’.
As mentioned above, initially only air is present. This needs to be defined as an initial condition. Click on the ‘+’ icon next to Initial conditions > Phase fractions > Subdomains and perform the following:
Ensure that the value of Phase 0 (air) is ‘1’ and Phase 1 (water) is ‘0’. Assign it to the entire flow region.
In the next step, boundary conditions need to be assigned as shown in Figure 16. We have a velocity inlet and a pressure outlet. The rest are walls assigned by default.
a. Velocity Inlet
Click on the ‘+ button’ next to boundary conditions. A drop-down menu will appear, where one can choose between different boundary conditions.
After selecting ‘Velocity inlet’, the user has to specify some parameters and assign faces. Please proceed as below:
The Globe valve receives a mixture of 25% air and 75% water. This means the fraction value of phase 0 is 0.25 and that of phase 1 is 0.75. This mixture will enter through the inlet face at a volumetric flow rate of ‘2e-4’ \(m^3/s\).
b. Pressure Outlet
Create a new boundary condition, this time a ‘Pressure outlet’, and select the outlet face. Make sure (P) Gauge Pressure is set to a fixed value of ‘0’ \(Pa\).
Did you know?
A globe valve is used for regulating flow in a pipeline, consisting of a movable plug or disc element and a stationary ring seat in a generally spherical body.\(^1\)
Unlike in the past, many modern globe valves do not have much of a spherical shape. However, the term globe valve is still used for valves that have such an internal mechanism.\(^1\)
In Subsonic analysis, all the surfaces that act as walls are automatically treated likewise by the solver itself. So there is no need to assign them separately.
Don’t worry about the numerical settings for this simulation, as their default values are optimized. Open the simulation control settings and change the following:
Keep the remaining settings as default. To know more about how to control the simulation read in detail here.
Result control allows you to observe the convergence behavior globally as well as at specific locations in the model during the calculation process. Hence, it is an important indicator of the simulation quality and the reliability of the results.
a. Forces and Moments
For this simulation, please set a ‘Forces and moments’ control on the “plug” of the valve. Click on the ‘+’ icon under Result control> Forces and moments to open the settings panel as shown below:
Follow the steps carefully:
c. Pressure Difference
We can also get the pressure difference between the inlet and the outlet directly as follows:
To create the mesh, we recommend using the Automatic mesh algorithm, which is a good choice in general as it is quite automated and delivers good results for most geometries.
In this tutorial, a mesh fineness level of 4 will be used. If you wish to undertake a mesh refinement study, you can increase the fineness of the mesh by sliding the mesh to higher refinement levels or using the region refinements.
Since this is a transient simulation it is recommended to start with coarse mesh settings and gradually increase if required to save on core hours.
Did you know?
The automesher creates a body-fitted mesh which captures most regions of interest using physics based meshing.
If you are using the manual mesher, you can learn how to set up different parameters in this Subsonic manual meshing documentation page.
Now you can start the simulation. Click on the ‘+’ icon next to Simulation runs. This opens up a dialogue box where you can name your run and ‘Start’ the simulation.
While the results are being calculated you can already have a look at the intermediate results in the post-processor by clicking on ‘Solution Fields’ or ‘Post-process results’. They are being updated in real-time!
Depending on the instance chosen by the machine, it might take 5-10 minutes for the simulation to finish.
Once inside the post-processor, under the Parts Color filter change Coloring to any solid color of choice and then change the render mode to Surfaces with mesh to show opaque surfaces of the CAD model with the mesh grid.
You can use the cutting plane filter to see the inside of the mesh generated:
After a few seconds, you will see a clip showing the inside of your mesh. This mesh looks sufficient for this tutorial.
The Forces and moments results are of particular interest in a simulation with a valve. The plug will be subjected to pressure forces from the incoming water. Hence, let’s inspect the resulting pressure forces and moments on the plug:
Figure 28 shows multiple runs performed with end times of 0.5, 1, and 2 seconds. For this tutorial purposes (end time of 1 second) the curves seem to be still fluctuating and more time steps might be required until a predictable pattern is observed.
One of the most important parameters to observe when evaluating the performance of a globe valve is how much the pressure drops after the water has flown through the valve.
The transient nature of the pressure difference curve seems to be converging towards the end. Like the force plot, more time steps might be required to confirm a predictable pattern.
Streamlines can be a great tool to visualize flow patterns. Follow the steps below to show the flow streamlines inside the valve:
Now repeat the process, but this time select the outlet as a seed face.
After the traces are created, you can adjust the render mode to ‘Translucent surfaces’ to give you a better view of the flow. Similarly, you can adjust the color of the parts for a better representation.
We can see that the flow follows a circular motion in the outlet region due to the rotatory motion of the turbine.
To get more details on the flow behavior inside the valve, use the Cutting plane filter.
From Figure 32, you can see how the total pressure drops after the fluid air-water mixture crosses the valve plug section in the center and keeps decreasing towards the outlet.
Different parameters can be viewed by changing the coloring. In Figure 33 air is visualized on the same cutting plane:
In Figure 34 water is visualized on the same cutting plane:
Figures 33 and 34 complement each other with their information. Most of the valve is filled with the air-water mixture with a water fraction between 0.6-0.8 and an air fraction between 0.2-0.4. The top part of the valve surrounding the plug has more air content.
Vectors can also be interpreted on the cutting plane to understand the flow patterns.
Longer vector lengths signify higher velocity magnitudes. The flow is not strong towards the bottom and top. Now change the orientation to the other two planes for more insights.
Any effect of the applied filters can be animated. Select ‘Animation’ from the top filter ribbon and click the play button under the Animation settings panel. Operate the animation commands as per your interests. Learn more.
In this view, you can get insights into how the filling up of the globe valve takes place and what internal part designs are affecting the flow, allowing for optimizations in the design.
Analyze your results with the SimScale post-processor. Have a look at our post-processing guide to learn how to use the post-processor.
Last updated: May 30th, 2023
We appreciate and value your feedback.
Sign up for SimScale
and start simulating now