# Step-by-step Tutorial: Water Flow Through a Gate Valve

**URL:** <https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110>\
**Category:** Fluid Flow / CFD\
**Created:** [August 11, 2016, 12:04pm UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110 "2016-08-11T12:04:53Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon35769789](https://www.simscale.com/forum/letter_avatar/anon35769789/32/6_22734026db12803ebb3e059622ac3534.png) [@anon35769789](https://www.simscale.com/forum/u/anon35769789)\
**Post date:** [August 11, 2016, 12:04pm UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110/1 "2016-08-11T12:04:53Z")

</div>

## Objective

In this tutorial the flow of water through a gate valve will be simulated.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/8/8cedd908f517d7a15f4764925a6418a62b663f1e.png)

## Geometry

For this tutorial a simplified geometry will be used. The geometry contains the internal cavity made by the above geometry. The geometry for can be [imported from here]

## Mesh

Select the **GATE\_VALVE\_INTERNAL** and then click on **New Mesh**. A new mesh setup will be created instantly

 ![](https://www.simscale.com/forum/uploads/default/original/2X/3/3a1bd9746db5ceaf3e71441ed2545996309ab351.png)  
Once mesh setup is created, rename it and select **Hex-dominant parametric (only CFD)** for meshing. Also set the number of mesh points in each direction and set the number of computing cores for this operation. Click **Save** to save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/4/4a0f37c67a2a1f775349b910da5fb7c1ed6422a7.png)

In the meshing tree move to “BaseMeshBox” and set the dimension for the box as in the image and click **Save**. Click **Show** if you want to see the box.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/8/8fb685c19b718cdd50a8e7866976bc45a2bc9647.png)  
Now move to the “MaterialPoint”, set the point coordinates and save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/5/5e0206bb06211c57962dc26a28a99b9122bcf4f1.png)  
Now define a cylinder around the valve which will be used to refine the mesh in this region. Move to the **Geometry Primitives** , click **New** and the select “Cylinder”.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/9/9e8aca8b7ac2bf17c0f7c79164995b69a422a3c0.png)  
Set the dimensions for the cylinder and save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/8/811bcc436b64de6decea1882414059d10e15176c.png)

Now move to the **Mesh Refinements** in the meshing tree and click **New** to add a new mesh refinement. Rename it to “SurfaceRefinement”. Set the other parameters according to the image and save the selection.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/3/3297b32b7562920c5f5a7bfc65eb2d85c296a370.png)  
Add another mesh refinement and rename it to “RegionRefinement”. Set the parameters accordingly, select the previously made cylinder for this refinement and save selection.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/6/6eb51d8860df3362a75c909da78c12a567181f23.png)

Finally add a refinement for layers addition. Rename it to “LayersAddition” and set the respective parameters. For this refinement we need to give the surface for layers addition. First select the the whole geometry by pressing **Selection** and the “Select all”. Now unselect inlet and outlet faces and press add from the viewer to add the selection for layers addition.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/0/021e8a1d57abf77b488c09148ee379803f82c097.png)

Now move to the “Hex-Mesh” (the name of mesh operation) and click **Start** to start the mesh operation.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/e/e273dacfb9d2f043ae2de2baa64ccd6c9aea4a74.png)

Once mesh is ready define the face set to define the boundary conditions on these face sets. Move to the **Topological Entry Sets**. Select the inlet face and click **New from selection** and name the selection to “inlet”.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/d/dcc261ec14fa45fd86ef2ddabd9d4f071d0ba8fe.png)  
Similarly add another face set for the outlet face and name the selection ad “outlet”.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/6/694165894d4c07ccc1eeba725811483af92d4279.png)  
To make a face set for the walls, first select inlet and outlet one by one and hide them. Now from the “Selection” press “Select all”. This way select all the geometry other than inlet and outlet face. Now press **New from selection** and name it to “walls”.

## Simulation

For simulation move to the **Simulation Designer** and click **New simulation** to create the new simulation setup.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/1/1679ac42935354643bc76a4587807901a11d206c.png)  
Once the mesh setup is created move to the analysis type and select **Fluid mechanics** and **Incompressible**. Set the properties of the simulation **K-omegaSST** for the turbulence and **Steady-state**. Save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/b/b268c7ce545569cafb694d49efb33f5433144180.png)  
Now move to the **Domain** in the simulation setup tree, select the mesh and save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/d/d1e07b2e5cbcfdda1b61766fb8fe4277e2f2f046.png)  
To assign the material to the domain move to the **Materials** and press new. Now press **Import from material library** to select the material from the given materials.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/d/d8810cbf25fd72aeb8e7511e59c75fceead95af4.png)  
Select **Water** and save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/0/0b6d6eaf12e87b3ee1e71d05a54aaa330495b126.png)  
Finally assign this material to the domain by moving to **Water** and assigning **region0** volume. Save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/8/87c20aa243a9305fc2eef76c3a1051626885a34a.png)  
Now to change the initial conditions for turbulence parameters, move to the **K** and set the value accordingly.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/f/f9657147de01ec510b9248d3e8f1c9e4607e4fee.png)  
Similarly change the initial value for the **omaga**.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/6/644c9c65c353f103e3cea0d2179c8c39b8cac1bf.png)  
Now to add the boundary conditions move to the **Boundary Conditions** and press **New** to add a new boundary condition.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/0/0d8991e830c3a866bdfa77838da7542145353aa9.png)

Rename the boundary condition to the “inlet”. Set the velocity inlet for this boundary condition and set other parameters accordingly. Assign the “inlet” face set to this boundary condition and save the selection.

 ![](https://www.simscale.com/forum/uploads/default/original/2X/d/d31b94da514d60afcb067bc8adf10d523fcfdaa4.png)  
Similarly add a new boundary condition for the outlet. Rename it to “outlet”, set the pressure outlet for this boundary. Set all the parameters according to the image and save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/7/7eaffe85fe5b37babe05b4409d03357e12e92f39.png)  
Finally add a boundary condition for the walls, assign the “walls” face set, set the respective parameters and save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/8/8cf90845f11c825fe3268907380111de8e1ff241.png)  
Now to set the solver parameters, move to the **Numerics** and set the parameters according to the images below. Save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/f/f6cc2d8e4d7f552645581b6351a8dc74e81104f7.png)  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/6/6c13c3c516406185e15def576807ba4582e0e32f.png)  
Now move to the **Simulation Control** and set the parameters. Save the selection.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/b/b89d160770de733e9ba4970ac81bc2f18fde4d3d.png)  
Now move to the **Simulation Runs** and add a new simulation run. Once simulation run is created press **Start** to start the simulation.  
 ![](https://www.simscale.com/forum/uploads/default/original/2X/3/3c3a40dd6a657cfad059471b60e469c5cc7b99fb.png)

---

<div class="post-metadata">

**Author:** ![anon35769789](https://www.simscale.com/forum/letter_avatar/anon35769789/32/6_22734026db12803ebb3e059622ac3534.png) [@anon35769789](https://www.simscale.com/forum/u/anon35769789)\
**Post date:** [August 11, 2016, 12:05pm UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110/2 "2016-08-11T12:05:02Z")

</div>



---

<div class="post-metadata">

**Author:** ![anon35769789](https://www.simscale.com/forum/letter_avatar/anon35769789/32/6_22734026db12803ebb3e059622ac3534.png) [@anon35769789](https://www.simscale.com/forum/u/anon35769789)\
**Post date:** [August 18, 2016, 4:16pm UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110/3 "2016-08-18T16:16:07Z")

</div>



---

<div class="post-metadata">

**Author:** ![donvic](https://www.simscale.com/forum/letter_avatar/donvic/32/6_22734026db12803ebb3e059622ac3534.png) [@donvic](https://www.simscale.com/forum/u/donvic)\
**Post date:** [April 13, 2020, 12:56am UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110/4 "2020-04-13T00:56:50Z")

</div>

Hi, @simscale @anon35769789 @jousefm can I get the geometry file for this tutorial on Water FLow through a Gate Valve? The geometry file in the link is obsolete or deleted [!!!THIS LINK IS NO LONGER AVAILABLE!!!]

Or is there an updated link to this geometry file for this tutorial please? Thank you

 ![Water%20Gate%20Valve](https://www.simscale.com/forum/uploads/default/original/3X/4/a/4aef8570456f9f250d7ec01ee5c138dc1a1f9132.png)

---

<div class="post-metadata">

**Author:** ![jousefm](https://www.simscale.com/forum/user_avatar/www.simscale.com/jousefm/32/34908_2.png) [@jousefm](https://www.simscale.com/forum/u/jousefm)\
**Post date:** [April 13, 2020, 9:37am UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110/5 "2020-04-13T09:37:52Z")

</div>

Hi @donvic!

You can simply download and re-upload it, that should do the job.

Best,

Jousef

---

<div class="post-metadata">

**Author:** ![donvic](https://www.simscale.com/forum/letter_avatar/donvic/32/6_22734026db12803ebb3e059622ac3534.png) [@donvic](https://www.simscale.com/forum/u/donvic)\
**Post date:** [April 13, 2020, 8:01pm UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110/6 "2020-04-13T20:01:01Z")

</div>

Hi @jousefm,  
Thank you for the response and support, however it does not work that way as I had tried it before asking for help with it.

Can you try from you end to download and re-upload the geometry file and send me the link from the source or any other you may access to on the Water flow through a Gate Valve…

The geometry file in the link is not there, as it is more like deleted than obsolete, from my own profile view, using:

---

<div class="post-metadata">

**Author:** ![jousefm](https://www.simscale.com/forum/user_avatar/www.simscale.com/jousefm/32/34908_2.png) [@jousefm](https://www.simscale.com/forum/u/jousefm)\
**Post date:** [April 13, 2020, 8:56pm UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110/7 "2020-04-13T20:56:25Z")

</div>

I thought that this is a standard procedure but now that you say it… 😃 I will tackle that and get back to you as soon as possible! Thanks 💪

Jousef

---

<div class="post-metadata">

**Author:** ![donvic](https://www.simscale.com/forum/letter_avatar/donvic/32/6_22734026db12803ebb3e059622ac3534.png) [@donvic](https://www.simscale.com/forum/u/donvic)\
**Post date:** [April 14, 2020, 9:47pm UTC](https://www.simscale.com/forum/t/step-by-step-tutorial-water-flow-through-a-gate-valve/37110/8 "2020-04-14T21:47:06Z")

</div>

@jousefm thank you. That will is very helpful as that will also make the tutorial active and relevant to Simscale users. Anyway, I found another one that has the geometry files that are still good, so am fine now, thank you.

It is by @anon23680120 and available on [SimScale](https://www.simscale.com/projects/agirin/analysis_of_water_flow_through_a_gate_valve_with_cfd/)
