Presentation on theme: "Workshop 7 Tank Flushing"— Presentation transcript:
1Workshop 7 Tank Flushing Introduction to CFXPardad Petrodanesh.CoLecturer: Ehsan Saadati
2IntroductionThis workshop models a water tank filling and then emptying through a siphon. The problem is transient in nature and solved as a two fluid multiphase case (air + water).An initial water level is set in the tank. The water supply is turned on for the first second of the simulation and then shut off for the rest of the simulation. The water level rises until water flows out the U-tube generating a siphoning effect which effectively empties the tank.
3Right-click on Mesh > Import Mesh >ICEM CFD Start Workbench, add a CFX Component System, then edit the Setup to start CFX-PreRight-click on Mesh > Import Mesh >ICEM CFDSet the Mesh Units to cmFor some mesh formats it is important to know the units used to generate the meshImport the mesh flush.cfx5
4Define Simulation Type The first step is to change the Analysis Type to Transient:Edit the Analysis Type object in the Outline treeSet the Analysis Type Option to TransientSet the Total Time to 2.5 [s]Set the Timesteps to 0.01 [s] and click OKThe simulation will have 250 timesteps
5Edit Default Domain Edit Default Domain from the Outline tree Delete Fluid 1 under Fluid and Particle DefinitionClick on the New iconName the new fluid AirSet the Material to Air at 25C and the Morphology to Continuous FluidCreate another fluid named WaterSet the Material to Water and the Morphology to Continuous Fluid
6Edit Default DomainTurn on Buoyancy and set the (X, Y, Z) gravity components to (0, -g, 0)Use the expression icon to enter -g ( g is a built-in constant )Set the Buoy. Ref. Density to [kg m^-3]This is the density of Air at 25 C. Search the help for “Buoyancy in Multiphase Flow” (including the quotes in the search) for more details
7Edit Default Domain Switch to the Fluid Models tab Under Multiphase Options, enable the Homogeneous ModelThis makes the simplifying assumption that both phases share the same velocity fieldSet the Free Surface Model Option to StandardThis changes some solver numerics to resolve the free surface interface betterUnder Heat Transfer, enable the Homogeneous Model toggle and set the Option to NoneSet the Turbulence Model Option to k-Epsilon
8Edit Default Domain Switch to the Fluid Pair Model tab Enable the Surface Tension Coefficient toggle and set the coefficient to [N m^-1]Under Surface Tension Force, set the Option to Continuum Surface ForceSet the Primary Fluid to WaterUnder Interphase Transfer, set the Option to Free SurfaceClick OK to complete the changes to the domain
9Create Boundary Conditions Start by creating an Opening boundary at the top of the tank to allow air to escape as the tank is filled:Insert a new boundary named AmbientSet the Boundary Type to Opening and the Location to AMBIENTOn the Boundary Details tab, set the Mass and Momentum Option to Opening Pres. And Dirn with a Relative Pressure of 0 [Pa]On the Fluid Values tab, set the Volume Fraction of Air to 1 and the Volume Fraction of Water to 0Click Ok to create the boundary
10Create Boundary Conditions Now create the outlet and symmetry boundaries. Since recirculation may occur at the outlet this boundary will be specified as an Opening:Insert a new boundary named Outlet with the Boundary Type as Opening and the Location as OUTLETIn the Boundary Details, use Opening Pres. And Dirn with a Relative Pressure of 0 [Pa]In the Fluid Values, set the Volume Fraction of Air to 1 and the Volume Fraction of Water to 0Click Ok to create the boundaryInsert a Symmetry boundary named Sym1 on the Location SYM1Insert a Symmetry boundary named Sym2 on the Location SYM2
11Inlet Water Flow Function Water will flow into the tank at a rate of 0.2 [kg s^-1] for 1 [s]; it will then be shut off for the remainder of the simulation. Therefore the inlet flow rate must be a function of time. You will write an expression using the if() function to define this behavior, then create the Inlet boundary:Right-click on Expressions in the Outline tree and select Insert > ExpressionEnter the Name as flowProfileEnter the Definition as: if(t<1 [s], 0.2 [kg/s], 0 [kg/s]) and click ApplyInsert a new boundary named InletSet the Boundary Type to Inlet and the Location to INLET
12Inlet Boundary Condition In Boundary Details, set the Mass and Momentum Option to Bulk Mass Flow RateSet the Mass Flow Rate to the expression flowProfileIn the Fluid Values, set the Volume Fraction of Air to 0 and the Volume Fraction of Water to 1, then click OK
13Insert the following expressions: Define ExpressionsNext you will create expressions to define the initial water height and the initial hydrostatic pressure field. These expressions must define the correct initial flow field because the transient simulation is started “cold” (it is not started from a converged steady-state simulation).Insert the following expressions:waterHt = 6 [cm]waterVF = if(y<waterHt,1,0)*if(y>-0.01 [m],1,0)* if(x> [m],1,0)waterDen = 998 [kg m^-3]HydroP = waterDen * g * (waterHt - y) * waterVFwaterHt is the initial height of the water in the tank. waterVF provides the initial volume fraction distribution in the tank (see next slide). waterDen is the density of water. HydroP provides the initial pressure distribution due to the hydrostatic pressure of water.
14Define ExpressionsThe expression for waterVF contains three step() function terms multiplied together. The first function, step((waterHt - y) / 1[m]), returns 1 when y < waterHt. In other words the volume fraction of water is 1 below the y = waterHt line shown to the right.The second step() function returns 1 when y > -0.01[m]. The third step function returns 1 when x > [m].The result is that the volume fraction of water is equal to 1 only in the shaded area shown to the right. This defines the initial water volume fraction.Note that the arguments to the step() function must be dimensionless, hence each time we divide by 1[m].x =y = waterHty =
15Define Initial Conditions Now set the initial conditions using these expressions:Right-click on Flow Analysis 1 in the Outline tree and select Insert > Global InitialisationSet all Cartesian Velocities Components to 0 [m s^-1]Set the Relative Pressure to the expression HydroPOn the Fluid Settings tab, set the Volume Fraction for Water to the expression waterVF. Set the Volume Fraction for Air to the expression 1 – waterVFClick OK to set the initial conditions
16Define Transient Results By default results are only written at the end of the simulation. You must define transient results to view the intermediate solution:Edit the Output Control object in the Outline treeOn the Trn Results tab, create a new Transient Results object, accepting the default NameSet the Option to Selected VariablesThis reduces the file size by only writing out selected variablesIn the Output Variables List, use the … icon and the Ctrl key to pick Air.Volume Fraction, Velocity, and Water.Volume FractionUnder Output Frequency, set the Timestep Interval to 2, then click OKTransient results will be written every second timestep, thus creating a total of 125 Transient Results files
17Edit the Output Control object in the Outline tree Create Monitor PointNext create a Monitor Point to track the volume of water in the domain during the solution:Insert a new expression named waterVol with the Definition set to: volumeInt(Water.Volume DomainThis is the volume integral the water volume fraction in the domainEdit the Output Control object in the Outline treeOn the Monitor tab, toggle Monitor Options, insert a new Monitor Point named Water VolumeSet the Option to Expression and enter the Expression Value as waterVol, then click OK
18Close CFX-Pre and save the project as TankFlush.wbpj Run SolverClose CFX-Pre and save the project as TankFlush.wbpjIn the Project Schematic, Edit the Solution object to start the Solver ManagerStart the run from the Solver MangerYou can monitor the volume of water in the domain during the simulation on the User Points tabThe simulation will take about 2 hours to complete. Therefore results files have been provided with this workshopAfter a few timesteps, Stop your runSelect File > Monitor Finished Run in the Solver ManagerBrowse to the results file provided with the workshopNote the shape of the Water Volume curve, and see that less water is in the domain after the run is complete than there was at the beginning
19Post-Process ResultsUsing Windows Explorer, locate the supplied results file TankFlush_001.res, and drag it into an empty region of the Project SchematicA new CFX Solution and Results cell will appear. Double-click on the Results object to open it in CFD-Post
20Post-Process ResultsTurn on Visibility for Sym1On the Colour tab, set the Variable to Water.Volume Fraction and set the Colour Map to White to Blue
21Post-Process ResultsUse the Timestep Selector to load results from different points in the simulationWith the first Timestep loaded, open the Animation toolSelect the Quick Animation toggle and select Timesteps as the object to animateTurn off the Repeat Forever buttonEnable the Save Movie toggle and then click the Play icon to animate the results and generate an MPEG
22Additional NotesThe results show that a significant amount of air becomes entrained in the water. For this situation running the Inhomogeneous model is recommended so that each phase has its own velocity field. This would allow entrained air bubble to rise out of the water. When both phases have the same velocity field there is no way for entrained air to separate from the water.When running the Inhomogeneous model, the entrained phase should be set as a Dispersed Phase in CFX-Pre.