Valve Pressure vs Flow Analysis in Ansys CFD
Hi everyone, this is Mingyao from Ozen Engineering, Inc. In this video, I'll demonstrate how to run a basic simulation of CFD analysis through a valve. We will start by importing a SOLIDWORKS assembly into the model. You can see it's a plug valve model, and we'll perform a quick analysis of flow through this valve.
Initial Setup
- Extract the fluid region using SpaceClaim.
- The valve assembly consists of several parts:
- Upper housing
- Lower housing
- Plug assembly
- Remove the plug assembly to focus on the fluid region.
- Use the volume extract tool:
- Select two surfaces on either side and one for flood fill.
- Hit OK to extract the fluid volume.
- Suppress unnecessary parts for physics simulation.
CFD Simulation
- Proceed to meshing the flow region:
- Use default options, but assign inflation layer or boundary layer meshing.
- Exclude inlet and outlet surfaces from the boundary layer.
- Set parameters for analysis and inspect the mesh:
- Mesh adapts to high curvature areas with a coarse mesh elsewhere.
- Control the Y-plus of the inflation layer using the curve tool.
- Define inflation layer with a first layer thickness or aspect ratio.
- Adjust the mesh for better refinement near walls.
Simulation Execution
- Switch the liquid to water and use the standard shear stress transport turbulence model.
- Set inlet and outlet conditions:
- Inlet: 2 meters per second flow.
- Outlet: Average static pressure increase of 0 (gauge pressure).
- Run the simulation and monitor the analysis using multiple cores.
Results and Analysis
If the simulation is unsteady, pause and review the results:
- Visualize streamlines from inlet to outlet to identify twisting and recirculation.
- Consider using a symmetry model for a more stable simulation.
- Use a cut plane along the XY plane to plot pressure and velocity.
Conclusion
This demonstration shows how to set up a simple valve analysis in Ansys CFD. We can evaluate:
- Pressure drop across the valve.
- Flow rate variations.
- Parametric analysis by adjusting valve opening and closing.
Future videos will focus on the inverse body method in CFX. If you enjoyed this video, please subscribe. Thank you for your attention. See you next time!
Hi everyone, this is Mingyao from Ozen Engineering and in this video I'll start by looking at how to run a basic simulation CFD analysis through a valve. I am going to drag and drop a SOLIDWORKS assembly into this model.
You can see it's a plug valve model and then we're going to do a quick analysis of flow through this valve. So the first thing we need to do is extract the fluid region. I'm going to use SpaceClaim for this. Okay, this valve assembly has a few parts.
We have the upper housing, lower housing, there's a plug assembly, and then we have the plug assembly. So we're going to start by removing the plug assembly. So we're going to start by removing the plug assembly. We're going to start by removing the plug assembly.
You can see there's a plug valve and there's a weld right here. It's a fairly old model so we've been playing with this for a long time. I'm just going to walk through how we set up this analysis quickly in ANSYS CFD.
So the first thing we do need to do is we need to extract the fluid region so we use the Volume Extract feature. I'm going to select the two surfaces on either side and select one of the surfaces for flood fill. Hit OK and we have the fluid volume extracted.
The rest of the part we don't need for our simulation purposes. So I'm going to select all of them. Hit escape a few times here. And we're going to suppress these for physics. Next, we're going to do the actual CFD simulation. So let's go on to meshing. So this is the flow region.
We're going to basically use most of the default options except we want to assign some inflation layer or boundary layer meshing. So the boundary layer will include every surface except inlet and outlet.
One of the things that we often do on this model is we want to have a little bit of a boundary layer. So we're going to set some parameters for analysis. So I'll show that a little bit later. Let's take a look at what the mesh looks like with just all default conditions. And the meshing is done.
You can see that the mesh adapts automatically to high curvature areas. And it has a fairly coarse mesh on the other side. This makes it very difficult to control the Y+ of the inflation layer. So another way we can control the Y+ of the inflation layer is by using the Curvature Curve.
So we're going to use the Curvature Curve here. And we're going to use the Curvature Curve here. And we're going to use the Curvature Curve here. And we're going to use the Curvature Curve here. And then we're going to adjust the mesh.
The inflation layer is defined as a first layer thickness or first layer aspect ratio. So usually I would maybe do something like this. And let's take a look at the mesh and how that looks different compared to what I have here.
Here I have five layers, five inflation layers or four inflation layers that roughly end up being the size of the free stream mesh.
Here I'm going to start with the inflation layer that has an aspect ratio of 20 initially, so it will be a fairly thin layer, and then have 10 layers of that growing away from the walls. Having good inflation layer definition allows us to use the right turbulence models to capture drag and such.
So it's done, let's take a look at the mesh. You can see much more refined elements near the walls, and we can take a look at the interior of this mesh, look at how the flow goes around all of the valve parts. So this is one way of setting up the simulation.
If it looks good, let's go ahead and update this model. And we'll go ahead and edit this. So we'll go ahead and change the flow. So this is the model here.
We're going to, I am going to switch the liquid to water, use our standard shear stress transport turbulence model, not worry about temperature, combustion, radiation, or the magnetics, and go ahead and set up a quick simulation.
So we have an inlet here, let's select this phase, have a 1 m/s flow, and then we have a 1 m/s flow, and then a 2 m/s flow. And let's put in an outlet over here with an average static pressure increase of 0, so it's gauge pressure.
And usually I like to increase this to run a few more iterations in case there's convergence difficulties. So let's run the simulation back on the Solutions page, and we can monitor the analysis. I'm going to use a few more cores on my machine and have this run.
Okay, the simulation looks like it's not very steady. Perhaps the current is a little bit off my boundary conditions as a specified term is, is leading to some unsteady behavior. So we're going to pause the analysis and take a look at the results.
So we can, for example, take a look at the pressure distribution. There is the Y-Z plane here. The pressure distribution on the walls. Let's make this grayish. We can, for example, make it fairly transparent.
Then we can add some streamlines into our flow from the inlet to the outlet. 25 streamlines to see what it's doing. You can see there's quite a bit of twisting and recirculation in there. That's probably why this model, especially with a full model, is unsteady.
If we had a symmetry model, maybe there's less variation. We may be able to get a more steady state simulation. Whether that's physical or not is very much up for debate. Also put in a cut plane. Maybe a long xy plane. And plot things like pressure and velocity.
You can see we're capturing the near wall flows fairly well here with our prism layers. Okay, so that's a quick demonstration of how to set up a simple valve analysis in ANSYS CFD. We can look at things like pressure drop across a valve as a function of pressure drop.
We can look at things like flow rate. We can move the valve body up and down to do a parametric analysis and see how different amounts of opening and closing of the valve affect things like shear and flow velocity.
I'll be creating a few more valve simulations to mostly focus on the inverse body method inside of CFX. So that's upcoming. If you like this video, please subscribe. Thank you very much for your attention. I'll see you next time.