Incompressible water flow through a pipe junction¶
The content of this tutorial is not up to date with the current live version of SimScale. The tutorial setup and the results are still valid! Please do not get confused if styles like buttons and entity names have changed in the meantime.
In this tutorial, a fluid flow simulation of water flow through a pipe junction is carried out. The objective is to get insight of the flow field at the junction of the pipe. There are two inlets and one outlet for this configuration. The simulation will show potential areas of disrupted flow and help in better design and optimization of the pipe configuration.
1) Getting started¶
- To start this tutorial, you have to import the tutorial project “Tutorial-02: Incompressible water flow though a pipe junction” into your Dashboard via the link above.
- Once the ‘Work bench’ is open you will be in the ‘Mesh creator’ tab.
- The Mesh Creator tab is the place where you can upload CAD models and create meshes for them.
- The geometry is already available under the ‘geometry’ tree item.
2) Mesh Generation¶
- Click on the CAD model “CAD-pipe-junction v1” to load the CAD model in the viewer.
- To create a new mesh from this CAD model, click the blue New Mesh button
- Automatically, a new mesh called “CAD-pipe-junction-v1 mesh” is created and a default mesh operation called Operation 1.
- To specify how exactly the mesh shall be generated, click on the operation itself (currently called Operation 1, you may rename it to a useful name) and press ‘Enter’ to save.
- Next, select the meshing type as: “Hex-dominant automatic (only CFD)”.
- It only has a few settings to choose: We set Fineness to 3 - Moderate and Number of processors to 4 as shown below.
- To resolve the viscous boundary layer, we will generate ‘Layer mesh’ at the wall surfaces.
- Therefore we will choose all physical walls of the pipe flow domain from the viewer (selected surfaces will become Red).
- Then, click the Add selection from viewer button to add them to the ‘Surfaces with layers’ list.
- That is all. Now start the meshing operation by clicking ‘Start’ button at the top and ‘Confirm’ to begin the operation.
- The Job Status box in the lower left will show the progress of the operation.
- Note: All operations are computed on the remote cloud (not on your computer). Once an operation is started you can simply move on to another project/operation or start multiple other operations or even logout.
- After some seconds of computing, there will appear a ‘Meshing Log’ tree item below our mesh operation.
- Once the mesh operation is finished, the Job status box will show the green ‘Finished’ box.
- The mesh can now be viewed in the viewer.
- To see the inner volume mesh, use the Mesh Clip filter from the tool bar Filter option.
- Once you apply the mesh clip, it will take a few seconds to process and then show the clipped inside of the mesh as shown.
- To get back to the standard mesh view, choose Filter and click on Clear Filter.
3) Simulation Setup¶
Now after we created the mesh, let’s define the actual simulation.
Create a simulation¶
- To create a new simulation, switch to the Simulation Designer tab and click on “New simulation”.
- Enter a name for the simulation e.g ‘water-flow-pipe-junction’ and click OK.
- From the analysis type choose: Fluid Dynamics section of the analysis types, then Incompressible and setup the properties as shown in the figure below and click on ‘save’.
- After saving a new tree will be automatically generated in the left panel with all the parameters and settings that are necessary to completely specify such an analysis.
- Green check are for parts that are already completed and are OK.
- Red checks are for parts that need to be specified and must be completed.
- While, the blue checks indicates an optional settings that does not need to be filled out.
Selecting a domain and Creating Topological Entity Sets¶
- Now, click on the “Domain” entry in the tree and select the mesh “CAD pipe-junction_v1 mesh” to assign it to this simulation from the options panel. Clicking on ‘save’ will automatically load the selected mesh in the viewer.
- The Domain tree item is then expanded with the items ‘Geometry Primitives’ and ‘Topological Entity Sets’.
- For our simulation it is important to create “Topological Entity Sets”, which basically means that we can group faces together for later boundary condition assignment.
- So click on “Topological Entity Sets” from the tree.
- Switch from ‘Surfaces with Edges’ to the ‘Surfaces’ view via the menu on top of the viewer.
- Then click in “pick faces” icon from the tool-bar above the viewer.
- We will create in total 4 sets as follows:
- Now select the first inlet in the lower left (see image below). Then click on “New from selection” to create set named ‘Pipe-inlet-1’.
- Now, create 3 more sets for “Pipe-inlet-2”, “Pipe-Outlet” and “Pipe-walls” one by one in similar way to have a total of 4 sets.
Setting up the Model:¶
Adding materials (fluid) to the domain¶
- After, creating the sets move to the “Model” entry in the tree where global variables of the simulation are defined.
- Here we will add the materials from the ‘Material Library’ and assign the materials to the simulation domain or mesh.
- First, we start with clicking on sub-tree “Materials”. Click on “New” from the options panel as shown.
- We do not need to enter the material properties as we will import pre-defined ones by clicking on Import from material library at the bottom.
This pops-up a ‘Material Library’ from which we select “Water” and click on save. This will then automatically load the standard properties for Water.
- Now to assign this fluid material to the mesh, select the available entry under ‘Topological Mapping’ and click save.
Initial Conditions (Defining initial pressure and velocity in pipe):¶
- The next tree item Initial conditions allows to define the initial velocity and pressure within the pipe.
- The green check indicates that default values have already been chosen.
- We will leave the default values for the initial conditions.
Now, we come to define the boundary conditions using the topological entity sets created earlier.
- Click on “Boundary conditions” in the tree and click “New” button to create a new entry as shown below.
- Select the ‘Velocity Inlet’ boundary type, re-name the entry as “Inlet-1” and specify the values shown in the figure below and click on save at the bottom.
- Note: you do not need to select from the viewer in this case.
- Add another boundary condition (as before), re-name it as “Inlet-2” and specify the settings as shown in figure below and save it.
- Similarly add the ‘Pressure Outlet’ boundary condition, re-name it as “Outlet” and specify the settings as shown in figure below and save it.
- Lastly, add the ‘Wall’ boundary condition, re-name it to “Walls” and select “no-slip” type, select ‘Pipe-walls’ from the sets and click save.
- The tree item ‘Numerics’ allows us the control the solvers and numerical schemes. We will not change anything here in this tutorial and leave them as defaults.
- Next, in simulation control we define some main control settings such as start and end times, time step size, auto time-stepping and number of processors for this simulation run.
- Follow the figure below to set up as shown and click ‘save’.
- As we are running a steady-state analysis, the time values are visible because the solver is using a so-called quasi-static approach.
- As absolute values are not important, choose end time of 1000 with a timestep of 1 so that there are 1000 steady state iterations.
- Next is the ‘Write control’ which allows us to control how many result steps are saved.
- Since we are only interested in the final state of the system we choose 1000 as the write interval, to write out the last timestep of the simulation.
- choose 4 processors for parallel computing of this simulation.
- Change the ‘Maximum runtime’ to about 30,000 sec or 10 hours. This will be sufficient for the simulation to finish as after this duration the simulation will be killed even if it is not finished. (so its basically to limit core hours)
- Finally click on ‘Simulation Runs’ and hit the ‘Check simulation’ button to test if the simulation is well defined.
- Click on “New” from the options panel to crate new run. Then click “Start” to start the simulation run. Thats it ...!
- Furthermore the residual behavior of the simulation is updated in realtime such that we can see how the simulation is evolving.
- Once the simulation run is done, the status says ‘Finished’ with a green bar.
- The results can be post-processed by clicking on “Post-processor” tab and loading the results by clicking on “Solution fields” as shown in figure below.
- This immediately loads the post-processing environment with a not-yet colored visualization of the result fields
- The text field next to the Play button shows the timestep we are at (currently indicating the first ‘0’)
- We switch to the timestep 1000 which is the last one for the current simulation run
- Next step is to select a result field to be visualized under Select field in the top left.
- There we will first choose the pressure p under Point data which immediately loads the pressure field into the viewer
- To show the legend color bar, click on the red-crossed button next to the run name.
- The color field changes to visualize the velocity field. As we defined a velocity of zero at all walls, most of the visualization shows Blue for zero.
- So we are interested in seeing inside the flow domain, so we appy a Filter via the Add filter button in the top left of the post-processing screen
- The Add Filter button shows all current available filters as shown.
- We are interested in a clip plane, so we choose the Clip filter
- The default clip plane of the filter nicely fits our result fields as shown in the image
- Now hide the initial result set (the run name) via the Eye-shaped button left of the name.
- Hide the plane of the clip filter and choose the velocity field for the clip filter.
- This directly leads to the velocity field color shown in a clip view.
- This nicely shows the low velocity region within the pipe that is generated by the incoming second inlet flow.
- The blockage leads to a high velocity after the junction.
- Congratulations! You just finished an internal fluid flow simulation on SimScale!